3 // PROJECT HONEY POT ADDRESS DISTRIBUTION SCRIPT
4 // For more information visit: http://www.projecthoneypot.org/
5 // Copyright (C) 2004-2009, Unspam Technologies, Inc.
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.
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.
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
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
27 // http://www.projecthoneypot.org/terms_of_service_use.php
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 ***
33 // Generated On: Mon, 14 Sep 2009 13:25:40 -0400
34 // For Domain: www.mxchange.org
38 // *** DISCONNECT INSTRUCTIONS ***
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.
48 // *** START CUT HERE ***
50 define('__REQUEST_HOST', 'hpr4.projecthoneypot.org');
51 define('__REQUEST_PORT', '80');
52 define('__REQUEST_SCRIPT','/cgi/serve.php');
54 // *** FINISH CUT HERE ***
57 define('__HPOT_TAG1', '7b8a66bc336b69c9af3e1af568a2b17d');
58 define('__HPOT_TAG2', 'ec4aa0ce192bb26dc2a4b650b0247c5f');
59 define('__HPOT_TAG3', '34aa2473d1aa4705f92165addfe297ff');
61 define('__CLASS_STYLE_1','phik');
62 define('__CLASS_STYLE_2','wruth');
64 define('__DIV1', 'ti3esl9tr4pr');
66 define('__VANITY_L1', 'MEMBER OF PROJECT HONEY POT');
67 define('__VANITY_L2', 'Spam Harvester Protection Network');
68 define('__VANITY_L3', 'provided by Unspam');
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>Wordforword</title>\n</head>\n');
73 define('__ROBOT1', '<meta name="robots" content="noarchive,noindex">\n<meta name="robots" content="follow">\n');
74 define('__NOCOLLECT1', '<meta name="no-email-collection" content="/">\n');
75 define('__TOP1', '<body>\n<div id="multilane" 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');
113 function getLegalContent() { return '<table cellpadding="0" cellspacing="0" border="0">\n<tr>\n<td style="font-family: monospace;"><b><font color=white>c</font></b> <br> <br>The <br>to<!-- orchestra statute planner --> y<br>othe<br>Webs<br>read<br>agen<br>them<br>non-<br>Webs<br><br> <br> <br>Spec<br>Non-<br>spid<br>prog<br>auto<br><br>Emai<br>It i<br>alon<br>has <br>stor<br>valu<br>stor<br>agre<br><br> <br> <br>Each<br>agai<br>("Ju<br>the <br>such<br>and<font color=white>g</font><br>of f<br>any <br>Serv<br>the <br><br> <br><font color=white>i</font><br>You <br>may <br>abus<br>Visi<br><br>V<!-- sidelong scale -->ISI<br>PART<br>SUBS<br></td>\n<td style="font-family: monospace;"> <br><br>webs<br>ou s<br>r te<br>ite<font color=white>i</font><br><font color=white>f</font>the<br>ts o<br>. Th<br>tran<br>ite.<br><br> <br><br>ial <br>Huma<br>ers,<br>rams<br>mati<br><br>l ad<br>s re<br>e. Y<br>a<!-- caution inverse nose --> va<br>age,<br>e of<br>ing <br>emen<br><br> <br><br> par<br>nst <br>dici<br>regi<!-- cold --><br><font color=white>k</font>law<br>perf<br>eder<br>acti<br>ice.<br>abov<br><br> <b><font color=white>t</font></b> <br><br>cons<br>appe<br>e. T<br>tors<br><br>TORS<br>Y OR<br>EQUE<br></td>\n<td style="font-family: monospace;"> <b><font color=white>o</font></b> <br><br>ite <br>ubje<br>rms <br>you <br>m<font color=white>k</font>ca<br>f th<br>e ac<br>sfer<br><br><br> <b><font color=white>h</font></b> <br><br>rest<br>n<font color=white>f</font>Vi<!-- struggle potted delivery --><br> bot<br> des<br>call<br><br>dres<br>cogn<br>ou a<br>lue<font color=white>i</font><br> and<br> the<br>this<br>t an<br><br> <br><br>ty a<br>the <br>al A<br>ster<br>s ar<br>orme<br>al a<br>on b<br> You<br>e<font color=white>f</font>ag<br><br> <br><br>ent <br>ar s<br>he I<br> agr<br><br> AG<!-- widespread eels dust nonsense -->R<br> SEN<br>NT B<br></td>\n<td style="font-family: monospace;"> <br><br>from<br>ct t<br>gove<br>acce<br>refu<br>e<!-- it recitative --> in<br>cess<br>able<br><br><br> <b><font color=white>k</font>S</b><br><br>rict<br>sito<br>s, i<br>i<!-- intracellular critic -->gne<br>y.<br><br>ses<!-- motion brunet yacht --> <br>ized<br>ckno<br>not <br>/or <br>se a<br> Web<br>d ex<br><br> <br><br>gree<br>othe<br>ctio<br>ed<font color=white>g</font>A<br>e ap<br>d en<br>nd s<br>roug<br> con<br>reem<br><br><b><font color=white>a</font></b> <br><br>to h<br>omew<br>dent<br>ee n<br><br>EE T<br>DING<br>REAC<br></td>\n<td style="font-family: monospace;"> <b><font color=white>f</font></b> <br><br><font color=white>g</font>wh<!-- kid party explosive sovereign republican -->i<br>o th<br>rnin<br>pt<font color=white>o</font>t<br>lly.<br>divi<br> rig<!-- herrings physicians --><br> wit<br><br><br><b>PECI</b><br><br>ions<br>rs. <br>ndex<br>d to<br><br><br>on t<br> tha<br>wled<br>less<br>dist<br>ddre<br>site<br>pres<br><br> <br><br>s th<br>r in<br>n") <br>dmin<br>plie<br>tire<br>tate<br>ht a<br>sent<br>ent.<br><br> <br><br>avin<br>here<br>ifie<br>o<!-- fair relativistic -->t t<br><br>HAT <br> ANY<br>H OF<br></td>\n<td style="font-family: monospace;"> <br><br>ch y<br>e fo<br>g ac<br>hese<br> Any<br>dual<br>hts <br>hout<br><br><br><b>AL</b> <b>L</b><br><br><font color=white>s</font>on<font color=white>d</font><br>Non-<br>ers,<br> acc<br><br><br>his<font color=white>d</font><br>t<font color=white>o</font>th<br>ge a<br> tha<br>ribu<br>sses<br>\'s e<br>sly <br><br><b><font color=white>d</font></b> <b><font color=white>a</font></b><br><br>at a<br> con<br>shal<br>istr<br>d to<br>ly w<br> co<!-- paramilitary -->u<br>gain<br> to <br><br><br> <b><font color=white>s</font></b><br><br>g yo<br> on <br>r is<br>o us<br><br>HARV<br> MES<br> THE<!-- software income --><br></td>\n<td style="font-family: monospace;"><b><font color=white>k</font></b> <b>T</b><br><br>ou a<br>llow<br>cess<br> ter<br> Non<br>(s) <br>gran<br> the<br><br><br><b>ICEN</b><br><br>a vi<br>Huma<br> ro<!-- small builder -->b<br>es<!-- freewheeling -->s,<br><br><br>site<br>e<!-- naked phone jungle -->se<font color=white>i</font><br>nd a<br>n US<br>ti<!-- blacktie oleaginous text complete -->on<br>. In<br>mail<br>proh<br><br> <b>APP</b><br><br>ny s<br>nect<br>l b<!-- plaster unconscious -->e<br>ativ<br> agr<br>ithi<br>rts<font color=white>c</font><br>st h<br>elec<br><br><br><b>RECO</b><br><br>u<!-- prejudice lap -->r I<br>this<br> uni<br>e th<br><br>ESTI<br>SAGE<br>SE T<br></td>\n<td style="font-family: monospace;"><b>ERMS</b><br><br>cces<br>ing <br> to <br>ms<font color=white>o</font>a<br>-Hum<br>who <br>ted<font color=white>a</font><br> exp<br><br><br><b>SE</b> <b>R</b><br><br>sito<br>n Vi<br>ots,<br> rea<br><br><br> are<br>emai<br>gree<!-- rolypoly seer injury --><br> $50<br> of <br>tent<br> add<br>ibit<br><br><b>LICA</b><br><br>uit,<br>ion <br> gov<br>e Co<br>eeme<br>n th<br>with<br>im i<br>tron<br><br><br><b>RDS</b> <br><br>nter<br> pag<br>quel<br>is a<br><br>NG, <br>(S) <br>ERMS<br></td>\n<td style="font-family: monospace;"> <b>AND</b><br><br>sed <br>cond<br>the <br>nd c<br>an V<br>cont<br>to<font color=white>h</font>y<br>ress<br><br><br><b>ESTR</b><br><br>r\'s <br>sito<br> cra<br>d, c<br><br><br> con<br>l<font color=white>a</font>ad<br><font color=white>s</font>tha<br>. Yo<br>thes<br>iona<br>ress<br>ed.<br><br><b>BLE</b> <br><br> act<br>with<br>erne<br>nt<!-- foolish necessity atonal increase -->ac<br>nts <br>e Ad<br>in t<br>n co<br>ic s<!-- culture circuit --><br><br><br><b>OF</b> <b>V</b><br><br>net <br>e (t<br>y ma<br>ddre<br><br>GATH<br>TO T<br><font color=white>a</font>OF <br></td>\n<td style="font-family: monospace;"> <b>CON</b><br><br>this<br>itio<br>Webs<br>ondi<br>isit<br>rols<br>ou u<br> wri<br><br><br><b>ICTI</b><br><br>lice<br>rs i<br>wler<br>ompi<br><br><br>side<br>dres<br>t ea<br>u fu<br>e<font color=white>a</font>ad<br>l co<br>es<font color=white>o</font>i<br><br><br><b>LAW</b> <br><br>ion<font color=white>k</font><br> or <br>d by<br>t (t<br>betw<br>min <br>he A<br>nnec<br>ervi<br><br><br><b>ISIT</b><br><br>Prot<br>he<font color=white>t</font>"<br>tche<br>ss f<br><br>ERIN<br>HE I<br>SERV<br></td>\n<td style="font-family: monospace;"><b>DITI</b><br><br> agr<br>ns. <br>ite.<br>tion<br>ors <br>, au<!-- prime drop --><br>nder<br>tt<!-- threeway gubernatorial estate garage knightly -->en<br><br><br><b>ONS</b> <br><br>nse<font color=white>a</font><br>nclu<br>s, h<br>le o<br><br><br>r<!-- nonresident -->ed <br>ses <br>ch e<br>rthe<br>dres<br>llec<br>s re<br><br><br><b>AND</b> <br><br>or p<br>aris<br> the<br>he "<br>een <br>Stat<br>dmin<br>tion<br>ce o<br><br><br><b>OR</b> <b>U</b><br><br>ocol<br>Iden<br>d to<br>or a<br><br>G,<!-- crime subjective --> S<br>DENT<br>ICE.<br></td>\n<td style="font-family: monospace;"><b>ONS</b> <br><br>eeme<br>Thes<br> By<font color=white>i</font><br>s (t<br>to t<br>thor<br> t<!-- pretty agitato provincial handle network -->he<br> per<br><br><br><b>FO<!-- spiritual cutaway -->R<font color=white>k</font></b><br><br>to a<br>de, <br>arve<br>r ga<br><br><br>prop<br>are <br>mail<br>r ag<br>ses<font color=white>p</font><br>tion<br>cogn<br><br><br><b>JURI</b><br><br>roce<br>ing <br> law<br>Admi<br>Adm<!-- callous glimpse -->i<br>e. Y<br> Sta<br> wit<br>f pr<!-- smelly orthodox --><br><br><br><b>SE</b> <b>A</b><br><br><font color=white>h</font>add<br>tifi<br> you<br>ny r<br><br>TORI<br>IFIE<br><br></td>\n<td style="font-family: monospace;"><b>OF</b> <b>U</b><br><br>nt (<br>e te<br>visi<br>he "<!-- funny miss salvation --><br>he<!-- projection recruitment advice --> W<br>s or<br> Ter<br>miss<br><br><br><b>NON-</b><br><br>cces<br>but<font color=white>t</font><br>ster<br>ther<br><br><br>riet<br>prov<br><font color=white>e</font>add<br>ree <br>subs<br>, ha<br>ized<br><br><br><b>SDIC</b><br><br>edin<br>from<br> of <br>n St<br>n St<br>ou c<br>te. <br>h br<br>oces<br><br><br><b>ND<font color=white>o</font>A</b><br><br>ress<br>er")<br>r In<br>easo<br><br>NG, <br>R CO<br><br></td>\n<td style="font-family: monospace;"><b>SE</b> <br><br>"the<br>rms <br>ting<br>Term<br>ebsi<br> oth<br>ms o<br>ion <br><br><br><b>HUMA</b><br><br>s th<br>are<font color=white>e</font><br>s, o<br> con<br><br><br>ary <br>ided<br>ress<br>that<br>tant<br>rves<br> as <br><br><br><b>TION</b><br><br>g br<br> the<br>the <br>ate"<br>ate<font color=white>i</font><br>onse<br>You <br>each<br>s re<br><br><br><b>BUSE</b><br><br><font color=white>k</font>rec<br> if <br>tern<br>n.<br><br>TRAN<br>NSTI<br><br></td>\n<td style="font-family: monospace;"><br><br> Web<br>are <br> (in<br>s of<br>te s<br>erwi<br>f Se<br>of t<br><br><br><b>N</b> <b>VI</b><br><br>e We<br>not <br>r an<br>te<!-- unaccountable -->nt<br><br><br>inte<br> for<br> the<br><font color=white>h</font>the<br>iall<br>ting<br>a vi<br><br><br> <br><br>ou<!-- sweeping fetal funeral -->gh<br> Ter<br>stat<br>) fo<br>resi<br>nt t<br>cons<br>es o<br>gard<br><br><br> <br><br>orde<br>we s<br>et P<br><br><br>SFER<br>TUTE<br><br></td>\n<td style="font-family: monospace;"><br><br>site<br>in a<br> any<br> Ser<br>hall<br>se m<br>rvic<br>he o<br><br><br><b>SITO</b><br><br>bsit<br>limi<br>y<font color=white>f</font>ot<br> fro<br><br><br>llec<br> hum<br> Web<br> com<br>y di<br>, ga<br>olat<br><br><br><br><br>t by<br>ms o<br>e of<br>r th<br>dent<br>o th<br>ent<!-- plated short illtimed convenient column --> <br>f<font color=white>o</font>th<br>ing <br><br><br><br><br>d. A<br>uspe<br>roto<br><br><br>RING<br>S AN<br><br></td>\n<td style="font-family: monospace;"><br><br>") i<!-- great stance --><br>ddit<br> man<br>vice<br><font color=white>g</font>be <br>akes<br>e ar<br>wner<br><br><br><b>RS</b> <br><br>e ap<br>ted <br>her <br>m th<br><br><br>tual<br>an<font color=white>a</font>v<br>site<br>pila<br>mini<br>ther<br>ion <br><br><br><br><br><font color=white>e</font>suc<br>f Se<br><font color=white>f</font>res<br>e We<br>s<font color=white>g</font>en<br>e ju<br>to t<br>ese <br>act<!-- cursed stability offlimits -->i<br><br><br><br><br>n em<br>ct<font color=white>o</font>p<br>col <br><br><br> TO <br> ACC<br><br></td>\n<td style="font-family: monospace;"><br><br>s pr<br>ion <br>ner)<br>"). <br>cons<br> use<br>e<br> of <br><br><br><br><br>ply <br>to, <br>comp<br>e We<br><br><br> pro<br>isit<br> con<br>tion<br>shes<br>ing,<br>of t<br><br><br><br><br>h pa<br>rvic<br>iden<br>bsit<br>tere<br>risd<br>h<!-- radical astigmatic -->e v<br>Term<br>ons<font color=white>d</font><br><br><br><br><br>ail <br>oten<br>addr<br><br><br>A<font color=white>g</font>TH<br>EPTA<br><br></td>\n<td style="font-family: monospace;"><br><br>ovid<br>to a<br> the<br>Plea<br>ider<br> of<br><br>the<br><br><br><br><br>to<br>web<br>uter<br>bsit<br><br><br>pert<br>ors<br>tain<br>,<br> the<br> and<br>his<br><br><br><br><br>rty<br>e<br>ce o<br>e as<br>d in<br>icti<br>enue<br>s of<br>un<!-- occupational hawks sound -->de<br><br><br><br><br>addr<br>tial<br>ess.<br><br><br>IRD<br>NCE <br><br></td>\n<td style="font-family: monospace;"><br><br>ed<br>ny<br><br>se<br>ed<br><br><br><br><br><br><br><br><br><br><br>e<br><br><br>y.<br><br>s<br><br><br>/or<br><br><br><br><br><br><br><br>f<br><br>t<!-- contradictory mayor halfway threshold unchanged -->o<br>on<br><font color=white>c</font>in<br><br>r<br><br><br><br><br>ess<br><br><br><br><br><br>AN<!-- low odd unalloyed -->D<br><br></td>\n</tr>\n</table>\n<br>'; }
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
125 // For more information, visit:
126 // http://www.projecthoneypot.org/settings_help.php
132 function formatHTML($s) {
133 return str_replace('\n',"\n",$s);
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) {
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);
155 return formatHTML(__EMAIL10A.$m.__EMAIL10B.$m.__EMAIL10C);
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); }
162 function readSettings() {
164 $settings_file = dirname(__FILE__)."/phpot_settings.php";
166 if (is_file($settings_file) && is_readable($settings_file)) {
167 $fp = fopen($settings_file,"r");
170 $contents .= fread($fp, 8192);
174 $lines = explode("\n",$contents);
175 foreach ($lines as $line) {
176 if (trim($line) !== "") {
177 list ($setting, $value) = @explode(":",$line,2);
180 $settings["sock_host"] = trim($value);
183 $settings["sock_port"] = trim($value);
186 if (trim($value) !== "") {
187 $settings[trim($setting)] = trim($value);
193 if (isset($settings["proxy_host"]) && isset($settings["proxy_port"]) && !isset($settings["use_proxy"])) {
194 $settings["use_proxy"] = "1";
196 $settings["use_proxy"] = "0";
199 if (isset($settings["proxy_user"]) && isset($settings["proxy_pass"]) && !isset($settings["proxy_auth"])) {
200 $settings["proxy_auth"] = "basic";
202 $settings["proxy_auth"] = "none";
205 if (!isset($settings["sock_host"])) $settings["sock_host"] = __REQUEST_HOST;
206 if (!isset($settings["sock_port"])) $settings["sock_port"] = __REQUEST_PORT;
211 function performRequest($request) {
214 $settings = readSettings();
216 if ($settings["use_proxy"] == "1") {
218 $post_url = "http://".__REQUEST_HOST.":".__REQUEST_PORT.__REQUEST_SCRIPT;
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";
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";
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";
245 $fd = @fsockopen ($settings["sock_host"], $settings["sock_port"], $errno, $errstr, 20);
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");
253 fputs($fd,$head.$request);
255 $response .= fgets($fd,4096);
263 function prepareRequest() {
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");
273 while (!feof($handle)) {
274 $contents .= fread($handle, 8192);
277 $postvars["tag4"] = md5(ereg_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;
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;
306 function transcribeResponse(& $response) {
308 $arr = explode("\n",$response);
312 for ($i=0;list(,$v)=each($arr);$i++) {
313 if ($v == "<END>") $isParam = FALSE;
316 $pieces = explode("=",$v,2);
317 $settings[$pieces[0]] = urldecode($pieces[1]);
319 if ($v == "<BEGIN>") $isParam = TRUE;
323 if ($settings["directives"]) {
324 $settings["directives"] = explode(",",$settings["directives"]);
330 header("Cache-Control: no-store, no-cache");
331 header("Pragma: no-cache");
335 $post = prepareRequest();
337 for (reset($post);list($k,$v) = each($post);) {
338 $request .= "&".urlencode($k)."=".urlencode(stripslashes($v));
340 $request = substr($request,1);
341 $response = performRequest($request);
342 if ($response == "-1") {
345 $settings = transcribeResponse($response);
347 $directives = $settings["directives"];
348 $email = isset($settings["email"]) ? $settings["email"] : "";
349 $emailmethod = isset($settings["emailmethod"]) ? $settings["emailmethod"] : 0;
355 <?php echo (isset($directives[0]) && $directives[0]==1) ? getDocType() : ""; ?>
356 <?php echo (isset($settings["injDocType"])) ? formatHTML($settings["injDocTypeMsg"]) : ""; ?>
357 <?php echo (isset($directives[1]) && $directives[1]==1) ? getHeadHTML1() : ""; ?>
358 <?php echo (isset($settings["injHead1HTML"])) ? formatHTML($settings["injHead1HTMLMsg"]) : ""; ?>
359 <?php echo (isset($directives[8]) && $directives[8]==1) ? getRobotHTML() : ""; ?>
360 <?php echo (isset($settings["injRobotHTML"])) ? formatHTML($settings["injRobotHTMLMsg"]) : ""; ?>
361 <?php echo (isset($directives[9]) && $directives[9]==1) ? getNoCollectHTML() : ""; ?>
362 <?php echo (isset($settings["injNoCollectHTML"])) ? formatHTML($settings["injNoCollectHTMLMsg"]) : ""; ?>
363 <?php echo (isset($directives[1]) && $directives[1]==1) ? getHeadHTML2() : ""; ?>
364 <?php echo (isset($settings["injHead2HTML"])) ? formatHTML($settings["injHead2HTMLMsg"]) : ""; ?>
365 <?php echo (isset($directives[2]) && $directives[2]==1) ? getTopHTML() : ""; ?>
366 <?php echo (isset($settings["injTopHTML"])) ? formatHTML($settings["injTopHTMLMsg"]) : ""; ?>
368 if (isset($settings["actMsgOn"])) {
369 echo formatHTML($settings["actMsg"]);
371 if (isset($settings["errMsgOn"])) {
372 echo formatHTML($settings["errMsg"]);
374 if (isset($settings["customMsgOn"])) {
375 echo formatHTML($settings["customMsg"]);
378 <?php echo (isset($directives[3]) && $directives[3]==1) ? getLegalHTML() : ""; ?>
379 <?php echo (isset($settings["injLegalHTML"])) ? formatHTML($settings["injLegalHTMLMsg"]) : ""; ?>
381 if (isset($settings["altLegalOn"])) {
382 echo formatHTML($settings["altLegalMsg"]);
385 <?php echo (isset($directives[4]) && $directives[4]==1) ? getEmailHTML(intval($emailmethod),$email) : ""; ?>
386 <?php echo (isset($settings["injEmailHTML"])) ? formatHTML($settings["injEmailHTMLMsg"]) : ""; ?>
387 <?php echo (isset($directives[5]) && $directives[5]==1) ? getStyleHTML() : ""; ?>
388 <?php echo (isset($settings["injStyleHTML"])) ? formatHTML($settings["injStyleHTMLMsg"]) : ""; ?>
389 <?php echo (isset($directives[6]) && $directives[6]==1) ? getVanityHTML() : ""; ?>
390 <?php echo (isset($settings["injVanityHTML"])) ? formatHTML($settings["injVanityHTMLMsg"]) : ""; ?>
392 if (isset($settings["altVanityOn"])) {
393 echo formatHTML($settings["altVanityMsg"]);
396 <?php echo (isset($directives[7]) && $directives[7]==1) ? getBottomHTML() : ""; ?>
397 <?php echo (isset($settings["injBottomHTML"])) ? formatHTML($settings["injBottomHTMLMsg"]) : ""; ?>