<?php

//  PROJECT HONEY POT ADDRESS DISTRIBUTION SCRIPT
//  For more information visit: http://www.projecthoneypot.org/
//  Copyright (C) 2004-2013, Unspam Technologies, Inc.
//  
//  This program is free software; you can redistribute it and/or modify
//  it under the terms of the GNU General Public License as published by
//  the Free Software Foundation; either version 2 of the License, or
//  (at your option) any later version.
//  
//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.
//  
//  You should have received a copy of the GNU General Public License
//  along with this program; if not, write to the Free Software
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
//  02111-1307  USA
//  
//  If you choose to modify or redistribute the software, you must
//  completely disconnect it from the Project Honey Pot Service, as
//  specified under the Terms of Service Use. These terms are available
//  here:
//  
//  http://www.projecthoneypot.org/terms_of_service_use.php
//  
//  The required modification to disconnect the software from the
//  Project Honey Pot Service is explained in the comments below. To find the
//  instructions, search for:  *** DISCONNECT INSTRUCTIONS ***
//  
//  Generated On: Tue, 26 Mar 2013 02:23:01 -0700
//  For Domain: download.cciu.org
//  
//  

//  *** DISCONNECT INSTRUCTIONS ***
//  
//  You are free to modify or redistribute this software. However, if
//  you do so you must disconnect it from the Project Honey Pot Service.
//  To do this, you must delete the lines of code below located between the
//  *** START CUT HERE *** and *** FINISH CUT HERE *** comments. Under the
//  Terms of Service Use that you agreed to before downloading this software,
//  you may not recreate the deleted lines or modify this software to access
//  or otherwise connect to any Project Honey Pot server.
//  
//  *** START CUT HERE ***
//  
define('__REQUEST_HOST', 'hpr4.projecthoneypot.org');
define('__REQUEST_PORT', '80');
define('__REQUEST_SCRIPT','/cgi/serve.php');
//  
//  *** FINISH CUT HERE ***
//  

define('__HPOT_TAG1',    '35f793d9cb86de7f826dbc312e66cd7b');
define('__HPOT_TAG2',    '6c0e03dba243325ebc85c50b011d2df0');
define('__HPOT_TAG3',    '34aa2473d1aa4705f92165addfe297ff');

define('__CLASS_STYLE_1','swucles');
define('__CLASS_STYLE_2','prezabr');

define('__DIV1',         'xathuh3thos');

define('__VANITY_L1',    'MEMBER OF PROJECT HONEY POT');
define('__VANITY_L2',    'Spam Harvester Protection Network');
define('__VANITY_L3',    'provided by Unspam');

define('__DOC_TYPE1',    '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\n');
define('__HEAD1',        '<html>\n<head>\n');
define('__HEAD2',        '<title>desire download.cciu.org midnight</title>\n</head>\n');
define('__ROBOT1',       '<meta name="robots" content="noindex,noarchive,follow">\n');
define('__NOCOLLECT1',   '<meta name="no-email-collection" content="/">\n');
define('__TOP1',         '<body>\n<div align="center">\n');
define('__EMAIL1A',      '<a href="mailto:');
define('__EMAIL1B',      '" style="display: none;">');
define('__EMAIL1C',      '</a>');
define('__EMAIL2A',      '<a href="mailto:');
define('__EMAIL2B',      '" style="display:none;">');
define('__EMAIL2C',      '</a>');
define('__EMAIL3A',      '<a style="display: none;" href="mailto:');
define('__EMAIL3B',      '">');
define('__EMAIL3C',      '</a>');
define('__EMAIL4A',      '<a style="display:none;" href="mailto:');
define('__EMAIL4B',      '">');
define('__EMAIL4C',      '</a>');
define('__EMAIL5A',      '<a href="mailto:');
define('__EMAIL5B',      '"></a>');
define('__EMAIL5C',      '..');
define('__EMAIL6A',      '<span style="display: none;"><a href="mailto:');
define('__EMAIL6B',      '">');
define('__EMAIL6C',      '</a></span>');
define('__EMAIL7A',      '<span style="display:none;"><a href="mailto:');
define('__EMAIL7B',      '">');
define('__EMAIL7C',      '</a></span>');
define('__EMAIL8A',      '<!-- <a href="mailto:');
define('__EMAIL8B',      '">');
define('__EMAIL8C',      '</a> -->');
define('__EMAIL9A',      '<div id="'.__DIV1.'"><a href="mailto:');
define('__EMAIL9B',      '">');
define('__EMAIL9C',      '</a></div><br><script language="JavaScript" type="text/javascript">document.getElementById(\''.__DIV1.'\').innerHTML=\'\';</script>');
define('__EMAIL10A',     '<a href="mailto:');
define('__EMAIL10B',     '"><!-- ');
define('__EMAIL10C',     ' --></a>');
define('__LEGAL1',       '');
define('__LEGAL2',       '\n');
define('__STYLE1',       '\n<style>a.'.__CLASS_STYLE_1.'{color:#FFF;font:bold 10px arial,sans-serif;text-decoration:none;}</style>');
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');
define('__BOTTOM1',      '</div>\n</body>\n</html>\n');


