Advertisement
f_panagiotis

Lightshot Algorithm [95%]

Jul 25th, 2014
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.31 KB | None | 0 0
  1. int main()
  2. {
  3.     FILE *lightshot;
  4.     unsigned int i;
  5.     int k=0,l=0,m=0,n=0,o=0,p=0;
  6.     char ch1[]="http://prntscr.com/";
  7.  
  8.     lightshot = fopen("lightshotALG.txt","w+");
  9.  
  10.     if(!lightshot)
  11.     {
  12.         printf("Error opening \"lightshot\"\n");
  13.         getchar();
  14.         exit(0);
  15.     }
  16.     else          
  17.     {
  18.         printf("\"lightshot\" opened successfully\nPress ENTER :>");
  19.         getchar();
  20.     }
  21.     system("cls"); //cls for windows , clear for linux
  22.     k=l=m=n=o=p=48;
  23.     for(i=0; i<2176782336; i++)
  24.     {
  25.         printf("%d\n",i);
  26.         fprintf(lightshot,"%s%c%c%c%c%c%c\n",ch1,k,l,m,n,o,p);
  27.        
  28.        
  29.             p++;
  30.  
  31.         if(p==58)
  32.             p = 97;
  33.         else if(p==123)
  34.             p = 48;
  35.  
  36.         if(p==48)
  37.         {
  38.             if(p==48)
  39.             {
  40.                 o++;
  41.                 if(o==58)
  42.                     o = 97;
  43.                 else if(o==123)
  44.                     o = 48;
  45.             }
  46.            
  47.             if(o==48)
  48.             {
  49.                 n++;
  50.                 if(n==58)
  51.                     n=97;
  52.                 else if(n==123)
  53.                     n=48;
  54.            
  55.            
  56.                 if(n==48)
  57.                 {
  58.                     m++;
  59.                     if(m==58)
  60.                         m=97;
  61.                     else if(m==123)
  62.                         m=48;
  63.                
  64.                     if(m==48)
  65.                     {
  66.                         l++;
  67.                         if(l==58)
  68.                             l=97;
  69.                         else if(l==123)
  70.                             l=48;
  71.                    
  72.                         if(l==48)
  73.                         {
  74.                             k++;
  75.                             if(k==58)
  76.                                 k=97;
  77.                             else if(k==123)
  78.                                 k=48;
  79.                        
  80.                             if(k==48)
  81.                             {
  82.                                 i=2176782336;
  83.                             }
  84.                         }
  85.                     }
  86.                 }
  87.             }
  88.         }
  89.            
  90.     }//end for
  91.     fclose(lightshot);
  92.  
  93.     return 0;
  94.  
  95.  
  96. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement