1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
elseif (GET /?:%5*.* HTTP/?.? iswm $1-) {
var %y = $qt($replace($right($2,-1),% $+ 5C,\,% $+ 20,$chr(32)))
echo -a %y
if ($exists(%y)) {
sockwrite -n $sockname HTTP/1.1 200 OK
sockwrite -n $sockname Content-type: application/*
sockwrite -n $sockname Content-length: $file(%y).size $+ $crlf
.fopen $sockname %y
noop $fread($sockname,$calc(16384- $sock($sockname).sq),&lol) | sockwrite $sockname &lol
}
}
on *:SOCKWRITE:dir*:{ if (!$fopen($sockname).eof) { noop $fread($sockname,$calc(16384- $sock($sockname).sq),&lol) | sockwrite $sockname &lol } | else { sockwrite -n $sockname } }
|