function getLegalContent() { return '<table border="0" cellpadding="0" cellspacing="0">\n<tr>\n<td><tt><b><font color=white>c</font></b>&nbsp; &nbsp; <br>&nbsp;<br>The w<br>&#116;o yo<br>ot&#104;er<br>Websi<br>read <br>agent<br>them.<br>non-t<br>Websi<br><br>&nbsp;&nbsp; <b><font color=white>i</font></b>&nbsp;<br>&nbsp;<br>Sp&#101;ci<br>N&#111;n-H<br>sp&#105;de<br>p&#114;o&#103;r<br>aut&#111;m<br><br>Email<br>It is<br>al&#111;ne<br>has a<br>stora<br>v&#97;lue<br>stori<br>&#97;gree<br><br><b><font color=white>i</font></b>&nbsp;<b><font color=white>e</font></b>&nbsp; <br>&nbsp;<br>Each<font color=white>e</font><br>again<br>("Jud<br>the r<br>such<font color=white>a</font><br>and &#112;<br>of fe<br>any &#97;<br>&#83;ervi<br>the<font color=white>h</font>a<br><br>&nbsp; <b><font color=white>a</font></b>&nbsp; <br>&nbsp;<br>You c<br>may a<br>abuse<br>&#86;isi&#116;<br><br>VISIT<br>PARTY<br>S&#85;BSE<br></tt></td>\n<td><tt>&nbsp; &nbsp; <b><font color=white>a</font></b><br><br>e&#98;sit<br>u<font color=white>p</font>&#115;ub<br>&nbsp;ter&#109;<br>te &#121;o<br>them <br>s o&#102; <br>&nbsp;The <br>rans&#102;<br>&#116;e.<br><br>&nbsp; &nbsp;&nbsp; <br><br>al &#114;e<br>uman <br>rs,<font color=white>h</font>b<br>ams<!-- light spoken cap tennis -->&nbsp;d<br>at&#105;&#99;a<br><br>&nbsp;addr<br>&nbsp;reco<br>. Y&#111;u<br><font color=white>o</font>valu<br>ge, a<br>&nbsp;of t<br>ng th<br>&#109;ent <br><br>&nbsp; &nbsp;&nbsp; <br><br>party<br>st t&#104;<br>icial<br>eg&#105;st<br>&#108;aws <br>erfor<br>d&#101;ral<br>ction<br>c&#101;.<font color=white>i</font>Y<br>bo<!-- silence incompetent dative vernacular -->ve <br><br>&nbsp; &nbsp; <b><font color=white>g</font></b><br><br>ons<!-- larghetto -->en<br>ppear<br>. The<br>ors a<br><br>ORS A<br>&nbsp;OR S<br>QUENT<br></tt></td>\n<td><tt>&nbsp;<b><font color=white>t</font></b>&nbsp;&nbsp; <br><br>e fro<br>ject <br>s &#103;ov<br>u &#97;cc<br>ca&#114;e&#102;<br>the i<br>acces<br>era&#98;l<br><br><br>&nbsp; &nbsp;&nbsp; <br><br>stric<br>Visit<br>ots,<font color=white>o</font><br>esign<br>lly&#46;<br><br>esses<br>g<!-- atom effectiveness acute viewpoint bee -->nize<br>&nbsp;ackn<br>e not<br>nd/o&#114;<br>hese<font color=white>h</font><br>is We<br>and e<br><br>&nbsp; &nbsp;&nbsp; <br><br>&nbsp;agre<br>&#101; oth<br>&nbsp;A&#99;ti<br>ered <br>&#97;re<font color=white>c</font>a<br>m&#101;d e<br><font color=white>e</font>and<font color=white>d</font><br>&nbsp;brou<br>o&#117;<font color=white>h</font>co<br>agre&#101;<br><br><b><font color=white>t</font></b>&nbsp; &nbsp; <br><br>t to <br>&nbsp;some<br><font color=white>t</font>&#73;den<br>gree <br><br>GREE <br>ENDIN<br>&nbsp;BREA<br></tt></td>\n<td><tt>&nbsp; &nbsp;&nbsp; <br><br>m<font color=white>a</font>whi<br>t&#111; &#116;&#104;<br>er&#110;in<br>ept t<br>ully<!-- cream rotary -->.<br>ndiv&#105;<br>s r&#105;g<br>e<font color=white>k</font>wit<br><br><br><b>SPECI</b><br><br>t&#105;ons<br>ors.<font color=white>h</font><br>index<br>ed &#116;o<br><br><br>&nbsp;on<font color=white>d</font>t<br>d<!-- willing tercentenary atom commander voteless -->&nbsp;tha<br>owled<br>&nbsp;l&#101;&#115;s<br><font color=white>i</font>dis&#116;<br>addre<br>bsite<br>xpre&#115;<br><br>&nbsp; <b><font color=white>a</font><font color=white>p</font></b>&nbsp;<br><br>&#101;s &#116;h<br>e&#114; in<br>on"&#41; <br>A&#100;m<!-- response frequent duck collect -->i&#110;<br>&#112;&#112;lie<br>ntire<br>state<br>ght a<br>nsent<br>ment.<br><br>&nbsp; &nbsp; <b><font color=white>o</font></b><br><br>havin<br>&#119;&#104;&#101;r&#101;<br>ti&#102;ie<br>&#110;ot t<br><br>THAT <br>G ANY<br>CH OF<br></tt></td>\n<td><tt>&nbsp; &nbsp;&nbsp; <br><br>ch &#121;o<br>e f&#111;l<!-- lordship technical kilometre wideeyed scorpioid --><br>g acc<br>hese <br>&nbsp;Any <br>dual(<br>hts g<br>hout<font color=white>s</font><br><br><br><b>&#65;L</b>&nbsp;<b>LI</b><br><br>&nbsp;on a<br>Non-H<br>ers, <br><font color=white>i</font>acce<br><br><br>h&#105;s s<br>t the<br>ge an<br>&nbsp;th&#97;n<br>&#114;&#105;but<!-- percent quotidian pilot strange --><br>sses.<br>\'s em<!-- drab processor --><br>sly<font color=white>h</font>p<br><br>&nbsp; <b><font color=white>d</font></b>&nbsp; <br><br>at an<br>&nbsp;conn<br>shall<br>is&#116;&#114;a<br>d to<font color=white>g</font><br>ly<!-- fund highlevel dangerous -->&nbsp;wi<br><font color=white>s</font>cou&#114;<br>gains<br>&nbsp;&#116;&#111; e<br><br><br><b><font color=white>t</font></b>&nbsp;&nbsp; <b>R</b><br><br>g you<br>&nbsp;on t<br>r<font color=white>d</font>i&#115; <br>o use<br><br>HA&#82;VE<br>&nbsp;MESS<br>&nbsp;THES<br></tt></td>\n<td><tt>&nbsp; <b>&#84;ER</b><br><br>u acc<br>l&#111;&#119;in<br>ess<font color=white>k</font>t<!-- sheer ill cap --><br>ter&#109;s<br>Non-H<br>s) wh<br>r&#97;n&#116;e<br>the e<br><br><br><b>&#67;E&#78;S&#69;</b><br><br>&nbsp;visi<br>uman <br>rob&#111;t<br>s<!-- tacky -->&#115;, r<br><br><br>ite a<br>se &#101;&#109;<br>d &#97;&#103;&#114;<br><font color=white>k</font>US $<br>ion o<br>&nbsp;&#73;nte<br>ail a<br>r&#111;hi&#98;<br><br><b>APP<!-- coup moire -->L&#73;</b><br><br>&#121; sui<br>ect&#105;o<br>&nbsp;be g<br>tive <br>agree<br>thin <br>ts w&#105;<br>t him<br>lectr<br><br><br><b>&#69;CORD</b><br><br>r In<!-- thread erratic -->&#116;<br>his p<br>uniqu<br>&nbsp;this<br><br>STING<br>AGE&#40;S<br>E T&#69;R<br></tt></td>\n<td><tt><b>MS<font color=white>t</font>AN</b><br><br>esse&#100;<br>g con<br>o the<br>&nbsp;&#97;nd<!-- album job -->&nbsp;<br>uman <br>o con<br>d to <br>xpres<br><br><br><b><font color=white>i</font>REST</b><br><br>tor\'s<br>Visit<br>s, cr<br>ead, <br><br><br>re co<br>a&#105;l a<br>&#101;&#101; th<br>50. Y<br>f the<br>ntio&#110;<br>ddres<br>ited&#46;<br><br><b>CABLE</b><br><br>t, &#97;c<br>n wit<br>ov&#101;&#114;&#110;<br>Conta<br>ments<br>the &#65;<br>thin <br>&nbsp;in &#99;<br>o<!-- dormitory folio bedroom rough staff -->nic <br><br><br><b>S</b>&nbsp;<b>OF</b>&nbsp;<br><br>er&#110;et<br>age (<br>&#101;ly m<br><font color=white>g</font>addr<br><br>, GAT<br>)<font color=white>i</font>TO<font color=white>p</font><br>MS<font color=white>a</font>&#79;F<br></tt></td>\n<td><tt><b>D</b>&nbsp;<b>C&#79;N</b><br><br>&nbsp;this<br>dit&#105;o<br>&nbsp;Webs<br>condi<br>Visit<br>trols<br>y&#111;u u<br>s w&#114;i<br><br><br><b>RICTI</b><br><br>&nbsp;lice<br>ors i<br>awler<br>c&#111;mpi<br><br><br>n&#115;id&#101;<br>ddr&#101;&#115;<br>a&#116; ea<br>ou &#102;&#117;<br>&#115;e &#97;d<br>al co<br>ses i<br><br><br><b><font color=white>k</font>LAW</b>&nbsp;<br><br>tion <br>h or <br>ed by<!-- pettish --><br>ct (t<br>&nbsp;be<!-- interlocutory -->tw<br>dmin <br>the &#65;<br>onnec<br>servi<br><br><br><b>V&#73;SIT</b><br><br><font color=white>e</font>Prot<br>the "<br>atche<br>ess f<br><br>HE&#82;IN<br>T&#72;E I<br>&nbsp;SE&#82;V<br></tt></td>\n<td><tt><b>DITIO</b><br><br>&nbsp;a&#103;re<br>&#110;s&#46; T<br>ite. <br>tions<br>o&#114;s t<br>&#44; &#97;&#117;&#116;<br>n&#100;er <br>tten<font color=white>i</font><br><br><br><b>ONS</b>&nbsp;<b>F</b><br><br>nse t<br>n&#99;lud<br>s, ha<br>le or<br><br><br>red p<br>ses &#97;<br>&#99;h<font color=white>o</font>e&#109;<br>rther<br>dr&#101;ss<br>ll&#101;ct<br>s re&#99;<br><br><br><b>AND</b>&nbsp;<b>J</b><br><br>or &#112;r<br>aris<!-- pedal psychotic piscine commodity conclusion -->&#105;<br>&nbsp;the <br>&#104;&#101; "&#65;<br>e&#101;n<!-- intimate queue univalve estimate -->&nbsp;&#65;<br>Sta&#116;e<br>dmin <br>&#116;i&#111;n <br>ce o&#102;<br><br><br><b>OR</b>&nbsp;<b>US</b><br><br>ocol <br>&#73;d&#101;n&#116;<br>d to <br>o&#114; an<br><br>G, ST<br>DE&#78;TI<br>ICE.<br></tt></td>\n<td><tt><b>NS</b>&nbsp;<b>OF</b><br><br>eme<!-- plaza sylvan -->nt<br>hes&#101; <br>By vi<br>&nbsp;(the<br>o the<br>hors <br>the T<br>permi<!-- votive instance tender cluster --><br><br><br><b>OR</b>&nbsp;<b>NO</b><br><br>o acc<br>e, bu<br>rv&#101;st<br><font color=white>f</font>g&#97;th<br><br><br>ropri<br>r&#101; pr<br>ail a<br><font color=white>d</font>agre<br>e&#115;<font color=white>s</font>s&#117;<br>&#105;o<!-- allaround unknown curtain mosaic range -->n,<font color=white>s</font><br>ogniz<br><br><br><b>UR&#73;SD</b><br><br>oceed<br>ng fr<br>law &#111;<br>dmin <br>dmin<font color=white>f</font><br>&#46; You<br>Sta<!-- intertidal reprobate murder hipped struck -->t&#101;<br>wi&#116;h <br>&nbsp;proc<br><br><br><b>E</b>&nbsp;<b>&#65;ND</b><br><br>addre<br>ifier<br>your <br>y rea<br><br>ORIN&#71;<br>FIER <br><br></tt></td>\n<td><tt>&nbsp;<b>U&#83;E<font color=white>c</font></b><br><br>&nbsp;("th<br>term&#115;<br>siti&#110;<br>&nbsp;"Ter<br><font color=white>s</font>Webs<br>&#111;r ot<br>erms <br>&#115;si<!-- boys due graceful quiet appendant -->on<br><br><br><b>&#78;-&#72;UM</b><br><br>ess<font color=white>f</font>t<br>&#116; a&#114;e<br>ers,<font color=white>a</font><br>er<font color=white>a</font>co<br><br><br>etary<br>ovid&#101;<br>ddre&#115;<br>e tha<br>bs&#116;an<br>harve<br>ed as<br><br><br><b>ICT&#73;&#79;</b><br><br>ing &#98;<br>om t&#104;<br>&#102; th&#101;<br>Sta&#116;e<br>St&#97;&#116;e<br><font color=white>k</font>c&#111;ns<br>. You<br>breac<br>ess r<br><br><br>&nbsp;<b>A<!-- layout flexible wee ostentatious -->&#66;US</b><br><br>&#115;s re<br>"<!-- verse -->)<font color=white>s</font>if<!-- canonic --><br>Inter<br>so&#110;.<br><br>&#44; TRA<br>CONST<br><br></tt></td>\n<td><tt><br><br>e<font color=white>s</font>Web<br>&nbsp;are <br>g &#40;&#105;n<br>ms o&#102;<br>ite<font color=white>k</font>&#115;<br>&#104;erwi<br>of Se<br>&nbsp;of<font color=white>o</font>t<br><br><br><b>AN</b>&nbsp;<b>&#86;I</b><br><br>he &#87;e<br>&nbsp;not <br>or an<br>&#110;tent<br><br><br>&nbsp;inte<br>d for<br>&#115; th&#101;<br>t &#116;he<br>tiall<br>st&#105;ng<br><font color=white>i</font>a vi<br><br><br><b>&#78;</b>&nbsp;<br><br>rough<br>e Ter<br>&nbsp;stat<br>") fo<br>&nbsp;resi<br>e<!-- flow metallic multinational voiceless -->nt<font color=white>i</font>t<br>&nbsp;c&#111;ns<br>hes o<br>eg&#97;r&#100;<br><br><br><b>E</b>&nbsp;<br><br>&#99;&#111;&#114;de<br>&nbsp;we s<br>n&#101;&#116; P<br><br><br>N&#83;FER<br>I&#84;UTE<br><br></tt></td>\n<td><tt><br><br>site"<br>in<font color=white>d</font>ad<br>&nbsp;any <br><font color=white>h</font>Serv<br>&#104;all <br>se ma<br>&#114;&#118;ic&#101;<br>he ow<br><br><br><b>SITOR</b><br><br>bsite<br>limit<!-- coral kudos suicide plc makeshift --><br>y o&#116;h<br>&nbsp;from<br><br><br>llect<br>&nbsp;huma<br><font color=white>f</font>Webs<br>&nbsp;&#99;om&#112;<br>y dim<br>,<font color=white>g</font>gat<br>o&#108;a&#116;i<br><br><br><br><br>t by <br>ms &#111;f<br>e<font color=white>d</font>&#111;f<font color=white>s</font><br>r<font color=white>i</font>the<br>dents<br>&#111; th&#101;<br>ent t<br>f the<br>ing a<br><br><br><br><br>d. An<br>uspec<br>rotoc<br><br><br>RING <br>&#83; AN <br><br></tt></td>\n<td><tt><br><br>) &#105;s <br>&#100;it&#105;o<br>man&#110;e<br>ice"&#41;<br>be<font color=white>s</font>c&#111;<br>kes<font color=white>o</font>u<br>&nbsp;ar&#101;<br>ner<font color=white>i</font>o<br><br><br><b>&#83;</b>&nbsp;<br><br>&nbsp;appl<br>ed &#116;o<br>er co<br>&nbsp;the<font color=white>c</font><br><br><br>ual p<br>n v&#105;s<br>&#105;te c<br>il&#97;ti<br>&#105;ni&#115;h<br>he&#114;&#105;n<!-- gaseous unicellular husk middleclass castle --><br>on<font color=white>h</font>of<br><br><br><br><br>such<font color=white>i</font><br>&nbsp;Serv<br>resi&#100;<br>&nbsp;Webs<br>&nbsp;ente<br>&nbsp;juri<br>o<font color=white>f</font>the<br>se T&#101;<br>ction<br><br><br><br><br>&nbsp;em&#97;i<br>t pot<br>&#111;l ad<br><br><br>TO A <br>ACCEP<br><br></tt></td>\n<td><tt><br><br>p<!-- comfortable widespread -->ro&#118;&#105;<br>n &#116;o <br>r) th<br>. Ple<br>n&#115;id&#101;<br>se<font color=white>a</font>of<br><br>f the<br><br><br><br><br>y to<br>,<font color=white>p</font>web<br>mpute<br>Websi<br><br><br>r&#111;p&#101;&#114;<br>ito&#114;s<br>o&#110;&#116;ai<br>&#111;n,<br>es th<br>&#103;, an<br>&nbsp;this<br><br><br><br><br>p&#97;r&#116;y<br>i&#99;e<br>ence <br>ite<font color=white>d</font>a<br>r&#101;d i<br>sdict<br>&nbsp;venu<br>rms o<!-- weekly corduroy elaborate prankish rebellion --><br>s und<br><br><br><br><br>l add<br>entia<br>dress<br><br><br>TH<!-- disillusioned payable -->&#73;RD<br>TANCE<br><br></tt></td>\n<td><tt><br><br>ded<br>any<br>e<br>ase<br>red<br><br><br><br><br><br><br><br><br><br>r<br>te<br><br><br>ty.<br><br>ns<br><br>e<br>d/or<br><br><br><br><br><br><br><br>of<br>s<br>nto<br>io&#110;<br>&#101; in<br>&#102;<br>er<br><br><br><br><br>re&#115;s<br>l<br>&#46;<br><br><br><br>&nbsp;AND<br><br></tt></td>\n</tr>\n</table>\n<br>'; }


