Guest User

Untitled

a guest
Apr 10th, 2016
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.46 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<string.h>
  3. #include<stdlib.h>
  4. int main(int argc, char * argv[])
  5. {
  6.         if(argc<2){
  7.                 printf("usage: passgen [password]\n");
  8.                 exit(0);
  9.         }
  10.         char * buffer = malloc(255);
  11.         strncpy(buffer, (const char *)argv[1], 255);
  12.         int i = strlen(argv[1]);
  13.         while(i){
  14.                 buffer[i]-=10;
  15.                 i--;
  16.         }
  17.         printf("%s", buffer); printf("\n");
  18. }
Advertisement
Add Comment
Please, Sign In to add comment