SHARE
TWEET

Untitled

a guest Dec 23rd, 2017 122 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. $host="localhost";
  3. $username="";
  4. $password="";
  5. $db_name="";
  6. $key="";
  7. $tbl_name="login";
  8. $IP = $_SERVER['REMOTE_ADDR'];
  9. mysql_connect("$host", "$username", "$password")or die("cannot connect");
  10. mysql_select_db("$db_name")or die("cannot select DB");
  11. $HWID = $_GET['HWID'];
  12. $sql="SELECT * FROM $tbl_name WHERE HWID='$HWID'";
  13. $result=mysql_query($sql);
  14. $count=mysql_num_rows($result);
  15. if($count==1){
  16. echo rc4Encrypt("Code")
  17. }else{
  18. echo rc4Encrypt("Code")
  19. }
  20. function rc4Encrypt($key, $pt) {
  21.     $s = array();
  22.     for ($i=0; $i<256; $i++) {
  23.         $s[$i] = $i;
  24.     }
  25.     $j = 0;
  26.     $x;
  27.     for ($i=0; $i<256; $i++) {
  28.         $j = ($j + $s[$i] + ord($key[$i % strlen($key)])) % 256;
  29.         $x = $s[$i];
  30.         $s[$i] = $s[$j];
  31.         $s[$j] = $x;
  32.     }
  33.     $i = 0;
  34.     $j = 0;
  35.     $ct = '';
  36.     $y;
  37.     for ($y=0; $y<strlen($pt); $y++) {
  38.         $i = ($i + 1) % 256;
  39.         $j = ($j + $s[$i]) % 256;
  40.         $x = $s[$i];
  41.         $s[$i] = $s[$j];
  42.         $s[$j] = $x;
  43.         $ct .= $pt[$y] ^ chr($s[($s[$i] + $s[$j]) % 256]);
  44.     }
  45.     return $ct;
  46. }
  47. function rc4Decrypt($key, $ct) {
  48.     return rc4Encrypt($key, $ct);
  49. }
  50. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top