?><?php 

// 
// PROXY SUPPORT
//  
// This honey pot script supports Proxies. If your webserver requires a proxy
// for outbound connections you may configure this honey pot's settings to use
// a proxy.
//
// For more information, visit: 
//     http://www.projecthoneypot.org/settings_help.php
//
//



function formatHTML($s) {
    return str_replace('\n',"\n",$s);
}

function getDocType()       { return formatHTML(__DOC_TYPE1); }
function getHeadHTML1()     { return formatHTML(__HEAD1); }
function getRobotHTML()     { return formatHTML(__ROBOT1); }
function getNoCollectHTML() { return formatHTML(__NOCOLLECT1); }
function getHeadHTML2()     { return formatHTML(__HEAD2); }
function getTopHTML()       { return formatHTML(__TOP1); }
function getEmailHTML($method,$m) { 
    switch ($method) {
    case 0: return "";
    case 1: return formatHTML(__EMAIL1A.$m.__EMAIL1B.$m.__EMAIL1C); 
    case 2: return formatHTML(__EMAIL2A.$m.__EMAIL2B.$m.__EMAIL2C); 
    case 3: return formatHTML(__EMAIL3A.$m.__EMAIL3B.$m.__EMAIL3C); 
    case 4: return formatHTML(__EMAIL4A.$m.__EMAIL4B.$m.__EMAIL4C); 
    case 5: return formatHTML(__EMAIL5A.$m.__EMAIL5B); 
    case 6: return formatHTML(__EMAIL6A.$m.__EMAIL6B.$m.__EMAIL6C); 
    case 7: return formatHTML(__EMAIL7A.$m.__EMAIL7B.$m.__EMAIL7C); 
    case 8: return formatHTML(__EMAIL8A.$m.__EMAIL8B.$m.__EMAIL8C); 
    case 9: return formatHTML(__EMAIL9A.$m.__EMAIL9B.$m.__EMAIL9C); 
    }
    return formatHTML(__EMAIL10A.$m.__EMAIL10B.$m.__EMAIL10C); 
}
function getLegalHTML()   { return formatHTML(__LEGAL1.(getLegalContent()).__LEGAL2); }
function getStyleHTML()   { return formatHTML(__STYLE1); }
function getVanityHTML()  { return formatHTML(__VANITY1); }
function getBottomHTML()  { return formatHTML(__BOTTOM1); }

