Ivam3

natas11.php

Oct 7th, 2025 (edited)
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.90 KB | Cybersecurity | 0 0
  1. <?php
  2.  
  3. $defaultdata = array( "showpassword"=>"no", "bgcolor"=>"#ffffff");
  4. $data = array( "showpassword"=>"yes", "bgcolor"=>"#ffffff");
  5. $cookie = "YOUR_COOKIE_HERE";
  6.  
  7. function xor_encrypt($in, $defaultdata) {
  8.     $key = $defaultdata;
  9.     $text = $in;
  10.     $outText = '';
  11.  
  12.     // Iterate through each character
  13.     for($i=0;$i<strlen($text);$i++) {
  14.         $outText .= $text[$i] ^ $key[$i % strlen($key)];
  15.     }
  16.  
  17.     // Remove duplicate characters
  18.     $outText = implode('', array_unique(str_split($outText)));
  19.  
  20.     return $outText;
  21. }
  22.  
  23. function xor_encryptkey($in, $xor_key) {
  24.   $key = $xor_key;
  25.   $text = $in;
  26.   $outText = '';
  27.  
  28.   for($i=0;$i<strlen($text);$i++) {
  29.     $outText .= $text[$i] ^ $key[$i % strlen($key)];
  30.   }
  31.   return $outText;
  32. }
  33.  
  34. $xor_key = xor_encrypt(base64_decode($cookie), json_encode($defaultdata));
  35. echo base64_encode(xor_encryptkey(json_encode($data),$xor_key));
  36. ?>
  37.  
Add Comment
Please, Sign In to add comment