From 6717eb0b1c5827fd1555130c95050676dad3c9fa Mon Sep 17 00:00:00 2001 From: GM-Script-Writer-62850 Date: Mon, 1 Jul 2013 15:48:14 -0400 Subject: [PATCH] features+fixes+cleanup --- .htaccess | 3 +- README | 2 +- download.php | 9 ++-- inc/footer.php | 5 +- inc/header.php | 29 ++++++----- inc/index.php | 14 ++++++ inc/login.php | 133 +++++++++++++++++++++++++++++++++++++++++++++++++ inc/main.js | 31 ++++++++++++ inc/paper.php | 2 +- inc/style.php | 31 ++++++++---- index.php | 30 ++++++----- 11 files changed, 245 insertions(+), 44 deletions(-) create mode 100644 inc/index.php create mode 100644 inc/login.php diff --git a/.htaccess b/.htaccess index 03670b3..f7605b6 100644 --- a/.htaccess +++ b/.htaccess @@ -1,4 +1,5 @@ -ErrorDocument 404 / +ErrorDocument 403 /inc/ +ErrorDocument 404 /inc/ # I will leave these here for you to enable # ErrorDocument 401 https://i.chzbgr.com/maxW500/1935027968/hE19A8C6D/ diff --git a/README b/README index 5134a65..f4af0a9 100644 --- a/README +++ b/README @@ -5,7 +5,7 @@ Based on Linux Scanner Server 1.2 Beta Released under the GPL 2.0 -Last Update: 06/30/2013 (Month/Day/Year) +Last Update: 07/01/2013 (Month/Day/Year) For Version: 1.3-6 Change Log: diff --git a/download.php b/download.php index 56517b5..de72094 100644 --- a/download.php +++ b/download.php @@ -14,7 +14,7 @@ function ext2mime($ext){ function returnFile($in,$out,$ext){ header("Pragma: public"); header("Content-type: ".ext2mime($ext)); - header('Content-Disposition: attachment; filename="'.$out.'"'); + header('Content-Disposition: attachment; filename="'.addslashes($out).'"'); if(is_file($in)){ header('Content-Length: '.filesize($in)); readfile($in); @@ -25,7 +25,7 @@ function returnFile($in,$out,$ext){ } } if(isset($_GET['file'])){ - if(strrpos($_GET['file'], "/")>-1) + if(strpos($_GET['file'], "/")>-1) $_GET['file']=substr($_GET['file'],strrpos($_GET['file'],"/")+1); } if(isset($_GET['downloadServer'])){ @@ -74,10 +74,9 @@ function returnFile($in,$out,$ext){ else if(isset($_GET['file'])){ if(file_exists("scans/".$_GET['file'])){ if(isset($_GET['compress'])){ - $name=substr($_GET['file'],0,strrpos($_GET['file'],".")); $file='/tmp/download-'.md5(time().rand()).'.zip'; - shell_exec("cd \"scans\" && zip -r \"$file\" \"".$_GET['file']."\""); - returnFile($file,"$name.zip",'zip'); + shell_exec("cd \"scans\" && zip -r \"$file\" \"".addslashes($_GET['file'])."\""); + returnFile($file,substr($_GET['file'],0,strrpos($_GET['file'],".")),'zip'); @unlink($file); } else{ diff --git a/inc/footer.php b/inc/footer.php index 8306a8c..1032e55 100755 --- a/inc/footer.php +++ b/inc/footer.php @@ -1,5 +1,6 @@ + diff --git a/inc/header.php b/inc/header.php index 91f7e32..d66d2e0 100755 --- a/inc/header.php +++ b/inc/header.php @@ -1,8 +1,9 @@ + -<?php echo $GLOBALS['NAME']; ?> ~ <?php echo $GLOBALS['PAGE']; ?> -'; ?> - - - - - + + + + + @@ -26,7 +27,7 @@