function readSettings() {
    $settings      = NULL;
    $settings_file = dirname(__FILE__)."/phpot_settings.php";

    if (is_file($settings_file) && is_readable($settings_file)) {
        $fp = fopen($settings_file,"r");
        $contents = "";
        while (!feof($fp)) {
            $contents .= fread($fp, 8192);
        }
        fclose($fp);

        $lines = explode("\n",$contents);
        foreach ($lines as $line) {
            if (trim($line) !== "") {
                list ($setting, $value) = @explode(":",$line,2);
                switch ($setting) {
                case "proxy_host": 
                    $settings["sock_host"] = trim($value);
                    break;
                case "proxy_port":
                    $settings["sock_port"] = trim($value);
                    break;
                }
                if (trim($value) !== "") {
                    $settings[trim($setting)] = trim($value);
                }
            }
        }
    }

    if (isset($settings["proxy_host"]) && isset($settings["proxy_port"]) && !isset($settings["use_proxy"])) {
        $settings["use_proxy"] = "1";
    } else {
        $settings["use_proxy"] = "0";
    }

    if (isset($settings["proxy_user"]) && isset($settings["proxy_pass"]) && !isset($settings["proxy_auth"])) {
        $settings["proxy_auth"] = "basic";
    } else {
        $settings["proxy_auth"] = "none";
    }

    if (!isset($settings["sock_host"])) $settings["sock_host"] = __REQUEST_HOST;
    if (!isset($settings["sock_port"])) $settings["sock_port"] = __REQUEST_PORT;

    return $settings;
}

