Created
November 20, 2015 13:33
-
-
Save AlifArnado/ae5a838da83004b1fb46 to your computer and use it in GitHub Desktop.
Testing Call System Nmap Using PHP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title>Scanner Port Using NMap PHP</title> | |
<link rel="stylesheet" href=""> | |
</head> | |
<body> | |
<form method="POST" action=""> | |
<label for="input URL">Input URL or IPAddress</label> | |
<input type="text" name="url_name" value="" placeholder="input url or IpAddress"> | |
<input type="submit" name="submit" value="Scanner This Port"> | |
</form> | |
</body> | |
</html> | |
<?php | |
/** | |
* Mencoba meremote system Nmap Menggunakan PHP | |
* Name : Alif Benden Arnado | |
* Author : PHP Network | |
*/ | |
if ($_POST) { | |
try { | |
$server = $_POST['url_name']; | |
/*---------- Setting Directory Nmap Location ----------*/ | |
echo "<pre>"; | |
echo "<h3>Report Scanning Nmap : </h3>"; | |
system("/usr/bin/nmap $server"); | |
echo "</pre>"; | |
} catch (Exception $e) { | |
die("map Not Foun". $e); | |
} finally { | |
/*---------- Kill Task Nmap ----------*/ | |
system("killall -q nmap"); | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment