Documentation - Running Nmap Command Executor Web App
Documentation - Running Nmap Command Executor Web App
This guide will walk you through setting up and running the Nmap Command Executor web
application. The app allows users to run different Nmap scans via a web interface and
optionally save the scan results.
Prerequisites:
#2. PHP:
The application uses PHP to process Nmap scans, so PHP must be installed. You can install
PHP along with Apache if not already done.
Install PHP
php -v
#3. Nmap:
Nmap should be installed on the server where this app is hosted. To install Nmap:
Create the Folder Structure: You must set up a folder to host the application inside your
Apache server's root directory. By default, Apache’s web root is /var/www/html.
By default, Nmap requires sudo privileges to run certain scans. You can allow Apache to run
Nmap with elevated privileges by modifying the sudoers file to avoid entering a password
every time.
1. Edit the Sudoers File: Open the sudoers file to grant Apache permission to run
Nmap commands without a password:
sudo visudo
Start/Restart Apache:
After setting up the files, ensure Apache is running or restart it:
http://<server-ip>/nmapcode/
Replace <server-ip> with the IP address of your server (or localhost if running on a
local server).
● Scan Results: If the user opts to save scan results, the output will be saved as a
.txt file in the /var/www/html/nmapcode/scans directory. The file can be
downloaded directly from the interface.
● Error Logs: Any issues encountered will be displayed in the web interface, and
Apache logs can be checked for further troubleshooting.
Security Considerations:
1. Permission Denied Errors: If you encounter permission errors, ensure the nmap
command is allowed to be run by the web server using sudo without a password.
2. No Scan Output: Check Apache's error log at /var/log/apache2/error.log
(or /var/log/httpd/error_log on CentOS/RHEL) to identify issues.
This concludes the setup for the Nmap Command Executor. You should now be able to run
Nmap scans from your web browser and save the results!
If you encounter any problems during setup or use, feel free to reach out to us through our
Telegram community for assistance. We're here to help! : t.me/codelivly_chat