function performRequest($request) {
    $response = "";

    $settings = readSettings();

    if ($settings["use_proxy"] == "1") {
        // POST via proxy
        $post_url = "http://".__REQUEST_HOST.":".__REQUEST_PORT.__REQUEST_SCRIPT;

        $head  = "POST ".$post_url." HTTP/1.0\r\n";
        //$head .= "Host: ".__REQUEST_HOST."\r\n";
        $head .= "User-Agent: PHPot ".__HPOT_TAG2."\r\n";
        if ($settings["proxy_auth"] == "basic") {
            $head .= "Proxy-Authorization: Basic ".base64_encode($settings["proxy_user"].":".$settings["proxy_pass"])."\r\n";
        }
        $head .= "Cache-Control: no-store, no-cache\r\n";
        $head .= "Accept: */*\r\n";
        $head .= "Pragma: no-cache\r\n";
        $head .= "Content-Type: application/x-www-form-urlencoded\r\n";
        $head .= "Content-Length: ".strlen($request)."\r\n";
        $head .= "Connection: close\r\n\r\n";

    } else {
        // POST directly
        $head  = "POST ".__REQUEST_SCRIPT." HTTP/1.1\r\n";
        $head .= "Host: ".__REQUEST_HOST."\r\n";
        $head .= "User-Agent: PHPot ".__HPOT_TAG2."\r\n";
        $head .= "Content-Type: application/x-www-form-urlencoded\r\n";
        $head .= "Content-Length: ".strlen($request)."\r\n";
        $head .= "Connection: close\r\n\r\n";
    }
    
    $errno  = NULL;
    $errstr = NULL;
    $fd = @fsockopen ($settings["sock_host"], $settings["sock_port"], $errno, $errstr, 20);

    if (!$fd) {
        // Socket Error
        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");
        return "-1";
    } else {

        fputs($fd,$head.$request);
        while(!feof($fd)) {
            $response .= fgets($fd,4096);
        }
        fclose($fd);
    }

    return $response;
}

