Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- * (C) Mark Hughes, 2011
- * www.markeh.me
- */
- // You only need to change this value
- $your_email = "mark@nivsu.com";
- // ------//
- $email = "The attacker supplied us with the following infomration:\r\n";
- if(isset($_SERVER["REMOTE_ADDR"])) {
- $email .="_SERVER[REMOTE_ADDR] = {$_SERVER["REMOTE_ADDR"]} - Host: " . gethostbyaddr($_SERVER["REMOTE_ADDR"]) . "\r\n";
- }
- if(isset($_SERVER["HTTP_CLIENT_IP"])) {
- $email .="_SERVER[HTTP_CLIENT_IP] = {$_SERVER["HTTP_CLIENT_IP"]} - Host: " . gethostbyaddr($_SERVER["HTTP_CLIENT_IP"]) . "\r\n";
- }
- if(isset($_SERVER["HTTP_X_FORWARDED_FOR"])) {
- $email .="_SERVER[HTTP_X_FORWARDED_FOR] = {$_SERVER["HTTP_X_FORWARDED_FOR"]} - Host: " . gethostbyaddr($_SERVER["HTTP_X_FORWARDED_FOR"]) . "\r\n";
- }
- if(isset($_SERVER["HTTP_X_FORWARDED"])) {
- $email .="_SERVER[HTTP_X_FORWARDED] = {$_SERVER["HTTP_X_FORWARDED"]} - Host: " . gethostbyaddr($_SERVER["HTTP_X_FORWARDED"]) . "\r\n";
- }
- if(isset($_SERVER["HTTP_FORWARDED_FOR"])) {
- $email .="_SERVER[HTTP_FORWARDED_FOR] = {$_SERVER["HTTP_FORWARDED_FOR"]} - Host: " . gethostbyaddr($_SERVER["HTTP_FORWARDED_FOR"]) . "\r\n";
- }
- if(isset($_SERVER["HTTP_FORWARDED"])) {
- $email .="_SERVER[HTTP_FORWARDED] = {$_SERVER["HTTP_FORWARDED"]} - Host: " . gethostbyaddr($_SERVER["HTTP_FORWARDED"]) . "\r\n";
- }
- $email .= "User Agent: {$_SERVER['HTTP_USER_AGENT']}\r\n";
- $email .= "Referred: {$_SERVER['HTTP_REFERER']}\r\n";
- mail($your_email, "We caught an attempted attacker!", $email);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement