manual nmap scan improvements

3 options to do a scan.
- fast (nmap -F)
- normal
- detailed (nmap -A)
This commit is contained in:
leiweibau
2022-06-29 21:52:22 +02:00
parent 169d69251c
commit 22d909a378
2 changed files with 30 additions and 10 deletions

View File

@@ -1,8 +1,17 @@
<?php
$PIA_HOST_IP = $_REQUEST['scan'];
exec('nmap '.$PIA_HOST_IP, $output);
echo 'Scan Results of the target: '.$PIA_HOST_IP;
$PIA_SCAN_MODE = $_REQUEST['mode'];
if ($PIA_SCAN_MODE == 'fast') {
exec('nmap -F '.$PIA_HOST_IP, $output);
} elseif ($PIA_SCAN_MODE == 'normal') {
exec('nmap '.$PIA_HOST_IP, $output);
} elseif ($PIA_SCAN_MODE == 'detail') {
exec('nmap -A '.$PIA_HOST_IP, $output);
}
echo '<h4>Scan ('.$PIA_SCAN_MODE.') Results of: '.$PIA_HOST_IP.'</h4>';
echo '<pre style="border: none;">';
foreach($output as $line){
echo $line . "\n";