function prepareRequest() {
    $postvars          = array();
    $postvars["tag1"]  = __HPOT_TAG1;
    $postvars["tag2"]  = __HPOT_TAG2;
    $postvars["tag3"]  = __HPOT_TAG3;
    if (!($handle = fopen(__FILE__,"r"))) {
        die("\n<BR>Unable to read contents of ".__FILE__." for hashing<BR>\n");
        return -2;
    }
    $contents = "";
    while (!feof($handle)) {
        $contents .= fread($handle, 8192);
    }
    fclose($handle);
    $postvars["tag4"]   = md5(preg_replace("/[^a-zA-Z0-9]/","",$contents));
    $postvars["ip"]    = $_SERVER["REMOTE_ADDR"];
    $postvars["svrn"]  = $_SERVER["SERVER_NAME"];  
    $postvars["svp"]   = $_SERVER["SERVER_PORT"];  
    $postvars["svip"]  = isset($_SERVER["SERVER_ADDR"]) ? $_SERVER["SERVER_ADDR"] : "";
    $postvars["rquri"]   = isset($_SERVER["REQUEST_URI"]) ? $_SERVER["REQUEST_URI"] : "";
    $postvars["phpself"] = str_replace(' ','%20',$_SERVER["PHP_SELF"]);
    $postvars["version"] = "php-".phpversion();
    $postvars["sn"]     = str_replace(' ','%20',$_SERVER["SCRIPT_NAME"]);
    $postvars["ref"]    = isset($_SERVER["HTTP_REFERER"]) ? $_SERVER["HTTP_REFERER"] : "";
    $postvars["uagnt"]  = isset($_SERVER["HTTP_USER_AGENT"]) ? $_SERVER["HTTP_USER_AGENT"] : "";
    if (isset($_POST) && count($_POST) > 0) {
        $postvars["has_post"] = count($_POST);
        for (reset($_POST);list($k,$v) = each($_POST);) {
            $postvars["post|".$k] = $v;
        }
        reset($_POST);
    }
    if (isset($_GET) && count($_GET) > 0) {
        $postvars["has_get"] = count($_GET);
        for (reset($_GET);list($k,$v) = each($_GET);) {
            $postvars["get|".$k] = $v;
        }
        reset($_GET);
    }
    if (isset($_SERVER) && count($_SERVER) > 0) {
        $i = 0;
        for (reset($_SERVER);list($k,$v) = each($_SERVER);) {
            if ($k !== "HTTP_COOKIE" && preg_match('/^HTTP_/',$k)) {
                $postvars["header|".$k] = $v;
                $i++;
            }
        }
        $postvars["has_header"] = $i;
        reset($_SERVER);
    }

    return $postvars;
}

