Ejemplo n.º 1
0
_X_INTERNAL
int
autoLoginEnv(struct display *d, struct verify_info *verify,
    struct greet_info *greet)
{
	struct passwd	*p;
	char *shell, *home, **argv;

	Debug("Autologin %s\n", d->autoLogin);
	p = getpwnam (d->autoLogin);
	if (p == NULL)
		return 0;

	greet->name = strdup(d->autoLogin);
	if (greet->name == NULL)
		return 0;
	verify->uid = p->pw_uid;
	verify->gid = p->pw_gid;
	home = p->pw_dir;
	shell = p->pw_shell;
	argv = NULL;
	if (d->session)
		argv = parseArgs (argv, d->session);
	if (greet->string)
		argv = parseArgs (argv, greet->string);
	if (!argv)
		argv = parseArgs (argv, "xsession");
	verify->argv = argv;
	verify->userEnviron = userEnv (d, p->pw_uid == 0,
	    greet->name, home, shell);
	Debug ("user environment:\n");
	printEnv (verify->userEnviron);
	verify->systemEnviron = systemEnv (d, greet->name, home);
	Debug ("system environment:\n");
	printEnv (verify->systemEnviron);
	Debug ("end of environments\n");
	return 1;
}
Ejemplo n.º 2
0
MAIN(argc, argv) {
    TIMER_T start;
    TIMER_T stop;

    GOTO_REAL();

    parseArgs(argc, (char** const)argv);
    long sz = (long)global_params[PARAM_SIZE];
    global_array = (aligned_type_t*) malloc(sz * sizeof(aligned_type_t));
    long k = 0;
    for (; k < sz; k++) {
        global_array[k].value = 0;
    }

    long numThread = global_params[PARAM_THREADS];
    SIM_GET_NUM_CPU(numThread);
    TM_STARTUP(numThread);
    P_MEMORY_STARTUP(numThread);
    thread_startup(numThread);

    printf("Running clients... ");
    fflush(stdout);

    TIMER_READ(start);
    GOTO_SIM();

    thread_start(client_run, (void*)&numThread);

    GOTO_REAL();
    TIMER_READ(stop);
    puts("done.");
    printf("Time = %0.6lf\n", TIMER_DIFF_SECONDS(start, stop));
    fflush(stdout);

    long i = 0;
    long sum = 0;
    for (;i < sz; i++) {
        sum += global_array[i].value;
//        printf("%ld\n", global_array[i].value);
    }
    if (sum != 0) {
        printf("Problem, sum was not zero!: %ld\n", sum);
    }

    TM_SHUTDOWN();
    P_MEMORY_SHUTDOWN();
    GOTO_SIM();
    thread_shutdown();
    MAIN_RETURN(0);
}
Ejemplo n.º 3
0
static PyObject *t_regexmatcher_appendReplacement(t_regexmatcher *self,
                                                  PyObject *args)
{
    UnicodeString *u0, _u0;
    UnicodeString *u1, _u1;

    if (!parseArgs(args, "SS", &u0, &_u0, &u1, &_u1))
    {
        STATUS_CALL(self->object->appendReplacement(*u0, *u1, status));
        Py_RETURN_SELF();
    }

    return PyErr_SetArgsError((PyObject *) self, "appendReplacement", args);
}
Ejemplo n.º 4
0
Archivo: filter.c Proyecto: Chryel/PINT
int main(int argc, const char **argv) {
  if (parseArgs(argc, argv) < 0) {
    puts("ERROR: failure parsing args.");
    return -1;
  }

  if (initController() < 0) {
    puts("ERROR: failure in setup function.");
    return -1;
  }

  enterLoop();
  return 0;
}
Ejemplo n.º 5
0
int main(int argc, char** argv)
{
  if (init(argc, argv)) return -1;
  if (parseArgs(argc, argv)) return -1;
  if (checkSubstitutes()) return -1;
  if (getRuntime()) return -1;
  switch (runtime)
  {
    case JavaRuntime:   return runJava();
    case DotnetRuntime: return runDotnet();
    default:          return err("internal error in main");
  }
  return 0;
}
Ejemplo n.º 6
0
static PyObject *t_searchiterator_setAttribute(t_searchiterator *self,
                                               PyObject *args)
{
    USearchAttribute attribute;
    USearchAttributeValue value;

    if (!parseArgs(args, "ii", &attribute, &value))
    {
        STATUS_CALL(self->object->setAttribute(attribute, value, status));
        Py_RETURN_NONE;
    }

    return PyErr_SetArgsError((PyObject *) self, "setAttribute", args);
}
Ejemplo n.º 7
0
int main(int argc, char** argv)
{
  //Determine which switches are activated early on                                                  
  parseArgs(argc,argv);

  //this int will be used to print lines held in char**                                              
  int i;

  //arbitrary sizes that will be used to allocate memory for char* and char**                        
  int size = 32;
  int size2 = 32;

  //arr_str will hold the strings of each line                                                       
  char ** arr_str = malloc(size * sizeof(char*));

  //will be used to read each character of line                                                      
  char * str = malloc(size2 * sizeof(char));

  //num_sentences is really number of lines                                                          
  int num_sentences = 0;

   /*                                                                                                 
   * This while loop places all of the characters of the stdin into the str array                    
   * of characters and ensures the arr_str is large enough to hold all the                           
   * character arrays                                                                                
   */
  while( (str = readline()) ){
    if(num_sentences == size)
      arr_str = realloc(arr_str, sizeof(char)*(size*=2));
    /*                                                                                               
     * To make life easier, swap the characters in a line before they're placed                      
     * into the arr_str since they will always be switched (-c is assumed)                           
     */
    if(c) swapline(str);
    //Place character arrays into arr_str                                                            
    arr_str[num_sentences++] = str;
  }
  /*                                                                                                 
   * Call the swaplineorder function that takes an array of "strings" and the number                 
   * of lines to be switched                                                                         
   */
  if(l) swaplineorder(arr_str, num_sentences);

  //Once the switches have been accounted for, print the desired product                             
  for(i = 0; i < num_sentences; i++){
    puts(arr_str[i]);
  }
  return 0;
}
Ejemplo n.º 8
0
int main(int argc,  char *argv[])
{
	serverInputs inputs;
	struct sigaction sa;
    int sd;
	pid_t pid;
	logger * logg;
	/*Parse all Arguments*/
	memset(&inputs, 0, sizeof(serverInputs));

	parseArgs(&inputs, argc, argv);
	printf("Log File Path: %s\n", inputs.logPath);
	printf("Documents Path: %s\n", inputs.directory);
	logg = init_logger(inputs.logPath);

	sd = init_socket(&inputs);

	sa.sa_handler = kidhandler;
        sigemptyset(&sa.sa_mask);

        sa.sa_flags = SA_RESTART;
        if (sigaction(SIGCHLD, &sa, NULL) == -1)
                err(1, "sigaction failed");

    printf("Server up and  listening on port: %d\n", inputs.port);

    daemon(1,1);

	for(;;) {
		request req;
		memset(&req, 0, sizeof(req));
		req.l = logg;
		int clientsd = accept_connection(sd, &req.client);
		req.inputsDIR = inputs.directory;
		
		req.requestSD = &clientsd;

		pid = fork();
		if (pid == -1)
		     err(1, "fork failed");

		if(pid == 0) {
			handle_request(&req);
			exit(0);
		}
		close(clientsd);
	}
	
}
Ejemplo n.º 9
0
int main(int argc, char** argv){
//define the files to be used
    char *fileName, *inputFile, *outFile;  
    int port;
    long fileLength=0;
    int opt, err;
    //add salt according to taste
    char *password, *salt = "NaCl";
    int keyLength = 32, macLength = 32, blockLength = 16;
    int numberOfIterations = 4096;
    char *initCounter;  
    char *key;

//parse the arguments and let the program decide the mode to be followed
    opt = parseArgs(argc, argv, &fileName, NULL, &port);
    checkErr(opt, USAGE_STR);

    if(D_DAEMON == opt){
	err = receiveFile(port, &inputFile, &fileLength);
	checkErr(err, "File receive error");
    
    } else if(L_LOCAL == opt){
	err = readFile(fileName, &fileLength, &inputFile );
	checkErr(err, "File read error");
    }
    password = getpass("Password:");

    initializeGcryptRoutine();
    err = keyDerivation(password, salt, numberOfIterations, keyLength, &key);
    checkErr(err, "Key derivation error");
    printKey(key, keyLength);

    err = verifyMac(key, keyLength, inputFile, fileLength, macLength);
    checkErr(err, "HMAC verification error");

    initCounter = (char*)(malloc(blockLength * sizeof(char)));

    memset((void *)initCounter, 0, (size_t)(blockLength * sizeof(char))); 

    err = aesCounter(key, keyLength, inputFile, fileLength - macLength, initCounter,
	    blockLength, &outFile);
    checkErr(err, "Decryption error");

    err = writeFile(fileName, outFile, fileLength - macLength, NULL, 1, opt);
    checkErr(err, "Error in output file operation");
    printf("%ld bytes written.\n", fileLength - macLength);

    return 0;
}
Ejemplo n.º 10
0
int main(int argc, char *argv[])
{
  QApplication a(argc, argv);

  int nLevel = 1;

  if (a.arguments().contains("--verbose"))
  {
    nLevel = 0;
  }

  Logger::setInstance(new Logger(nLevel, QString("%1/.Hobbyist_Software/VLC_Streamer/").arg(QDir::homePath())));

  LOG_IN("VLCStreamer Client Started");



  a.setOrganizationName("Hobbyist_Software");
  a.setOrganizationDomain("Hobbyist_Software.Com");
  a.setApplicationName("VLC_Streamer");
  a.setApplicationVersion(APP_VERSION);


  LOG_IN(QString("  Version %1").arg(a.applicationVersion()));
  LOG_IN(QString("  Beta"));
  //LOG_IN(QString("  (c) J.Stockhausen"));

  parseArgs(a.arguments());

  if (!VLCEncoder::hasSystemValidVLC())
  {
    return 1;
  }

  VLCStreamer streamer;

  MainDialog w(&streamer);
  w.show();

  streamer.slotStartService();

  int ret = a.exec();

  streamer.slotStopService();

  Logger::setInstance(0);

  return ret;
}
Ejemplo n.º 11
0
static PyObject *t_resourcebundle_getStringEx(t_resourcebundle *self,
                                              PyObject *args)
{
    UnicodeString *u;
    UnicodeString _u;
    charsArg key;
    int i;

    switch (PyTuple_Size(args)) {
      case 1:
        if (!parseArgs(args, "i", &i))
        {
            STATUS_CALL(_u = self->object->getStringEx(i, status));
            return PyUnicode_FromUnicodeString(&_u);
        }
        if (!parseArgs(args, "n", &key))
        {
            STATUS_CALL(_u = self->object->getStringEx(key, status));
            return PyUnicode_FromUnicodeString(&_u);
        }
      case 2:
        if (!parseArgs(args, "iU", &i, &u))
        {
            STATUS_CALL(u->setTo(self->object->getStringEx(i, status)));
            Py_RETURN_ARG(args, 1);
        }
        if (!parseArgs(args, "nU", &key, &u))
        {
            STATUS_CALL(u->setTo(self->object->getStringEx(key, status)));
            Py_RETURN_ARG(args, 1);
        }
        break;
    }

    return PyErr_SetArgsError((PyObject *) self, "getStringEx", args);
}
Ejemplo n.º 12
0
MStatus skinClusterWeights::doIt( const MArgList& args )
//
// Description
//
{
    MStatus status = parseArgs(args);
    if (status != MS::kSuccess) return status;

    if (editUsed) {
 	redoIt();
    } else if (queryUsed) {
       doItQuery();
    }
    return MS::kSuccess;
}
Ejemplo n.º 13
0
int main(int argc, char const *argv[])
{
    try
    {
        parseArgs(argc-1, argv+1);
    }
    catch (std::exception const &x)
    {
        error(std::string("Error during command option parsing: ") + x.what());
    }

    mainLoop();

    return 0;
}
Ejemplo n.º 14
0
int main(int argc, char* argv[])
{
    parseArgs(argc, argv);

    sTitle = "eiskaltdcpp-daemon (EiskaltDC++ core 2.2)";

#ifdef _DEBUG
    sTitle += " [debug]";
#endif

    Util::PathsMap override;
    if (config_dir[0] != 0) {
        override[Util::PATH_USER_CONFIG] = config_dir;
        override[Util::PATH_USER_LOCAL] = config_dir;
    }
Ejemplo n.º 15
0
int main(int argc, char* argv[]){
    int ret;
    AppContext ctx;

    ret = parseArgs(argc, argv, ctx);

    CHECK_RETURN(ret);

    ret = loadWords(ctx);
    CHECK_RETURN(ret);

    ret = process(ctx);

    return ret;
}
Ejemplo n.º 16
0
// Function Definitions ******************************************************
int main (int argc, char* argv[]) {

#ifdef _DEBUG
	std::cout << caesarCipherUnitTests () << std::endl;
#endif

	if (!parseArgs (argc, argv)) {

		return -1;

	}

	return 0;

}
Ejemplo n.º 17
0
int main(int argc, char** argv) {

    std::string inputfile;
    float radius;
    float initx, inity, initTheta, goalx, goaly, goalr, goalTheta;
    int depth;
    bool heuristic;
    float inflate;

    goalTheta = 0;

    parseArgs(argc, argv, inputfile, radius, initx, inity, initTheta, goalx, goaly, goalr, goalTheta, depth, heuristic, inflate);

    // Load grid
    OccupancyGrid grid;
    grid.load(inputfile);

    if (grid.empty()) {
        std::cerr << "error loading grid!\n";
        return 1;
    }

    // expand obstacles
    if (radius > 0) {
        OccupancyGrid tmp;
        expandObstacles(grid, radius, tmp, false);
        grid = tmp;
    }

    // Run search
    DubinSearch helper;
    GridChecker* checker = new GridChecker(&grid);
    Dubin* goal = helper.search(initx, inity, initTheta, goalx, goaly, goalr, goalTheta, checker, depth, heuristic, inflate);
    if (goal==NULL) {
        cout<<"Search failed"<<endl;
        std::string filename = "DebugImage.svg";
        helper.makeSVG(NULL,filename,grid,goalx,goaly,goalr);

        return -1;
    }
    else {
        cout<<"Search successful after "<<helper.getCount()<<" expansions"<<endl;
        std::string filename = "DebugImage.svg";
        helper.makeSVG(goal,filename,grid,goalx,goaly,goalr);
    }

    return 0;
}
Ejemplo n.º 18
0
int main(int argc, char *argv[]) 
{
  argmap_t argmap;
  argmap["R"] = "1";
  argmap["p"] = "2";
  argmap["r"] = "1";
  argmap["d"] = "1";
  argmap["c"] = "2";
  argmap["k"] = "80";
  argmap["L"] = "0";
  argmap["s"] = "0";
  argmap["m"] = "0";
  argmap["repeat"] = "1";

  // get parameters from the command line
  if (!parseArgs(argc, argv, argmap)) usage(argv[0]);

  long R = atoi(argmap["R"]);
  long p = atoi(argmap["p"]);
  long r = atoi(argmap["r"]);
  long d = atoi(argmap["d"]);
  long c = atoi(argmap["c"]);
  long k = atoi(argmap["k"]);
  //  long z = atoi(argmap["z"]);
  long L = atoi(argmap["L"]);
  if (L==0) { // determine L based on R,r
    L = 3*R+3;
    if (p>2 || r>1) { // add some more primes for each round
      long addPerRound = 2*ceil(log((double)p)*r*3)/(log(2.0)*NTL_SP_NBITS) +1;
      L += R * addPerRound;
    }
  }
  long s = atoi(argmap["s"]);
  long chosen_m = atoi(argmap["m"]);

  long repeat = atoi(argmap["repeat"]);

  long w = 64; // Hamming weight of secret key
  //  long L = z*R; // number of levels

  long m = FindM(k, L, c, p, d, s, chosen_m, true);

  setTimersOn();
  for (long repeat_cnt = 0; repeat_cnt < repeat; repeat_cnt++) {
    TestIt(R, p, r, d, c, k, w, L, m);
  }

}
Ejemplo n.º 19
0
void init(int argc, char *argv[])
{
	int usageExit = 1;
	char *opthelp[512];		// more than enough
	int i;

	for (i = 0; flags[i].name != 0; i++) {
		opthelp[i] = (char *) flags[i].flag;
		flags[i].flag = NULL;
	}

	for (;;) {
		int c;

		c = getopt_long_only(argc, argv, "", flags, NULL);
		if (c == -1)
			break;
		switch (c) {
		case 'h':		// -help
			usageExit = 0;
			goto usage;
		case '?':
			// getopt_long_only() should have printed something since we did not set opterr to 0
			goto usage;
		default:
			fprintf(stderr, "internal error: getopt_long_only() returned %d\n", c);
			exit(1);
		}
	}

	if (parseArgs(argc, argv) != TRUE)
		goto usage;

	initwin();
	return;

usage:
	fprintf(stderr, "usage: %s [options]", argv[0]);
	if (args != NULL && *args != '\0')
		fprintf(stderr, " %s", args);
	fprintf(stderr, "\n");
	for (i = 0; flags[i].name != 0; i++)
		fprintf(stderr, "\t-%s%s - %s\n",
			flags[i].name,
			(flags[i].has_arg == required_argument) ? " string" : "",
			opthelp[i]);
	exit(usageExit);
}
Ejemplo n.º 20
0
static void signalCallback (int sig)
{
	switch (sig) {
	case SIGHUP :
		message (LOG_INFO, "got SIGHUP - reconfiguring\n");	
		parseArgs (args.argc, args.argv);
		setupIdleTimer ();
		break;
	case SIGTERM :
	case SIGINT :
		message (LOG_INFO, "got %s - exiting\n", sig == SIGTERM ? "SIGTERM" : "SIGINT");	
		writePidFile (NULL);
		exit (0);
		break;
	}
}
static PyObject *t_breakiterator_nextBoundary(t_breakiterator *self,
                                              PyObject *args)
{
    int32_t n;

    switch (PyTuple_Size(args)) {
      case 0:
        return PyInt_FromLong(self->object->next());
      case 1:
        if (!parseArgs(args, "i", &n))
            return PyInt_FromLong(self->object->next(n));
        break;
    }

    return PyErr_SetArgsError((PyObject *) self, "nextBoundary", args);
}
Ejemplo n.º 22
0
int main(int argc, char* argv[]){
    int ret;
    AppContext ctx;

    ret = parseArgs(argc, argv, ctx);

    CHECK_RETURN(ret);

    loadSegLib(ctx.dictionary, ctx.segmentContxt);

    ret = splitFile(ctx);

    destorySegLib(ctx.segmentContxt);
    doExit(ctx);
    return ret;
}
Ejemplo n.º 23
0
int main(int argc, char** argv) {
    time_t startTime, finishTime, totalTime = 0;
    parseArgs(argc, argv);
    createArray();
    BTree* tree;
    medrank solution;
    generate();
    printf("generated!\n");
    char fileName[50];
    int ans[queryNum];
    
    startTime = clock();
    for (int i = 0; i < randomSize; ++i) {
        solution.generateFileName(i, fileName);
	    tree = new BTree;
        tree->init(fileName, BLOCKLENGTH);
        tree->bulkload(Litems[i], nSize);       
	    delete tree;
    }
    finishTime = clock();
    printf("bulkload finished!\n");
    printf("Indexing Time: %.4fs\n", (float)(finishTime - startTime) / CLOCKS_PER_SEC);
    FILE* absFileRead = fopen("./data/nearest.txt", "r");
    float resultRatio = 0, result[queryNum];
    for (int i = 0; i < queryNum; ++i) {
		// printf("run start:%d\n", i);
        result[i] = 0;
        startTime = clock();
        ans[i] = solution.runAlgorithm(q[i]);
        finishTime = clock();
        totalTime += finishTime - startTime;
        for (int j = 0; j < dSize; ++j) {
            result[i] += pow((queries[i][j] - a[ans[i]][j]),2);
        }

        result[i] = sqrt(result[i]);
        float tmp = 0;
        fscanf(absFileRead, "%f", &tmp);
        // printf("Medrank Result: %f, cloest: %f\n", result[i], tmp);
        resultRatio += (result[i] / tmp); 
    }
    printf("Average Running Time: %.4fs\n", (float)totalTime / queryNum / CLOCKS_PER_SEC);
    resultRatio /= queryNum;
    printf("------Overall Ratio: %f------\n", resultRatio);
    deleteArray();
    return 0;
}
Ejemplo n.º 24
0
/*-----------------------------------------------------------------------
 * main
 *----------------------------------------------------------------------*/
int main(int argc, char** argv)
{
    parseArgs(argc,argv);

    /* print parameters */
    printf("------------------------------------------------------------------------\n");
    printf("tibemsQueueBrowser SAMPLE\n");
    printf("------------------------------------------------------------------------\n");
    printf("Server....................... %s\n",serverUrl?serverUrl:"localhost");
    printf("User......................... %s\n",userName?userName:"(null)");
    printf("Queue........................ %s\n",queueName);
    printf("------------------------------------------------------------------------\n");

    run();

    return 1;
}
Ejemplo n.º 25
0
int main(int argc, char **argv) {

	int exitCode;

	//doTestAndDie();

	parseArgs(argc,argv);

	if (sendFile)
		exitCode = sendFileContent(ip,udpPort,fileName);
	else
		exitCode = runSimulator(ip,udpPort);

	return exitCode;

	//return EXIT_SUCCESS;
}
Ejemplo n.º 26
0
int main(int argc, char* argv[])
{
    parseArgs(argc, argv);
    int NumTask, rank;

    MPI_Init( &argc, &argv );
    MPI_Comm_size( MPI_COMM_WORLD, &NumTask);
    MPI_Comm_rank( MPI_COMM_WORLD, &rank);

    SearchStrategy* ss = SearchStrategy::create(strategyNo);

    if (verbose)
   	printf("Using strategy '%s' ...\n", ss->name());

    ss->setMaxDepth(maxDepth);

    b.setSearchStrategy( ss );
    ss->setEvaluator(&ev);

    if( verbose )
    printf("\nIn main, rank = %d\n", rank);

    ss->registerCallbacks(new SearchCallbacks(verbose, NumTask, rank));

    // Only rank 0 opens port & communicates
    if( rank == 0 )
    {
        printf("\nStarting, rank = %d\n", rank);
        MyDomain d(lport);
        l.install(&d);
        if (host) d.addConnection(host, rport);

        //l.install(&d);
	    l.run();
    }
    else // others wait for signal from Master - rank 0
    {
    	printf("\nRank %d executing wait\n", rank);
        ss->setBoard( &b );
	    ss->wait();
    }

    MPI_Finalize();

    printf("\n Rank %d exiting from Main \n", rank );
}
Ejemplo n.º 27
0
/*-----------------------------------------------------------------------
 * main
 *----------------------------------------------------------------------*/
int main(int argc, char** argv)
{
    parseArgs(argc,argv);

    /* print parameters */
    printf("\n------------------------------------------------------------------------\n");
    printf("tibemsXAMsgConsumer SAMPLE\n");
    printf("------------------------------------------------------------------------\n");
    printf("Server....................... %s\n",serverUrl?serverUrl:"localhost");
    printf("User......................... %s\n",userName?userName:"(null)");
    printf("Destination.................. %s\n",name);
    printf("------------------------------------------------------------------------\n\n");

    run();

    return 1;
}
Ejemplo n.º 28
0
/**************************************************
 * Main                                           *
 **************************************************/
int main(int argc, const char* argv[]) {
    parseArgs(argc, argv);
    
//    Print("main thread starting the test..."); // FOR DEBUG
    
    InitLocks();
    
    if (!createThreads()) { // returns true if all threads were created successfully
        ErrorExit(RES_CREATE_FAILED);
    }
    
    waitForThreads();
    waitOrExit();
    
    Print("main thread is calling return from main()"); // FOR DEBUG
    return RES_SUCCESS;
}
Ejemplo n.º 29
0
int main( int argc, char const **argv ) {
        parseArgs(argc,argv);

        printf( "%ux%u\n", outw, outh );

        fb2_overlay_t overlay(x,y,outw,outh,alpha,format); // V4L2_PIX_FMT_SGRBG8 ; // 
        if ( overlay.isOpen() ) {
                printf( "opened successfully: mem=%p/%lu\n", overlay.getMem(), overlay.getMemSize() );
                unsigned char val = 0 ;
                while(1){
                    memset(overlay.getMem(), val++, overlay.getMemSize());
                }
        }
        else
                ERRMSG( "Error opening v4l output\n" );
        return 0 ;
}
Ejemplo n.º 30
0
int main(int argc, char* argv[]){

	char* profileDir = argv[1];
	if ((argc < 2)|| (profileDir[0] != '/')){
		printf("\nPlease input the absolute directory of the firefox profile as argument 1\n\n");
		usage();
	}

	FireMasterInit(profileDir);

	parseArgs(argc, argv);
	time(&start);
	switch(crackMethod){
		case 0:
			// Let the user know what they're cracking
			printf("Parameters supplied:\n");
			printf("\tCharacter Set = %s\n", bruteCharSet);
			printf("\tMinimum password length = %i\n", brutePosMinCount);
			printf("\tMaximum password length = %i\n", brutePosMaxCount);
			printf("\tPattern to crack = %s\n", brutePattern);

			BruteCrack(bruteCharSet, brutePassword, 0, 0);
			break;
		case 1:
			printf("Parameters supplied:\n");
			printf("\tDictionary File = %s\n", dictionaryFile);
			DictCrack(dictionaryFile);
			break;
		case 2:
			printf("Parameters supplied:\n");
			printf("\tHybrid Crack Type = %d\n", hybridCrackMode);
			printf("\tDictionary File = %s\n", dictionaryFile);
			printf("\tAppend/Prefix character set = %s\n", bruteCharSet);
			printf("\t# Characters to Append/Prefix = %i\n", extraChars);
			isHybrid = true;
			DictCrack(dictionaryFile);
			exit(0);
		default:
			printf("Please specify a crack method using either -b (bruteforce), -d (dictionary), or -h (hybrid)\n");
			break;
	}
	printf("\n%s\n", "No Luck: try again with better options");

	return 0;
}