]> git.mxchange.org Git - mailer.git/blob - register.php
Added local files + mods
[mailer.git] / register.php
1 <?php
2
3 //  PROJECT HONEY POT ADDRESS DISTRIBUTION SCRIPT
4 //  For more information visit: http://www.projecthoneypot.org/
5 //  Copyright (C) 2004-2013, Unspam Technologies, Inc.
6 //  
7 //  This program is free software; you can redistribute it and/or modify
8 //  it under the terms of the GNU General Public License as published by
9 //  the Free Software Foundation; either version 2 of the License, or
10 //  (at your option) any later version.
11 //  
12 //  This program is distributed in the hope that it will be useful,
13 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
14 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 //  GNU General Public License for more details.
16 //  
17 //  You should have received a copy of the GNU General Public License
18 //  along with this program; if not, write to the Free Software
19 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
20 //  02111-1307  USA
21 //  
22 //  If you choose to modify or redistribute the software, you must
23 //  completely disconnect it from the Project Honey Pot Service, as
24 //  specified under the Terms of Service Use. These terms are available
25 //  here:
26 //  
27 //  http://www.projecthoneypot.org/terms_of_service_use.php
28 //  
29 //  The required modification to disconnect the software from the
30 //  Project Honey Pot Service is explained in the comments below. To find the
31 //  instructions, search for:  *** DISCONNECT INSTRUCTIONS ***
32 //  
33 //  Generated On: Wed, 20 Feb 2013 07:19:08 -0800
34 //  For Domain: www.wernis4mails.de
35 //  
36 //  
37
38 //  *** DISCONNECT INSTRUCTIONS ***
39 //  
40 //  You are free to modify or redistribute this software. However, if
41 //  you do so you must disconnect it from the Project Honey Pot Service.
42 //  To do this, you must delete the lines of code below located between the
43 //  *** START CUT HERE *** and *** FINISH CUT HERE *** comments. Under the
44 //  Terms of Service Use that you agreed to before downloading this software,
45 //  you may not recreate the deleted lines or modify this software to access
46 //  or otherwise connect to any Project Honey Pot server.
47 //  
48 //  *** START CUT HERE ***
49 //  
50 define('__REQUEST_HOST', 'hpr1.projecthoneypot.org');
51 define('__REQUEST_PORT', '80');
52 define('__REQUEST_SCRIPT','/cgi/serve.php');
53 //  
54 //  *** FINISH CUT HERE ***
55 //  
56
57 define('__HPOT_TAG1',    '7b8a66bc336b69c9af3e1af568a2b17d');
58 define('__HPOT_TAG2',    'd092e61c32a25555d8c609de2570ed82');
59 define('__HPOT_TAG3',    '34aa2473d1aa4705f92165addfe297ff');
60
61 define('__CLASS_STYLE_1','slahocla');
62 define('__CLASS_STYLE_2','boxuc');
63
64 define('__DIV1',         'stac');
65
66 define('__VANITY_L1',    'MEMBER OF PROJECT HONEY POT');
67 define('__VANITY_L2',    'Spam Harvester Protection Network');
68 define('__VANITY_L3',    'provided by Unspam');
69
70 define('__DOC_TYPE1',    '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\n');
71 define('__HEAD1',        '<html>\n<head>\n');
72 define('__HEAD2',        '<title>Www.wernis4mails.de Shoal</title>\n</head>\n');
73 define('__ROBOT1',       '<meta name="robots" content="noindex">\n<meta name="robots" content="noarchive,follow">\n');
74 define('__NOCOLLECT1',   '<meta name="no-email-collection" content="/">\n');
75 define('__TOP1',         '<body>\n<div id="wellgroomed" align="center">\n');
76 define('__EMAIL1A',      '<a href="mailto:');
77 define('__EMAIL1B',      '" style="display: none;">');
78 define('__EMAIL1C',      '</a>');
79 define('__EMAIL2A',      '<a href="mailto:');
80 define('__EMAIL2B',      '" style="display:none;">');
81 define('__EMAIL2C',      '</a>');
82 define('__EMAIL3A',      '<a style="display: none;" href="mailto:');
83 define('__EMAIL3B',      '">');
84 define('__EMAIL3C',      '</a>');
85 define('__EMAIL4A',      '<a style="display:none;" href="mailto:');
86 define('__EMAIL4B',      '">');
87 define('__EMAIL4C',      '</a>');
88 define('__EMAIL5A',      '<a href="mailto:');
89 define('__EMAIL5B',      '"></a>');
90 define('__EMAIL5C',      '..');
91 define('__EMAIL6A',      '<span style="display: none;"><a href="mailto:');
92 define('__EMAIL6B',      '">');
93 define('__EMAIL6C',      '</a></span>');
94 define('__EMAIL7A',      '<span style="display:none;"><a href="mailto:');
95 define('__EMAIL7B',      '">');
96 define('__EMAIL7C',      '</a></span>');
97 define('__EMAIL8A',      '<!-- <a href="mailto:');
98 define('__EMAIL8B',      '">');
99 define('__EMAIL8C',      '</a> -->');
100 define('__EMAIL9A',      '<div id="'.__DIV1.'"><a href="mailto:');
101 define('__EMAIL9B',      '">');
102 define('__EMAIL9C',      '</a></div><br><script language="JavaScript" type="text/javascript">document.getElementById(\''.__DIV1.'\').innerHTML=\'\';</script>');
103 define('__EMAIL10A',     '<a href="mailto:');
104 define('__EMAIL10B',     '"><!-- ');
105 define('__EMAIL10C',     ' --></a>');
106 define('__LEGAL1',       '');
107 define('__LEGAL2',       '\n');
108 define('__STYLE1',       '\n<style>a.'.__CLASS_STYLE_1.'{color:#FFF;font:bold 10px arial,sans-serif;text-decoration:none;}</style>');
109 define('__VANITY1',      '<table cellspacing="0"cellpadding="0"border="0"style="background:#999;width:230px;"><tr><td valign="top"style="padding: 1px 2px 5px 4px;border-right:solid 1px #CCC;"><span style="font:bold 30px arial,sans-serif;color:#666;top:0px;position:relative;">@</span></td><td valign="top" align="left" style="padding:3px 0 0 4px;"><a href="http://www.projecthoneypot.org/" class="'.__CLASS_STYLE_1.'">'.__VANITY_L1.'</a><br><a href="http://www.unspam.com"class="'.__CLASS_STYLE_1.'">'.__VANITY_L2.'<br>'.__VANITY_L3.'</a></td></tr></table>\n');
110 define('__BOTTOM1',      '</div>\n</body>\n</html>\n');
111
112
113 function getLegalContent() { return '<table cellspacing="0" border="0" cellpadding="0">\n<tr>\n<td><font face="courier">&nbsp; &nbsp; &nbsp; &nbsp; <br>&nbsp;<br>The we&#98;s<br>to<font color=white>h</font>you s<br>other te<br>Webs&#105;t&#101; <br>read &#116;he<br>agents o<br>them.<font color=white>i</font>Th<br>&#110;o&#110;-tran<br>Webs&#105;te.<br><br>&nbsp; &nbsp; &nbsp; &nbsp; <br>&nbsp;<br>Sp&#101;cial <br>&#78;&#111;n-Huma<br>spiders,<br>p<!-- conscience dealer waiting wicked -->rog&#114;ams<br>a&#117;tomati<br><br>Emai&#108; a&#100;<br>It is re<br>alo&#110;e. Y<br>has a va<br>storage,<br>v&#97;lue &#111;&#102;<br>st&#111;r&#105;ng<!-- pathological twopenny square major promotion -->&nbsp;<br>&#97;gre&#101;men<br><br>&nbsp; &nbsp; &nbsp; &nbsp; <br>&nbsp;<br>Ea&#99;h par<br>ag&#97;i&#110;st <br>("J&#117;di&#99;i<br>the regi<br>such l&#97;&#119;<br>and pe&#114;f<br>of f&#101;der<br>any ac&#116;i<br>Service.<br>the a&#98;&#111;v<br><br>&nbsp; &nbsp;&nbsp; <b><font color=white>f</font><font color=white>c</font></b>&nbsp;<br>&nbsp;<br>&#89;o&#117;<font color=white>e</font>c&#111;n&#115;<br>m&#97;y ap&#112;e<br>a&#98;use. T<br>Visit&#111;rs<br><br>V&#73;S&#73;T&#79;RS<br>P&#65;RTY OR<br>SUBSEQ&#85;E<br></font></td>\n<td><font face="courier"><b><font color=white>k</font></b>&nbsp; &nbsp; &nbsp;&nbsp; <br><br>ite<font color=white>g</font>f&#114;om<br>ubjec&#116; t<br>&#114;ms g<!-- dress classic directionless comatose letter -->&#111;ve<br>&#121;ou<font color=white>p</font>acce<br>m carefu<br>f t&#104;e in<br>e access<br>sferable<br><br><br>&nbsp; &nbsp; &nbsp;&nbsp; <b>&#83;</b><br><br>re&#115;&#116;rict<br>n &#86;&#105;sito<br><font color=white>f</font>bots,<font color=white>i</font>&#105;<br>&nbsp;des&#105;gne<br>cally.<br><br>dresses <br>cognize&#100;<br>o&#117;<font color=white>g</font>ackno<br>lue not<font color=white>o</font><br>&nbsp;an&#100;/o&#114; <br>&nbsp;&#116;h<!-- endless productive neophyte transparent hairline -->ese a<br>this We&#98;<br>t and ex<br><br>&nbsp; &nbsp; <b><font color=white>h</font></b>&nbsp;&nbsp; <br><br>ty<font color=white>t</font>agre&#101;<br>th&#101; othe<br>a&#108; &#65;ctio<br>st&#101;&#114;ed A<br>s are ap<br>ormed &#101;n<br>a&#108; an&#100; s<br>on<font color=white>t</font>brou&#103;<br>&nbsp;Y&#111;&#117; con<br>e agreem<br><br>&nbsp; &nbsp; &nbsp; &nbsp; <br><br>ent to h<br>a&#114; some&#119;<br>&#104;e &#73;&#100;ent<!-- choral unchristian psychotropic elderly newfangled --><br>&nbsp;a&#103;ree &#110;<br><br>&nbsp;A&#71;REE T<!-- crocodiles shortwaisted --><br>&nbsp;SENDING<br>NT BREA<!-- exchange -->C<br></font></td>\n<td><font face="courier">&nbsp;<b><font color=white>f</font></b>&nbsp; &nbsp; &nbsp; <br><br>&nbsp;whi&#99;h y<br>o<font color=white>o</font>the fo<br>rnin&#103; ac<br>pt these<br>l&#108;y<!-- charlatan workstudy coat mug -->. Any<br>di<!-- stringendo -->&#118;idual<br><font color=white>e</font>rights <br>&nbsp;witho&#117;t<br><br><br><b>&#80;ECI&#65;L</b>&nbsp;<b>L</b><br><br>io&#110;s on <br>rs. Non-<br>ndexers,<br>d to acc<br><br><br>on t<!-- grandfather impressive prisoner boundless -->his <br><font color=white>k</font>that t&#104;<br>&#119;ledge a<br>l&#101;&#115;s tha<br>d&#105;stri&#98;u<br>ddresses<br>site\'s e<br>p&#114;&#101;&#115;sl&#121; <br><br>&nbsp;<b><font color=white>p</font></b>&nbsp;&nbsp; <b><font color=white>o</font></b>&nbsp;<b><font color=white>s</font></b><br><br>s<font color=white>e</font>that a<br>r in &#99;on<br>n") shal<br>dministr<br>plied to<br>tirely<font color=white>e</font>&#119;<br>ta&#116;e cou<br>&#104;t<font color=white>o</font>aga&#105;n<br>sent to <br>ent&#46;<br><br>&nbsp; &nbsp; &nbsp;&nbsp; <b><font color=white>p</font></b><br><br>&#97;ving yo<br>here &#111;n <br>i&#102;ier is<br>ot<font color=white>c</font>&#116;o u&#115;<br><br>HAT HARV<br>&nbsp;AN&#89; M&#69;S<br>H OF<font color=white>f</font>&#84;HE<br></font></td>\n<td><font face="courier">&nbsp;&nbsp; <b>TERM<!-- encroute climate venomous vitamin neighborly -->&#83;</b><br><br>ou acc<!-- standup agriculture perfunctory puny -->es<br>l<!-- thought divalent toilworn -->l&#111;wing <br>cess &#116;o<font color=white>h</font><br>&nbsp;terms a<br>&nbsp;Non-Hum<br>(&#115;) who <br>&#103;rant&#101;d <br>&nbsp;th&#101; exp<br><br><br><b>&#73;CENSE</b>&nbsp;<b>R</b><br><br>a vis&#105;&#116;o<br>Hu&#109;an Vi<br>&nbsp;&#114;o&#98;ot&#115;,<br>ess, r&#101;a<br><br><br>s<!-- management sigh -->ite are<br>ese em&#97;i<br>nd a&#103;r&#101;e<br>n US $5<!-- balance journal -->0<!-- division socialist alloy finedrawn ballet --><br>ti&#111;n of <br>. &#73;ntent<br>mail add<br>prohibit<br><br><b><font color=white>i</font>APPLICA</b><br><br>ny<font color=white>d</font>suit,<br>nectio<!-- resultant ownership -->n<font color=white>e</font><br>l be gov<br>ative Co<br>&nbsp;&#97;greem&#101;<br>i&#116;hin<!-- workingclass fun -->&nbsp;th<br>rt&#115; with<br>&#115;t him i<br>e&#108;ectron<br><br><br><b>RECORDS</b>&nbsp;<br><br>ur Inter<br>this pag<br>&nbsp;uniqu&#101;l<br>e<font color=white>c</font>th&#105;s a<br><br>ESTI&#78;G, <br>SAGE(S) <br>SE TERMS<br></font></td>\n<td><font face="courier">&nbsp;<b>AN&#68;</b>&nbsp;<b>CON</b><br><br>s&#101;d this<br>c&#111;nditio<br>the Webs<br>nd condi<br>an Visit<br>controls<br>to &#121;ou &#117;<br>ress<font color=white>d</font>wri<br><br><br><b>ESTRICTI</b><br><br>r\'s<font color=white>d</font>&#108;ice<br>sitor&#115; i<br>&nbsp;crawler<br>d&#44; compi<br><br><br>&nbsp;&#99;&#111;nside<br>l<font color=white>e</font>ad&#100;re&#115;<br>&nbsp;that ea<br>. You &#102;u<br>the&#115;e<font color=white>k</font>ad<br>&#105;o&#110;al<font color=white>k</font>co<br>resses &#105;<br>ed.<br><br><b>BLE</b>&nbsp;<b>L&#65;W</b>&nbsp;<br><br>&nbsp;acti&#111;n <br>&#119;&#105;th<font color=white>h</font>or <br>ern&#101;d &#98;y<br>ntact &#40;t<br>nts be&#116;w<br>e Admin <br>in the A<br>n connec<!-- racism revision animato --><br>i&#99; s&#101;&#114;&#118;i<br><br><br><b>&#79;F</b>&nbsp;<b>&#86;ISIT</b><br><br>&#110;et &#80;ro&#116;<br>e (t<!-- oxyhydrogen profession fleshcolored -->he "<br>y ma&#116;c&#104;e<br>d&#100;ress f<br><br>GATHER&#73;N<br>TO TH&#69; I<br>&nbsp;OF SER&#86;<br></font></td>\n<td><font face="courier"><b>DI&#84;ION&#83;<font color=white>i</font></b><br><br>&nbsp;ag&#114;eeme<br>ns&#46;<font color=white>p</font>The&#115;<br>ite. B&#121; <br>ti&#111;ns (t<br>&#111;rs<font color=white>i</font>to t<br>,<font color=white>o</font>autho&#114;<br>nder the<br>tte&#110; per<br><br><br><b>ONS</b>&nbsp;<b>FOR</b>&nbsp;<br><br>ns&#101; to<font color=white>s</font>a<br>nclud&#101;&#44; <br>s&#44; har&#118;e<br>&#108;e<font color=white>c</font>or &#103;a<br><br><br>&#114;&#101;d<font color=white>e</font>&#112;rop<br>ses are <br>c&#104; em&#97;il<br>r&#116;her ag<br>d&#114;ess&#101;s <br>llection<br>s<font color=white>p</font>rec&#111;gn<br><br><br><b>AND</b>&nbsp;<b>J&#85;RI</b><br><br>or &#112;roc&#101;<br>&#97;&#114;ising <br>&nbsp;the law<br>he "Admi<br>&#101;&#101;n &#65;dmi<br>State.<font color=white>e</font>Y<br>dmi&#110; Sta<br>tion wit<br>ce &#111;&#102; pr<br><br><br><b>OR</b>&nbsp;<b>USE</b>&nbsp;<b>A</b><br><br>ocol a&#100;d<br>Id&#101;ntifi<br>&#100; &#116;o yo&#117;<br>or<font color=white>p</font>any<font color=white>h</font>&#114;<br><br>G, STORI<br>D&#69;NTIFIE<br>ICE.<br></font></td>\n<td><font face="courier"><b>OF</b>&nbsp;<b>USE</b>&nbsp;<br><br>nt ("the<br>e terms <br>visi&#116;&#105;&#110;g<br>he "Term<br>he Websi<!-- passenger prehistoric oscine --><br>s or o&#116;h<br>&nbsp;Terms o<br>mis&#115;ion <br><br><br><b>&#78;ON-HUMA</b><br><br>ccess th<br>but &#97;re<font color=white>d</font><br>st&#101;rs,<font color=white>s</font>o<!-- turbid aware trustee smelly wanting --><br>ther &#99;on<br><br><br>rietary<font color=white>d</font><br>provided<br>&nbsp;addres&#115;<br>ree that<br>substant<br>&#44; h&#97;rves<br>ized a&#115;<font color=white>e</font><br><br><br><b>SDICTION</b><br><br>eding br<br>from the<br>&nbsp;of the <br>n S&#116;ate"<br>n<font color=white>e</font>State <br>ou co&#110;se<br>&#116;e. &#89;ou <br>&#104; b&#114;e&#97;ch<br>&#111;&#99;ess re<br><br><br><b>ND</b>&nbsp;<b>ABUSE</b><br><br>ress &#114;e&#99;<br>er") if <br>r Inte&#114;n<br>eason&#46;<br><br>NG, TRAN<br>R C&#79;NSTI<br><br></font></td>\n<td><font face="courier"><br><br>&nbsp;W&#101;bs&#105;te<br>a&#114;e in a<br><font color=white>p</font>(in any<br>s of<font color=white>t</font>Se&#114;<br>te sh&#97;ll<br>erwise<font color=white>d</font>m<br>f Servi&#99;<br>of the<font color=white>s</font>&#111;<br><br><br><b>N</b>&nbsp;<b>V&#73;SITO</b><br><br>e Websit<br>n&#111;t li&#109;i<br>r any ot<br>t&#101;nt fro<br><br><br>intellec<br>&nbsp;for &#104;um<br>&nbsp;&#116;h&#101; Web<br>&nbsp;the com<!-- mathematicians tomato --><br>&#105;all&#121; di<br>ting, ga<br>a v&#105;olat<br><br><br>&nbsp;<br><br>ou&#103;ht by<br>&nbsp;Terms o<br>state of<br>) for t&#104;<br>resid&#101;nt<br>nt to th<br>c&#111;&#110;&#115;ent <br>es of<font color=white>t</font>t<!-- can -->h<br>gard&#105;ng <br><br><br>&nbsp;<br><br>orded. A<br>w&#101; suspe<br>&#101;t Proto<br><br><br>S&#70;ERRING<br>TUTES<font color=white>p</font>AN<br><br></font></td>\n<td><font face="courier"><br><br>") &#105;s pr<!-- butterfly --><br>ddi&#116;io<!-- scorpioid -->&#110; <br>&nbsp;m<!-- beefy consanguineous -->anner)<br>vice")&#46; <br>&nbsp;be cons<br>&#97;&#107;es &#117;s&#101;<br>e a&#114;e<br>wn&#101;r &#111;f <br><br><br><b>R&#83;</b>&nbsp;<br><br>e ap<!-- little black service -->ply <br>ted<!-- reeltoreel penitent -->&nbsp;to&#44; <br>her co&#109;p<br>m the We<br><br><br>&#116;ual pro<br>an visit<br>si&#116;e &#99;&#111;n<br>pilation<br>minishes<br>&#116;hering,<br>ion of t<br><br><br><br><br>&nbsp;such pa<br>f Servic<br>&nbsp;resi&#100;e<!-- atingle tenuous -->n<br>e W&#101;bsit<br>s entere<!-- attendant --><br>e<font color=white>i</font>j&#117;&#114;isd<br>&#116;o th&#101; v<br>ese T&#101;rm<br>actions <br><br><br><br><br>&#110;<font color=white>c</font>ema&#105;l <br>ct p&#111;ten<br>col add&#114;<br><br><br>&nbsp;TO A TH<br>&nbsp;ACCEPTA<br><br></font></td>\n<td><font face="courier"><br><br>&#111;vid&#101;&#100;<br>to a<!-- maintenance grumpy flying offtrack recipient -->ny<br>&nbsp;&#116;h<!-- family left defective -->e<br>Pl&#101;ase<br>&#105;de<!-- uncial -->r&#101;d<br>&nbsp;of<br><br>t&#104;e<br><br><br><br><br>to<br>web<br>&#117;ter<br>bsi&#116;e<br><br><br>pe&#114;ty.<br>ors<br>tains<br>,<br>&nbsp;the<br>&nbsp;a&#110;d/o&#114;<br>his<!-- excitement complex churchly herd insurgent --><br><br><br><br><br>r<!-- doubleblind lyrate -->ty<br>e<br>ce of<br>e as<br>d into<br>ic&#116;ion<br>enue<font color=white>e</font>in<br>s &#111;f<br>under<!-- daddy --><br><br><br><br><br>ad&#100;&#114;ess<br>t&#105;al<br>e&#115;s.<br><br><br>IRD<br>NCE A&#78;D<br><br></font></td>\n</tr>\n</table>\n<br>'; }
114
115
116 ?><?php 
117
118 // 
119 // PROXY SUPPORT
120 //  
121 // This honey pot script supports Proxies. If your webserver requires a proxy
122 // for outbound connections you may configure this honey pot's settings to use
123 // a proxy.
124 //
125 // For more information, visit: 
126 //     http://www.projecthoneypot.org/settings_help.php
127 //
128 //
129
130
131
132 function formatHTML($s) {
133     return str_replace('\n',"\n",$s);
134 }
135
136 function getDocType()       { return formatHTML(__DOC_TYPE1); }
137 function getHeadHTML1()     { return formatHTML(__HEAD1); }
138 function getRobotHTML()     { return formatHTML(__ROBOT1); }
139 function getNoCollectHTML() { return formatHTML(__NOCOLLECT1); }
140 function getHeadHTML2()     { return formatHTML(__HEAD2); }
141 function getTopHTML()       { return formatHTML(__TOP1); }
142 function getEmailHTML($method,$m) { 
143     switch ($method) {
144     case 0: return "";
145     case 1: return formatHTML(__EMAIL1A.$m.__EMAIL1B.$m.__EMAIL1C); 
146     case 2: return formatHTML(__EMAIL2A.$m.__EMAIL2B.$m.__EMAIL2C); 
147     case 3: return formatHTML(__EMAIL3A.$m.__EMAIL3B.$m.__EMAIL3C); 
148     case 4: return formatHTML(__EMAIL4A.$m.__EMAIL4B.$m.__EMAIL4C); 
149     case 5: return formatHTML(__EMAIL5A.$m.__EMAIL5B); 
150     case 6: return formatHTML(__EMAIL6A.$m.__EMAIL6B.$m.__EMAIL6C); 
151     case 7: return formatHTML(__EMAIL7A.$m.__EMAIL7B.$m.__EMAIL7C); 
152     case 8: return formatHTML(__EMAIL8A.$m.__EMAIL8B.$m.__EMAIL8C); 
153     case 9: return formatHTML(__EMAIL9A.$m.__EMAIL9B.$m.__EMAIL9C); 
154     }
155     return formatHTML(__EMAIL10A.$m.__EMAIL10B.$m.__EMAIL10C); 
156 }
157 function getLegalHTML()   { return formatHTML(__LEGAL1.(getLegalContent()).__LEGAL2); }
158 function getStyleHTML()   { return formatHTML(__STYLE1); }
159 function getVanityHTML()  { return formatHTML(__VANITY1); }
160 function getBottomHTML()  { return formatHTML(__BOTTOM1); }
161
162 function readSettings() {
163     $settings      = NULL;
164     $settings_file = dirname(__FILE__)."/phpot_settings.php";
165
166     if (is_file($settings_file) && is_readable($settings_file)) {
167         $fp = fopen($settings_file,"r");
168         $contents = "";
169         while (!feof($fp)) {
170             $contents .= fread($fp, 8192);
171         }
172         fclose($fp);
173
174         $lines = explode("\n",$contents);
175         foreach ($lines as $line) {
176             if (trim($line) !== "") {
177                 list ($setting, $value) = @explode(":",$line,2);
178                 switch ($setting) {
179                 case "proxy_host": 
180                     $settings["sock_host"] = trim($value);
181                     break;
182                 case "proxy_port":
183                     $settings["sock_port"] = trim($value);
184                     break;
185                 }
186                 if (trim($value) !== "") {
187                     $settings[trim($setting)] = trim($value);
188                 }
189             }
190         }
191     }
192
193     if (isset($settings["proxy_host"]) && isset($settings["proxy_port"]) && !isset($settings["use_proxy"])) {
194         $settings["use_proxy"] = "1";
195     } else {
196         $settings["use_proxy"] = "0";
197     }
198
199     if (isset($settings["proxy_user"]) && isset($settings["proxy_pass"]) && !isset($settings["proxy_auth"])) {
200         $settings["proxy_auth"] = "basic";
201     } else {
202         $settings["proxy_auth"] = "none";
203     }
204
205     if (!isset($settings["sock_host"])) $settings["sock_host"] = __REQUEST_HOST;
206     if (!isset($settings["sock_port"])) $settings["sock_port"] = __REQUEST_PORT;
207
208     return $settings;
209 }
210
211 function performRequest($request) {
212     $response = "";
213
214     $settings = readSettings();
215
216     if ($settings["use_proxy"] == "1") {
217         // POST via proxy
218         $post_url = "http://".__REQUEST_HOST.":".__REQUEST_PORT.__REQUEST_SCRIPT;
219
220         $head  = "POST ".$post_url." HTTP/1.0\r\n";
221         //$head .= "Host: ".__REQUEST_HOST."\r\n";
222         $head .= "User-Agent: PHPot ".__HPOT_TAG2."\r\n";
223         if ($settings["proxy_auth"] == "basic") {
224             $head .= "Proxy-Authorization: Basic ".base64_encode($settings["proxy_user"].":".$settings["proxy_pass"])."\r\n";
225         }
226         $head .= "Cache-Control: no-store, no-cache\r\n";
227         $head .= "Accept: */*\r\n";
228         $head .= "Pragma: no-cache\r\n";
229         $head .= "Content-Type: application/x-www-form-urlencoded\r\n";
230         $head .= "Content-Length: ".strlen($request)."\r\n";
231         $head .= "Connection: close\r\n\r\n";
232
233     } else {
234         // POST directly
235         $head  = "POST ".__REQUEST_SCRIPT." HTTP/1.1\r\n";
236         $head .= "Host: ".__REQUEST_HOST."\r\n";
237         $head .= "User-Agent: PHPot ".__HPOT_TAG2."\r\n";
238         $head .= "Content-Type: application/x-www-form-urlencoded\r\n";
239         $head .= "Content-Length: ".strlen($request)."\r\n";
240         $head .= "Connection: close\r\n\r\n";
241     }
242     
243     $errno  = NULL;
244     $errstr = NULL;
245     $fd = @fsockopen ($settings["sock_host"], $settings["sock_port"], $errno, $errstr, 20);
246
247     if (!$fd) {
248         // Socket Error
249         die("\n<BR>Unable to contact the Server. Are outbound connections disabled? (If a proxy is required for outbound traffic, you may configure the honey pot to use a proxy. For instructions, visit http://www.projecthoneypot.org/settings_help.php)<BR>\n");
250         return "-1";
251     } else {
252
253         fputs($fd,$head.$request);
254         while(!feof($fd)) {
255             $response .= fgets($fd,4096);
256         }
257         fclose($fd);
258     }
259
260     return $response;
261 }
262
263 function prepareRequest() {
264     $postvars          = array();
265     $postvars["tag1"]  = __HPOT_TAG1;
266     $postvars["tag2"]  = __HPOT_TAG2;
267     $postvars["tag3"]  = __HPOT_TAG3;
268     if (!($handle = fopen(__FILE__,"r"))) {
269         die("\n<BR>Unable to read contents of ".__FILE__." for hashing<BR>\n");
270         return -2;
271     }
272     $contents = "";
273     while (!feof($handle)) {
274         $contents .= fread($handle, 8192);
275     }
276     fclose($handle);
277     $postvars["tag4"]   = md5(preg_replace("/[^a-zA-Z0-9]/","",$contents));
278     $postvars["ip"]    = $_SERVER["REMOTE_ADDR"];
279     $postvars["svrn"]  = $_SERVER["SERVER_NAME"];  
280     $postvars["svp"]   = $_SERVER["SERVER_PORT"];  
281     $postvars["svip"]  = isset($_SERVER["SERVER_ADDR"]) ? $_SERVER["SERVER_ADDR"] : "";
282     $postvars["rquri"]   = isset($_SERVER["REQUEST_URI"]) ? $_SERVER["REQUEST_URI"] : "";
283     $postvars["phpself"] = str_replace(' ','%20',$_SERVER["PHP_SELF"]);
284     $postvars["version"] = "php-".phpversion();
285     $postvars["sn"]     = str_replace(' ','%20',$_SERVER["SCRIPT_NAME"]);
286     $postvars["ref"]    = isset($_SERVER["HTTP_REFERER"]) ? $_SERVER["HTTP_REFERER"] : "";
287     $postvars["uagnt"]  = isset($_SERVER["HTTP_USER_AGENT"]) ? $_SERVER["HTTP_USER_AGENT"] : "";
288     if (isset($_POST) && count($_POST) > 0) {
289         $postvars["has_post"] = count($_POST);
290         for (reset($_POST);list($k,$v) = each($_POST);) {
291             $postvars["post|".$k] = $v;
292         }
293         reset($_POST);
294     }
295     if (isset($_GET) && count($_GET) > 0) {
296         $postvars["has_get"] = count($_GET);
297         for (reset($_GET);list($k,$v) = each($_GET);) {
298             $postvars["get|".$k] = $v;
299         }
300         reset($_GET);
301     }
302     if (isset($_SERVER) && count($_SERVER) > 0) {
303         $i = 0;
304         for (reset($_SERVER);list($k,$v) = each($_SERVER);) {
305             if ($k !== "HTTP_COOKIE" && preg_match('/^HTTP_/',$k)) {
306                 $postvars["header|".$k] = $v;
307                 $i++;
308             }
309         }
310         $postvars["has_header"] = $i;
311         reset($_SERVER);
312     }
313
314     return $postvars;
315 }
316
317 function transcribeResponse(& $response) {
318     $settings  = NULL;
319     $arr       = explode("\n",$response);
320     $isParam   = FALSE;
321
322     
323     for ($i=0;list(,$v)=each($arr);$i++) {
324         if ($v == "<END>")   $isParam = FALSE;
325
326         if ($isParam) {          
327             $pieces = explode("=",$v,2);
328             $settings[$pieces[0]] = urldecode($pieces[1]);
329         }
330         if ($v == "<BEGIN>") $isParam = TRUE;
331     }
332     
333
334     if (isset($settings["directives"])) {
335         $settings["directives"] = explode(",",$settings["directives"]);
336     }
337
338     return $settings;
339 }
340
341 header("Cache-Control: no-store, no-cache");
342 header("Pragma: no-cache");
343
344 $response  = "";
345 $request   = "";
346 $post      = prepareRequest();
347
348 for (reset($post);list($k,$v) = each($post);) {
349     $request .= "&".urlencode($k)."=".urlencode(stripslashes($v));
350 }
351 $request    = substr($request,1);
352 $response   = performRequest($request);
353 if ($response == "-1") {
354     exit();
355 }
356 $settings   = transcribeResponse($response);
357
358 $directives   = $settings["directives"];
359 $email        = isset($settings["email"]) ? $settings["email"] : "";
360 $emailmethod  = isset($settings["emailmethod"]) ? $settings["emailmethod"] : 0;
361
362
363
364
365 ?>
366 <?php echo (isset($directives[0]) && $directives[0]==1) ? getDocType()    : ""; ?>
367 <?php echo (isset($settings["injDocType"])) ? formatHTML($settings["injDocTypeMsg"]) : ""; ?>
368 <?php echo (isset($directives[1]) && $directives[1]==1) ? getHeadHTML1()   : ""; ?>
369 <?php echo (isset($settings["injHead1HTML"])) ? formatHTML($settings["injHead1HTMLMsg"]) : ""; ?>
370 <?php echo (isset($directives[8]) && $directives[8]==1) ? getRobotHTML()   : ""; ?>
371 <?php echo (isset($settings["injRobotHTML"])) ? formatHTML($settings["injRobotHTMLMsg"]) : ""; ?>
372 <?php echo (isset($directives[9]) && $directives[9]==1) ? getNoCollectHTML()   : ""; ?>
373 <?php echo (isset($settings["injNoCollectHTML"])) ? formatHTML($settings["injNoCollectHTMLMsg"]) : ""; ?>
374 <?php echo (isset($directives[1]) && $directives[1]==1) ? getHeadHTML2()   : ""; ?>
375 <?php echo (isset($settings["injHead2HTML"])) ? formatHTML($settings["injHead2HTMLMsg"]) : ""; ?>
376 <?php echo (isset($directives[2]) && $directives[2]==1) ? getTopHTML()    : ""; ?>
377 <?php echo (isset($settings["injTopHTML"])) ? formatHTML($settings["injTopHTMLMsg"]) : ""; ?>
378 <?php
379    if (isset($settings["actMsgOn"])) { 
380        echo formatHTML($settings["actMsg"]); 
381    }
382    if (isset($settings["errMsgOn"])) { 
383        echo formatHTML($settings["errMsg"]); 
384    }
385    if (isset($settings["customMsgOn"])) { 
386        echo formatHTML($settings["customMsg"]); 
387    }
388 ?>
389 <?php echo (isset($directives[3]) && $directives[3]==1) ? getLegalHTML()  : ""; ?>
390 <?php echo (isset($settings["injLegalHTML"])) ? formatHTML($settings["injLegalHTMLMsg"]) : ""; ?>
391 <?php
392    if (isset($settings["altLegalOn"])) { 
393        echo formatHTML($settings["altLegalMsg"]); 
394    } 
395 ?>
396 <?php echo (isset($directives[4]) && $directives[4]==1) ? getEmailHTML(intval($emailmethod),$email)  : ""; ?>
397 <?php echo (isset($settings["injEmailHTML"])) ? formatHTML($settings["injEmailHTMLMsg"]) : ""; ?>
398 <?php echo (isset($directives[5]) && $directives[5]==1) ? getStyleHTML()  : ""; ?>
399 <?php echo (isset($settings["injStyleHTML"])) ? formatHTML($settings["injStyleHTMLMsg"]) : ""; ?>
400 <?php echo (isset($directives[6]) && $directives[6]==1) ? getVanityHTML() : ""; ?>
401 <?php echo (isset($settings["injVanityHTML"])) ? formatHTML($settings["injVanityHTMLMsg"]) : ""; ?>
402 <?php
403    if (isset($settings["altVanityOn"])) {
404         echo formatHTML($settings["altVanityMsg"]);
405     }
406 ?>
407 <?php echo (isset($directives[7]) && $directives[7]==1) ? getBottomHTML() : ""; ?>
408 <?php echo (isset($settings["injBottomHTML"])) ? formatHTML($settings["injBottomHTMLMsg"]) : ""; ?>