function transcribeResponse(& $response) {
    $settings  = NULL;
    $arr       = explode("\n",$response);
    $isParam   = FALSE;

    
    for ($i=0;list(,$v)=each($arr);$i++) {
        if ($v == "<END>")   $isParam = FALSE;

        if ($isParam) {          
            $pieces = explode("=",$v,2);
            $settings[$pieces[0]] = urldecode($pieces[1]);
        }
        if ($v == "<BEGIN>") $isParam = TRUE;
    }
    

    if (isset($settings["directives"])) {
        $settings["directives"] = explode(",",$settings["directives"]);
    }

    return $settings;
}

header("Cache-Control: no-store, no-cache");
header("Pragma: no-cache");

$response  = "";
$request   = "";
$post      = prepareRequest();

for (reset($post);list($k,$v) = each($post);) {
    $request .= "&".urlencode($k)."=".urlencode(stripslashes($v));
}
$request    = substr($request,1);
$response   = performRequest($request);
if ($response == "-1") {
    exit();
}
$settings   = transcribeResponse($response);

$directives   = $settings["directives"];
$email        = isset($settings["email"]) ? $settings["email"] : "";
$emailmethod  = isset($settings["emailmethod"]) ? $settings["emailmethod"] : 0;




?>
<?php echo (isset($directives[0]) && $directives[0]==1) ? getDocType()    : ""; ?>
<?php echo (isset($settings["injDocType"])) ? formatHTML($settings["injDocTypeMsg"]) : ""; ?>
<?php echo (isset($directives[1]) && $directives[1]==1) ? getHeadHTML1()   : ""; ?>
<?php echo (isset($settings["injHead1HTML"])) ? formatHTML($settings["injHead1HTMLMsg"]) : ""; ?>
<?php echo (isset($directives[8]) && $directives[8]==1) ? getRobotHTML()   : ""; ?>
<?php echo (isset($settings["injRobotHTML"])) ? formatHTML($settings["injRobotHTMLMsg"]) : ""; ?>
<?php echo (isset($directives[9]) && $directives[9]==1) ? getNoCollectHTML()   : ""; ?>
<?php echo (isset($settings["injNoCollectHTML"])) ? formatHTML($settings["injNoCollectHTMLMsg"]) : ""; ?>
<?php echo (isset($directives[1]) && $directives[1]==1) ? getHeadHTML2()   : ""; ?>
<?php echo (isset($settings["injHead2HTML"])) ? formatHTML($settings["injHead2HTMLMsg"]) : ""; ?>
<?php echo (isset($directives[2]) && $directives[2]==1) ? getTopHTML()    : ""; ?>
<?php echo (isset($settings["injTopHTML"])) ? formatHTML($settings["injTopHTMLMsg"]) : ""; ?>
<?php
   if (isset($settings["actMsgOn"])) { 
       echo formatHTML($settings["actMsg"]); 
   }
   if (isset($settings["errMsgOn"])) { 
       echo formatHTML($settings["errMsg"]); 
   }
   if (isset($settings["customMsgOn"])) { 
       echo formatHTML($settings["customMsg"]); 
   }
