Guest User

Untitled

a guest
Sep 21st, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. <?php
  2.  
  3. if(!in_array($_SERVER['REMOTE_ADDR'],
  4. array('81.20.151.38', '81.20.148.122', '79.125.125.1', '209.20.83.207'))) {
  5. header("HTTP/1.0 403 Forbidden");
  6. die("Error: Unknown IP");
  7. }
  8.  
  9. $username = $_GET['message'];
  10. $HOST = "46.22.208.149"; // Sinu mänguserveri IP
  11. $password = "nikun siga"; // Parool, mille seadistasid web send konfingus.
  12.  
  13. $pikkus = "30"; // Päevades
  14. $endtime = date("Y-m-d H:i:s", time()+(60*60*24*$pikkus));
  15. $auaste = "VIP";
  16.  
  17. //Ära puudu, script teeb socketi ning ühendub
  18. $sock = socket_create(AF_INET, SOCK_STREAM, 0)
  19. or die("error: could not create socket\n");
  20. $succ = socket_connect($sock, $HOST, 4445)
  21. or die("error: could not connect to host\n");
  22.  
  23. //Autoriseerimine
  24. socket_write($sock, $command = md5($password)."<Password>", strlen($command) + 1)
  25. or die("error: failed to write to socket\n");
  26.  
  27. $con = mysql_connect("db_host","db_kasutaja","db_parool");
  28. mysql_select_db("db_kasutaja", $con);
  29. if (!$con)
  30. {
  31. die('Could not connect database' . mysql_error());
  32. }
  33.  
  34. //SMS kood
  35. socket_write($sock, $command = "/Command/ExecuteConsoleCommand:op $username ;", strlen($command) + 1)
  36. or die("error: failed to write to socket\n");
  37. socket_write($sock, $command = "$username on nüüd OP !;", strlen($command) + 1)
  38. or die("error: failed to write to socket\n");;
  39. mysql_query("Insert Into `mc_sms` (username, endtime, auaste) Values('$username', '$endtime', '$auaste')") or die(mysql_error);
  40.  
  41. //Saadame vastuse
  42. $vastus="Täname $username , te olete nüüd Creative !";
  43. echo($vastus);
  44. ?>
Add Comment
Please, Sign In to add comment