#!/sbin/cgi if ($REQUEST_METHOD == "POST") { if ($action == "download") { $filename = $file; if (ereg(".*/([^[:space:]/]+)", $file, $res)) { $filename=$res[1]; } header("Content-Type: application/x-download"); header("Content-Disposition: attachment;filename=" + $filename); passthru("cat " + $file); exit; } } > SecureVar("cmd*"); SecureVar("lines"); include("lib/settings.inc"); $cfg = @cfg_load($cfg_file); include("lib/l10n.inc"); include("lib/link.inc"); include("lib/misc.inc"); include("lib/system.inc"); if ($cfg == -1) { include("lib/busy.tmpl"); exit; } >
|