diff --git a/CONTROL/control b/CONTROL/control index e94dc2f..f1a88b8 100644 --- a/CONTROL/control +++ b/CONTROL/control @@ -1,7 +1,7 @@ Package: webif Priority: optional Section: web -Version: 0.8.1 +Version: 0.8.1-1 Architecture: mipsel Maintainer: af123@hummypkg.org.uk Depends: mongoose(>=3.0-2),jim(>=0.71-1),jim-sqlite3(>=0.71-1),jim-cgi(>=0.4),jim-oo,jim-pack,service-control,busybox(>=1.18.3-1),lsof,epg(>=1.0.7),hmt(>=1.1.1),ssmtp diff --git a/var/mongoose/cgi-bin/cat.jim b/var/mongoose/cgi-bin/cat.jim new file mode 100755 index 0000000..2c431bf --- /dev/null +++ b/var/mongoose/cgi-bin/cat.jim @@ -0,0 +1,25 @@ +#!/mod/bin/jimsh + +package require cgi +source /mod/var/mongoose/lib/setup +require system.class chunked pretty_size + +cgi_input +#cgi_dump + +set file [cgi_get file "-"] +if {$file eq "-"} { exit } + +start_chunked + +if {![file exists $file]} { + chunk ">>> File $file does not exist.\r\n" +} else { + chunk ">>> Contents of $file [pretty_size [file size $file]]\r\n" + set fp [open $file r] + chunk [read $fp] + close $fp +} + +end_chunked + diff --git a/var/mongoose/html/diag.shtml b/var/mongoose/html/diag.shtml index 47f774a..0d99a81 100644 --- a/var/mongoose/html/diag.shtml +++ b/var/mongoose/html/diag.shtml @@ -1,6 +1,6 @@ -