<?php

//  PROJECT HONEY POT ADDRESS DISTRIBUTION SCRIPT
//  For more information visit: http://www.projecthoneypot.org/
//  Copyright (C) 2004, Unspam, LLC
//  
//  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: Fri, 11 Aug 2006 18:36:30 -0400
//  For Domain: people.csail.mit.edu
//  
//  

//  *** 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', 'hpr5.projecthoneypot.org');
define('__REQUEST_PORT', '80');
define('__REQUEST_SCRIPT','/cgi/serve.php');
//  
//  *** FINISH CUT HERE ***
//  

define('__HPOT_TAG1',    '6f654dc572f1423ddfe1e679f52ea592');
define('__HPOT_TAG2',    '10ac234a0f3ed5465c683a90a5a25faf');
define('__HPOT_TAG3',    '34aa2473d1aa4705f92165addfe297ff');

define('__CLASS_STYLE_1','ziyivu');
define('__CLASS_STYLE_2','jakuxothaf');

define('__DIV1',         'rucr364br7');

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>Employer people.csail.mit.edu</title>\n</head>\n');
define('__ROBOT1',       '<meta name="robots" content="noarchive">\n<meta name="robots" content="follow,noindex">\n');
define('__NOCOLLECT1',   '<meta name="no-email-collection" content="/">\n');
define('__TOP1',         '<body>\n<div align="center" id="cruel">\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"><tr>\n<td style="font-family: courier, monospace;"><b><font color=#FFFFFF>g</font></b>&nbsp;&nbsp; <b><font color=#FFFFFF>d</font></b>&nbsp;&nbsp; <br>&nbsp;<br>The webs<br>to you s<br>other<font color=#FFFFFF>k</font>te<br>Website <br>read the<br>agents<font color=#FFFFFF>e</font>&#111;<br>them. Th<br>non-tran<br>Websit&#101;.<br><br><b><font color=#FFFFFF>g</font></b>&nbsp; &nbsp; &nbsp;&nbsp; <br>&nbsp;<br>&#83;peci&#97;l <br>Non-Hu&#109;a<br>spi&#100;er<span style="display: none">sinistral sugar wake return length</span>s,<br>&#112;rograms<br>automati<br><br>Email ad<br>It is re<br>alone. &#89;<br>has a &#118;a<br>&#115;torage&#44;<br>val&#117;e o<span style="display: none">attack unity dry football vertebrate</span>f<br>storin&#103; <br>agre&#101;men<br><br>&nbsp; &nbsp; &nbsp; &nbsp; <br>&nbsp;<br>&#69;a&#99;h<font color=#FFFFFF>e</font>par<br>ag&#97;inst <br>("<span style="display: none">carbonic varsity plural leash</span>J&#117;dici<br>the regi<br>&#115;uch law<br>and p<span style="display: none">hypothesis</span>erf<br>of &#102;&#101;der<br>any acti<br>Service.<br>the abov<br><br>&nbsp; &nbsp; &nbsp; &nbsp; <br>&nbsp;<br>You cons<br>&#109;ay &#97;ppe<br>abuse. T<br>Visitor&#115;<br><br>VISITORS<br>PARTY OR<br>SUBSEQUE<br></td>\n<td style="font-family: courier, monospace;">&nbsp;<b><font color=#FFFFFF>d</font></b>&nbsp;&nbsp; <b><font color=#FFFFFF>p</font></b>&nbsp;<b><font color=#FFFFFF>s</font></b><br><br>ite from<br>ubject t<br>rms gove<br>you acce<br>m carefu<br>f the in<br>e<font color=#FFFFFF>s</font>ac&#99;ess<br>sferable<br><br><br><b><font color=#FFFFFF>c</font></b>&nbsp; &nbsp; &nbsp; <b>S</b><br><br>&#114;estrict<br>n &#86;&#105;&#115;ito<br>&nbsp;bots&#44; &#105;<br>&nbsp;de&#115;&#105;gne<br>cal&#108;y.<br><br>dresses <br>cognized<br>ou a&#99;kno<br>&#108;ue not <br>&nbsp;and<span style="display: none">hire</span>/or <br>&nbsp;these &#97;<br>this Web<br>t and<font color=#FFFFFF>t</font>ex<br><br>&nbsp; <b><font color=#FFFFFF>s</font></b>&nbsp; &nbsp;&nbsp; <br><br>t&#121; agree<br>th&#101;<font color=#FFFFFF>f</font>othe<br>al<font color=#FFFFFF>t</font>A<span style="display: none">lobar retirement</span>ctio<br>s&#116;ered A<br>s are ap<br>ormed en<br>a&#108; &#97;nd s<br>on broug<br>&nbsp;&#89;ou<font color=#FFFFFF>i</font>&#99;on<br>e a&#103;reem<br><br><b><font color=#FFFFFF>k</font></b>&nbsp; &nbsp; <b><font color=#FFFFFF>s</font></b>&nbsp; <br><br>ent to<font color=#FFFFFF>s</font>h<br>a&#114; so&#109;&#101;w<br>he<font color=#FFFFFF>t</font>&#73;dent<br>&nbsp;agree n<br><br>&nbsp;A<span style="display: none">wicker clockwise</span>GREE<font color=#FFFFFF>f</font>T<br>&nbsp;SENDI<span style="display: none">murky remorse script welcome mobility</span>&#78;G<br>N&#84; BREAC<br></td>\n<td style="font-family: courier, monospace;">&nbsp; &nbsp; &nbsp; &nbsp; <br><br>&nbsp;w&#104;ich y<br>o t&#104;e<font color=#FFFFFF>c</font>fo<br>rnin&#103; ac<br>pt t&#104;&#101;se<br>lly. &#65;ny<br>divi<span style="display: none">piglets static letter</span>&#100;ua&#108;<br>&nbsp;rights <br>&nbsp;withou<span style="display: none">silly truck turkish</span>t<span style="display: none">warmblooded befitting undersigned cosignatory planoconcave</span><br><br><br><b>PECIAL</b>&nbsp;<b>L</b><br><br>ions on <br>rs. Non-<br>&#110;dexers,<br>d t&#111;<font color=#FFFFFF>h</font>acc<br><br><br>on th&#105;s <br>&nbsp;that th<br>wled<span style="display: none">inaugural premium</span>ge a<br>les&#115; tha<br>&#100;istribu<br>ddr&#101;sses<br>site\'s e<br>pressly <br><br>&nbsp; &nbsp; &nbsp; &nbsp; <br><br>s tha&#116; a<br>&#114; in con<br>n") &#115;ha&#108;<br>dmin&#105;str<br>plied to<br>t&#105;rely w<br>tate cou<br>ht<font color=#FFFFFF>p</font>again<br>&#115;&#101;nt<font color=#FFFFFF>h</font>to <br>e&#110;&#116;.<br><br>&nbsp; &nbsp; &nbsp; &nbsp; <br><br>avin&#103; yo<br>&#104;ere &#111;n <br>ifier<font color=#FFFFFF>t</font>i&#115;<br>ot &#116;o us<br><br>H&#65;T HARV<br>&nbsp;ANY MES<br>H<font color=#FFFFFF>p</font>OF<span style="display: none">retail</span>&nbsp;THE<br></td>\n<td style="font-family: courier, monospace;">&nbsp;&nbsp; <b>TERM<span style="display: none">technical virile learning</span>S</b><br><br>ou acces<br>ll&#111;w&#105;&#110;g <br>&#99;ess to <br>&nbsp;terms &#97;<br>&nbsp;&#78;on-H&#117;m<br>(s) who <br>g&#114;an&#116;ed <br>&nbsp;th&#101; exp<br><br><br><b>I&#67;ENSE</b>&nbsp;<b>R</b><br><br>a v&#105;sito<br>&#72;&#117;&#109;an Vi<br>&nbsp;r&#111;bots,<br>es&#115;, &#114;ea<br><br><br>sit&#101; are<br>es&#101;<font color=#FFFFFF>d</font>&#101;mai<br>n&#100; agree<br>n US $50<br>ti&#111;n o&#102; <br>&#46; Intent<span style="display: none">offbeat arson primary ranger adjacent</span><br>mai&#108; &#97;d&#100;<br>prohi&#98;it<br><br><b><font color=#FFFFFF>e</font>APPLICA</b><br><br>&#110;y su&#105;t,<br>ne<span style="display: none">crook</span>ctio&#110;<font color=#FFFFFF>g</font><br>l be g&#111;v<br>&#97;tive Co<br>&nbsp;agr&#101;em&#101;<br>ithin<font color=#FFFFFF>o</font>th<br>rts with<br>st him i<br>el&#101;ctron<br><br><br><b>R&#69;CORDS</b>&nbsp;<br><br>ur Int<span style="display: none">testy data translator reputable swallowtailed</span>er<br>t&#104;i&#115; p&#97;g<br>&nbsp;uniq<span style="display: none">delivery philosophy dreadful safety toe</span>uel<br>e &#116;his a<br><br>&#69;S&#84;I&#78;G, <br>SA<span style="display: none">cloth dispensable bracket experts</span>GE(S) <br>SE<font color=#FFFFFF>c</font>&#84;ERMS<br></td>\n<td style="font-family: courier, monospace;">&nbsp;<b>AND</b>&nbsp;<b>CO&#78;</b><br><br>sed this<br>cond&#105;tio<br>the<font color=#FFFFFF>f</font>Webs<br>nd co&#110;&#100;i<br>a&#110;<font color=#FFFFFF>t</font>Visit<br>c&#111;&#110;t&#114;ol&#115;<br>&#116;o you u<br>ress wri<br><br><br><b>EST&#82;I&#67;TI</b><br><br>r\'s li&#99;e<br>s&#105;t<span style="display: none">mighty television</span>ors i<br>&nbsp;crawler<br>d&#44; compi<br><br><br>&nbsp;c&#111;nside<br>l addres<br>&nbsp;that ea<br>. You f&#117;<br>th<span style="display: none">exotic eggs pants</span>ese &#97;&#100;<br>ional co<br>&#114;esses i<br>ed.<br><br><b>BLE</b>&nbsp;<b>LAW</b>&nbsp;<br><br>&nbsp;action <br>&#119;ith or <br>e&#114;ned by<br>ntac&#116; (t<br>nts betw<br>e Ad&#109;in <br>&#105;n the<font color=#FFFFFF>d</font>&#65;<br>n c&#111;nn&#101;&#99;<br>ic s&#101;r&#118;i<br><br><br><b>OF</b>&nbsp;<b>VISIT</b><br><br>n<span style="display: none">vigorous suggestion amiable waffle widespread</span>et Pro&#116;<br>&#101; (th&#101; "<br>y matche<br>ddress f<br><br>GATHERIN<br>TO THE I<br>&nbsp;O<span style="display: none">series many grazioso</span>F &#83;E<span style="display: none">vacuous slim hostage erudite englishman</span>R&#86;<br></td>\n<td style="font-family: courier, monospace;"><b>&#68;&#73;TION<span style="display: none">neurotic synonymous circle argyle</span>S</b>&nbsp;<br><br>&nbsp;agreeme<br>ns. Thes<br>ite.<font color=#FFFFFF>a</font>By <br>tions<font color=#FFFFFF>a</font>(t<br>ors &#116;o<span style="display: none">effort postwar under taxpayer</span>&nbsp;t<br>&#44;<font color=#FFFFFF>a</font>&#97;u&#116;ho&#114;<br>nd&#101;r<span style="display: none">privacy</span>&nbsp;the<br>tt&#101;&#110; per<br><br><br><b>ON&#83;</b>&nbsp;<b>FOR</b>&nbsp;<br><br>nse to a<br>&#110;clud&#101;, <br>s, harve<br>l&#101; or ga<br><br><br>&#114;e&#100; prop<br>&#115;es are <br>ch email<br>r&#116;he&#114;<font color=#FFFFFF>a</font>&#97;g<br>dresses <br>lle&#99;tio<span style="display: none">commentary sibilant predicate businessman</span>n<br>s rec&#111;gn<br><br><br><b>AND</b>&nbsp;<b>JUR&#73;</b><br><br>or p&#114;oc&#101;<br>arising <br>&nbsp;th&#101; law<br>he "A&#100;mi<br>ee&#110; A&#100;mi<span style="display: none">block clammy gesture applicant</span><br>State. Y<br>dmin Sta<br>t&#105;on wit<br>ce o&#102; pr<br><br><br><b>OR</b>&nbsp;<b>U&#83;E</b>&nbsp;<b>&#65;</b><br><br>ocol &#97;dd<br>I&#100;en&#116;ifi<br>&#100; to y&#111;u<br>or any r<br><br>&#71;, STORI<br>DENT&#73;FI&#69;<br>ICE.<br></td>\n<td style="font-family: courier, monospace;"><b>OF</b>&nbsp;<b>U&#83;E</b>&nbsp;<br><br>nt ("the<br>&#101; terms <br>visiting<br>h&#101; "Ter&#109;<br>he<font color=#FFFFFF>g</font>Websi<br>s &#111;&#114; oth<br>&nbsp;&#84;erms o<br>mission <br><br><br><b>NON-HUMA</b><br><br>ccess th<br>but are <br>sters&#44; o<br>ther<font color=#FFFFFF>s</font>con<br><br><br>rietary <br>provi&#100;ed<br>&nbsp;ad&#100;r&#101;ss<br>ree that<br>su&#98;st&#97;nt<br>, harv&#101;s<br>ized a&#115; <br><br><br><b>SD<span style="display: none">appendix continuous nurse lefthanded</span>ICT&#73;O&#78;</b><br><br>e&#100;i&#110;g &#98;r<br>from<font color=#FFFFFF>a</font>the<br><font color=#FFFFFF>g</font>o&#102; &#116;he <br>n S&#116;ate<span style="display: none">dreadful play fig</span>"<br>n Sta&#116;e <br>ou conse<br>t&#101;. You<font color=#FFFFFF>s</font><br>&#104; breach<br>oces&#115; re<br><br><br><b>ND</b>&nbsp;<b>ABUS&#69;</b><br><br>ress rec<br>er"&#41; if <br>&#114; Intern<br>e&#97;s&#111;n.<br><br>N&#71;, TR&#65;N<br>&#82; CONSTI<br><br></td>\n<td style="font-family: courier, monospace;"><br><br>&nbsp;&#87;ebsite<br>a&#114;e &#105;n<font color=#FFFFFF>e</font>a<br>&nbsp;(in any<br>s &#111;f Ser<br>te shall<br>e&#114;wise m<br>f &#83;ervic<br>of the o<br><br><br><b>N</b>&nbsp;<b>VI&#83;I&#84;O</b><br><br>e Web&#115;it<br>no&#116; &#108;imi<br>r any ot<br>&#116;ent f&#114;o<br><br><br>inte&#108;lec<br>&nbsp;for hum<br>&nbsp;the Web<br><font color=#FFFFFF>f</font>the com<br>ially &#100;i<br>ting, ga<br>&#97;<font color=#FFFFFF>e</font>violat<br><br><br>&nbsp;<br><br>ought by<br>&nbsp;Ter&#109;s o<br>st&#97;te of<br>) for th<br>resi&#100;ent<br>nt to th<br>conse&#110;t <br>es of th<br>&#103;ard&#105;ng <br><br><br>&nbsp;<br><br>&#111;rded. &#65;<br>w&#101; s&#117;spe<br>et Prot&#111;<br><br><br>SFER&#82;&#73;NG<br>TUTES A&#78;<br><br></td>\n<td style="font-family: courier, monospace;"><br><br>") is pr<br>ddition <br>&nbsp;manner)<br>vic<span style="display: none">rod chapter piping abusive calcium</span>e"). <br>&nbsp;&#98;e cons<br>akes<font color=#FFFFFF>k</font>use<br>e are<br>wner of<font color=#FFFFFF>e</font><br><br><br><b>RS</b>&nbsp;<br><br>e &#97;pply <br>ted to, <br>her comp<br>m &#116;he<font color=#FFFFFF>t</font>We<br><br><br>t&#117;al<font color=#FFFFFF>t</font>&#112;ro<br>an<font color=#FFFFFF>e</font>vi&#115;it<span style="display: none">legato ridge court nominee</span><br>site<font color=#FFFFFF>d</font>c&#111;n<br>pilation<br>minis<span style="display: none">valid election</span>hes<br>the&#114;ing,<br>io&#110; of t<br><br><br><br><br><font color=#FFFFFF>o</font>&#115;uc&#104; pa<br>f Servic<br>&nbsp;re&#115;iden<br>e Websit<br>s enter&#101;<br>e jurisd<br>to th&#101;<font color=#FFFFFF>g</font>v<br>ese Ter&#109;<br>acti&#111;ns <br><br><br><br><br>n email <br>ct poten<br>col addr<br><br><br>&nbsp;TO A &#84;H<br>&nbsp;A&#67;C&#69;P&#84;A<br><br></td>\n<td style="font-family: courier, monospace;"><br><br>ovided<br>to any<br>&nbsp;t<span style="display: none">lovely equal</span>h&#101;<br>Plea<span style="display: none">accident mono ruffs</span>se<br>ider&#101;&#100;<br>&nbsp;of<br><br>the<br><br><br><br><br>to<br>web<br>&#117;ter<br>bsite<br><br><br>per&#116;&#121;&#46;<br>ors<br>&#116;ains<br>,<br>&nbsp;the<br><font color=#FFFFFF>e</font>and/or<br>his<br><br><br><br><br>rt&#121;<br>e<br>c&#101; of<br>e<font color=#FFFFFF>o</font>a&#115;<br>d into<br>&#105;ction<br>enue<font color=#FFFFFF>a</font>in<br>s &#111;f<br>under<br><br><br><br><br>ad&#100;ress<br>tial<br>ess.<br><br><br>IRD<br>NCE<font color=#FFFFFF>t</font>&#65;N&#68;<br><br></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);
                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.1\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(ereg_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"] : "";

    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 ($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 .= "&$k=".urlencode(stripslashes($v));
}
$request    = substr($request,1);
$response   = performRequest($request);
if ($response == "-1") {
    exit();
}
$settings   = transcribeResponse($response);

$directives   = $settings["directives"];
$email        = $settings["email"];
$emailmethod  = $settings["emailmethod"];




?>
<?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"]) : ""; ?>
