Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <unistd.h>
  3. #include <string.h>
  4. #include <crypt.h>
  5.  
  6. #define _XOPEN_SOURCE
  7.  
  8. char *crypt(const char *key, const char *salt);
  9.  
  10. int main(void) {
  11.  
  12. char *password = "lol";
  13.  
  14. char *salt = "50";
  15.  
  16. char *encrypted = crypt(password, salt);
  17.  
  18. printf("%sn", encrypted);
  19. return 0;
  20. }
  21.  
  22. // should print 50cI2vYkF0YU2 per CS50 crack exercise example.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement