v0.3-dev
This commit is contained in:
+6
-3
@@ -1,10 +1,13 @@
|
||||
<?php
|
||||
if(empty($_POST['nmapcmd'])) { die("nmapcmd POST var not found"); }
|
||||
|
||||
if(preg_match('/nmap/i', $_POST['nmapcmd']) !== 1) {
|
||||
$post_cmd = $_POST['nmapcmd'];
|
||||
$cleannmapcmd = escapeshellcmd($_POST['nmapcmd']);
|
||||
|
||||
// if(preg_match('/nmap/i', $cleannmapcmd) !== 1) {
|
||||
if(substr($cleannmapcmd, 0, 5) == 'nmap ') {
|
||||
$post_cmd = $cleannmapcmd;
|
||||
} else {
|
||||
$post_cmd = substr($_POST['nmapcmd'], 5);
|
||||
$post_cmd = substr($cleannmapcmd, 5);
|
||||
}
|
||||
|
||||
$file_name = date("Ymd-Hi-s") . "-" . rand(1000000,9999999) . ".xml";
|
||||
|
||||
Reference in New Issue
Block a user