?>
<?php echo (isset($directives[3]) && $directives[3]==1) ? getLegalHTML()  : ""; ?>
<?php echo (isset($settings["injLegalHTML"])) ? formatHTML($settings["injLegalHTMLMsg"]) : ""; ?>
<?php
   if (isset($settings["altLegalOn"])) { 
       echo formatHTML($settings["altLegalMsg"]); 
   } 
?>
<?php echo (isset($directives[4]) && $directives[4]==1) ? getEmailHTML(intval($emailmethod),$email)  : ""; ?>
<?php echo (isset($settings["injEmailHTML"])) ? formatHTML($settings["injEmailHTMLMsg"]) : ""; ?>
<?php echo (isset($directives[5]) && $directives[5]==1) ? getStyleHTML()  : ""; ?>
<?php echo (isset($settings["injStyleHTML"])) ? formatHTML($settings["injStyleHTMLMsg"]) : ""; ?>
<?php echo (isset($directives[6]) && $directives[6]==1) ? getVanityHTML() : ""; ?>
<?php echo (isset($settings["injVanityHTML"])) ? formatHTML($settings["injVanityHTMLMsg"]) : ""; ?>
<?php
   if (isset($settings["altVanityOn"])) {
        echo formatHTML($settings["altVanityMsg"]);
    }
?>
<?php echo (isset($directives[7]) && $directives[7]==1) ? getBottomHTML() : ""; ?>
<?php echo (isset($settings["injBottomHTML"])) ? formatHTML($settings["injBottomHTMLMsg"]) : ""; ?>
