Commit | Line | Data |
---|---|---|
8de51304 H |
1 | <?php\r |
2 | \r | |
3 | $i = 0;\r | |
4 | $pfp[$i] = popen ("cmd.exe", "rw");\r | |
5 | $ifp = fopen ("php://stdin", "r");\r | |
6 | \r | |
7 | /*\r | |
8 | a = 1\r | |
9 | y = 25\r | |
10 | */\r | |
11 | \r | |
12 | /*while(1) {\r | |
13 | echo( ord(fgetc($ifp))."-\n" );\r | |
14 | }*/\r | |
15 | \r | |
16 | while($pfp[$i]) {\r | |
17 | echo (fgetc($pfp[$i]));\r | |
18 | if (feof($ifp)) {\r | |
19 | $c = fgetc($ifp);\r | |
20 | if (ereg(chr(1), $c)) { $i++; $pfp[$i] = popen ("cmd.exe", "rw"); echo("\nconsole: $i\n"); }\r | |
21 | if (ereg(chr(25), $c)) { $i--; echo("\nconsole: $i\n"); }\r | |
22 | fwrite ($pfp[$i], $c);\r | |
23 | }\r | |
24 | }\r | |
25 | \r | |
26 | ?>\r |