1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
alias testq {
sockopen testq thevoice.dk
}
on *:sockopen:testq:{
write -c Sockets2.txt
sockwrite -n $sockname GET index.jsp?menuId=625967 HTTP/1.1
sockwrite -n $sockname Host: thevoice.dk
sockwrite -n $sockname User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6)
sockwrite -n $sockname $crlf
}
on *:sockread:testq:{
if ($sockerr) { return }
sockread -f &xsh.txt
bwrite Sockets2.txt -1 -1 &xsh.txt
set %i 1
if ($file(sockets2.txt).size >= $read(sockets2.txt,s,Content-Length:)) {
.fopen test Sockets2.txt
.fseek -w testq Connection: *
noop $fread(testq)
while (!$fopen(testq).eof) { echo $fread(testq) }
.fclose testq
sockclose testq
}
} |