Advertisement
Guest User

Untitled

a guest
Jun 20th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.55 KB | None | 0 0
  1. <?php
  2.  
  3. $agent = $_SERVER ['HTTP_USER_AGENT'];
  4. $java = 'Java/';
  5. $valid = strpos($agent, $java);
  6.  
  7. if (is_numeric($valid)) {
  8.     $key = $_GET ['key'];
  9.  
  10.     if ($key == 59103032130) {
  11.         $link = mysql_connect('mysql.ak4322.info', '1ak4322', 'rmy02jfa');
  12.         if (!$link) {
  13.             die('Could not connect: ' . mysql_error());
  14.         }
  15.  
  16.         if (!mysql_select_db('user_account_system', $link)) {
  17.             echo 'Could not select database';
  18.             exit;
  19.         }
  20.  
  21.         $username = $_GET ['username'];
  22.         $password = $_GET ['password'];
  23.  
  24.         $sql = "SELECT signature_data FROM bar WHERE username = '$username'";
  25.         $result = mysql_query($sql, $link);
  26.  
  27.         if (!$result) {
  28.             echo "DB Error, could not query the database\n";
  29.             echo 'MySQL Error: ' . mysql_error();
  30.             exit;
  31.         }
  32.  
  33.         $row = mysql_fetch_assoc($result);
  34.         if ($password == $row ['password']) {
  35.             $kills = $row ['kills'] + $_GET ['kills'];
  36.             $time = $row ['time'] + $_GET ['time'];
  37.             $xp = $row ['xp'] + $_GET ['xp'];
  38.             $loot = $row ['loot'] + $_GET ['loot'];
  39.  
  40.             $sql = "UPDATE signature_data SET kills='$kills', time='$time', xp='$xp', loot='$loot' WHERE username = '$username'";
  41.             $result = mysql_query($sql, $link);
  42.  
  43.             if (!$result) {
  44.                 echo "Failed to upload stats\n";
  45.                 echo 'MySQL Error: ' . mysql_error();
  46.                 exit;
  47.             }
  48.         }
  49.  
  50.         mysql_close($link);
  51.     }
  52. }
  53. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement