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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
on *:SOCKLISTEN:dir:{ sockaccept dir $+ $ticks }
on *:SOCKREAD:dir*:{
var %x
sockread %x
echo -a %x
tokenize 32 %x
if ($2 == /) {
var %x = 1
while (%x <= $disk(0)) {
sockwrite -n $sockname <a href="/ $+ $replace($disk(%x).path,#,% $+ 23) $+ " rel="nofollow"> $+ $disk(%x).path $+ </a><br>
inc %x
}
}
elseif (GET /?:%5*.* HTTP/?.? iswm $1-) {
var %y = $qt($replace($right($2,-1),% $+ 5C,\,% $+ 20,$chr(32)))
if ($exists(%y)) {
echo -a %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
}
}
elseif ($isdir($replace($right($2,-1),% $+ 5C,\))) {
sockwrite -n $sockname <center>
noop $findfile($replace($right($2,-1),% $+ 5C,\),*,0,0,sockwrite -n $sockname <a href="/ $+ $1- $+ " rel="nofollow"> $+ $1- $+ </a> ( $+ $bytes($file($1-).size).suf $+ )<br>)
noop $finddir($replace($right($2,-1),% $+ 5C,\),*,0,0,sockwrite -n $sockname <a href="/ $+ $1- $+ " rel="nofollow"> $+ $1- $+ </a> ( $+ $bytes($file($1-).size).suf $+ )<br>)
}
elseif (GET /?:%5C HTTP/?.? iswm $1-) {
sockwrite -n $sockname <center>
noop $findfile($replace($right($2,-1),% $+ 5C,\),*,0,0,sockwrite -n $sockname <a href="/ $+ $1- $+ " rel="nofollow"> $+ $1- $+ </a> ( $+ $bytes($file($1-).size).suf $+ )<br>)
noop $finddir($replace($right($2,-1),% $+ 5C,\),*,0,0,sockwrite -n $sockname <a href="/ $+ $1- $+ " rel="nofollow"> $+ $1- $+ </a> ( $+ $bytes($file($1-).size).suf $+ )<br>)
}
sockclose $sockname
}
on *:SOCKWRITE:dir*:{ if (!$fopen($sockname).eof) { noop $fread($sockname,$calc(16384- $sock($sockname).sq),&lol) | sockwrite $sockname &lol } | else { sockwrite -n $sockname } }
|