Guest User

Untitled

a guest
Jul 14th, 2012
42
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. $pubkey = 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsUPYQLnKFTDdWj4hHj5E15uo3HVMOJpDSpl5tAPwySs39n7BH5SVjaNb9UQ66DlYOKGV2eZGjb3HrF+cmctaoLKCZ191ZqXb6bIe51hKF13RPn5F4oZs26nUF6s1AGK76e2TuMYH3yjlaYSzXsJfORqpHo9SIE4rWuQ9wNN8y83zJs3cxyyqrYhl+fZoTtyftCAUep2xCN4v2cazVyvgLlZq3pVwZmVcKQVKmuOs4+hV/AxplKhPyBs9yv/R+E+lo04hEwYnz8bxwgeoYVa6FHJn8eDL2OYXNOHq6JbirCN6jyQgkJdi/fsP/tdcSfnm7Gm2/3Is68uRnGl0ukF/WQIDAQAB';
  4. $str = '$str = "VOTE\n" .
  5. "server-list\n" .
  6. "$user\n" .
  7. "$userip\n" .
  8. time()."\n";';
  9.  
  10. $leftover = (256 - strlen($str)) / 2;
  11. while ($leftover > 0) {
  12.     $str .= "\x0";
  13.     $leftover--;
  14. }
  15.  
  16. if (openssl_public_encrypt($str, $encrypted, $pubkey)){
  17.         $data = base64_encode($encrypted);
  18.     }
  19. else{
  20.     echo "the data could not be encrypted :( <br />";
  21. }
  22.     return $str;
  23. ?>
RAW Paste Data