Advertisement
Guest User

Untitled

a guest
Dec 9th, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4.  
  5. int main(){
  6.  
  7. char key[65];
  8. FILE *pipe;
  9. pipe=popen("openssl rand -hex 33","r");
  10. fgets(key, 65, pipe);
  11. fclose(pipe);
  12.  
  13. char opensslCommand[100]="openssl enc -e -aes-128-cbc -in clipboard.txt -out cifrado.aes -iv 0 -k ";
  14. printf("%s\n",opensslCommand);
  15. strcat(opensslCommand,key);
  16. printf("%s",opensslCommand);
  17.  
  18. system(opensslCommand);
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement