Advertisement
Guest User

Untitled

a guest
Feb 10th, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.86 KB | None | 0 0
  1. <?php
  2. $dbhost = "snip";
  3. $dbname = "snip";
  4. $dbuser = "snip";
  5. $dbpass = "snip";
  6.  
  7. $sha256h = $_GET['h'];
  8. $sha256u = $_GET['u'];
  9.  
  10. $alpha = array("1","2","3","4","5","6","7","8","9","0");
  11. $logfile = "premiumlogs.txt"
  12.  
  13. $ip = $_SERVER["REMOTE_ADDR"];
  14. $date = date("m/d/Y h:i:s a", time());
  15. $sha256geoip = json_decode(file_get_contents("https://freegeoip.net/json/" . $IP),true);
  16. $geoip = $geoip . "Country: " . $geoipjson["country_name"] . ", Region: " . $geoipjson["region_name"] . ", City: " . $geoipjson["city"] . ", Zip/Postal Code: " . $geoipjson["zip_code"];
  17.  
  18. $con = mysqli_connect($dbhost, $dbuser, $dbpass)or die("ip logged, " . $ip . "\n");
  19. $verb = mysqli_select_db($con, $dbname);
  20.  
  21. $strlen = strlen( $sha256h );
  22. for( $i = 0; $i <= $strlen - 1; $i++ ) {
  23.     $char = substr( $hwid, $i, 1 );
  24.     if (!in_array($char, $alpha)) {
  25.         die("Your IP is logged, and all of your information. Here is something cool I found on the internet! " . $IP . "\n");
  26.     }
  27. }
  28.  
  29. if ( $verb ) {
  30.     $sql = "SELECT * FROM auth WHERE hwid='$hwid'";
  31.     $quer = mysqli_query($con, $sql);
  32.     $num = mysqli_num_rows($quer);
  33.    
  34.     if ( $num == 0 ) {
  35.         echo("iiiiilllll!!!!!");
  36.         file_put_contents($logfile, file_get_contents($logfile) . " Date: " . $date . " || Location: " . $geoip . " || IP: " . $ip . " || HWID: " . $sha256h . " || Whitelisted: No" . "\n\");
  37.         exit();
  38.    }
  39.    elseif ( $num == 1 ) {
  40.         echo("iiiiillllll!!!!!");
  41.         file_put_contents($logfile, file_get_contents($logfile) . " Date: " . $date . " || Location: " . $geoip . " || IP: " . $ip . " || HWID: " . $sha256h . " || Whitelisted: Yes" . "\n\");
  42.    }
  43.    else {
  44.         file_put_contents($logfile, file_get_contents($logfile) . " Date: " . $date . " || Location: " . $geoip . " || IP: " . $ip . " || HWID: " . $sha256h . " || Whitelisted: Unkown" . "\n\");
  45.    }
  46. }  
  47. mysqli_close( $con );
  48. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement