1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2 "http://www.w3.org/TR/html4/strict.dtd">
5 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6 <meta name="GENERATOR" content="Mozilla/4.61 [en] (Win98; U) [Netscape]">
7 <link rel="stylesheet" type="text/css" media="screen" href="/css/Plain.css">
8 <title>Your violation has been reported</title>
10 $ip=$_SERVER ["REMOTE_ADDR"];
12 function GetEmails ($ip) {
16 "whois.nsiregistry.net",
18 "whois.networksolutions.com"
21 $email_address = array ();
23 foreach ($whois_list as $whois_server) {
26 if ($whois_server == "") {
29 $lines = `whois -h $whois_server $ip`;
32 preg_match_all ("/\s(\S+\@\S[\.\S]+)/", $lines, $matches, PREG_PATTERN_ORDER);
34 foreach ($matches [1] as $match) {
35 $email_address [$match] = $match;
38 $count = count ($email_address);
39 if (count ($email_address) > 0) {
44 return $email_address;
47 function SendViolation ($email_address) {
50 $domain = "DeFaria.com";
51 $contact = "Andrew@DeFaria.com";
52 $subject = "Illegal attempts to break into $domain from your domain ($ip)";
56 <title>$subject</title>
61 <p>Somebody from your domain with an IP Address of $ip has been
62 attempting to break into my domain, <a
63 href=\"http://$domain\">$domain</a>. Breaking into somebody else's
64 computer is <font color=\"red\"><b>illegal</b></font> and <font
65 color=\"red\"><b>criminal prosecution can result</b></font>. As a
66 responsible ISP it is in your best interests to investigate such
67 activity and to shutdown any such illegal activity as it is a
68 <u>violation of law</u> and most likely a violation of your user
69 level agreement. It is expected that you will investigate this and
70 send the result and/or disposition of your investigation back to <a
71 href=\"mailto:$contact\">$contact</a>. <font color=\"red\"><b>If you
72 fail to do so then criminal prosecution may result!</b></font>
77 // To send HTML mail, the Content-type header must be set
78 $extra_headers = "MIME-Version: 1.0\n";
79 $extra_headers .= "Content-type: text/html; charset=iso-8859-1\n";
82 $extra_headers .= "From: Andrew DeFaria <$contact>\n";
83 $extra_headers .= "Cc: $contact\n";
85 if (mail ($email_address, $subject, $message, $extra_headers)) {
86 print "Sent violation report to $email_address<br>";
88 print "Error sending violation report to $email_address</br>";
97 <h1 class="centered">Your violation has been reported!</h1>
101 <p>You have purposely and illegal probed my site to arrive at this page. As a
102 result your IP address <?php echo $ip;?> has been logged and a
103 report was sent to your ISP.</p>
106 $email_addresses = GetEmails ($ip);
108 foreach ($email_addresses as $email_address) {
109 SendViolation ($email_address);