Port Scanner
The Port Scanner tool in DevKnife is a simple GUI for Nmap on macOS. It lets you scan open ports on a target host without needing to remember complex command‑line arguments. Nmap itself is a powerful and widely used network exploration tool, and DevKnife makes it easier to use in a clean, native interface.

Installing Nmap
Section titled “Installing Nmap”Nmap is required for the Port Scanner tool to work. You can install it using one of the following options:
1. Use Homebrew
Section titled “1. Use Homebrew”If you have Homebrew installed, run this command in Terminal:
brew install nmap
2. Download from the official site
Section titled “2. Download from the official site”Alternatively, download Nmap for macOS from the official site and follow the installation instructions:
https://nmap.org/download.html#macosx
Standard Usage
Section titled “Standard Usage”By default, DevKnife runs Nmap scans without requiring root privileges.
- You can use the Standard scan type.
- OS detection will be disabled.
These settings work out of the box and should be sufficient for basic port scanning.
Advanced Usage with Root Privileges
Section titled “Advanced Usage with Root Privileges”To unlock the full functionality of Nmap, including SYN stealth scans and OS detection, root privileges are required.
You can enable this in two ways:
1. Add a sudoers rule for Nmap (Recommended)
Section titled “1. Add a sudoers rule for Nmap (Recommended)”Create a configuration file inside the /etc/sudoers.d/
directory. This file allows your user account to run the Nmap binary with elevated permissions without typing your password.
Run the following command in Terminal:
echo "$(whoami) ALL=(ALL) NOPASSWD: $(which nmap)" \ | sudo tee /etc/sudoers.d/devknife-nmap \ > /dev/null
2. Set the setuid bit on the Nmap binary (Less Secure)
Section titled “2. Set the setuid bit on the Nmap binary (Less Secure)”This method changes the ownership and permissions of the Nmap executable so it always runs with root privileges. While it works, it is less secure because any process on the system could potentially run Nmap as root.
Run the following command in Terminal:
sudo chown root:wheel $(which nmap) \ && sudo chmod 4755 $(which nmap)
Privacy
Section titled “Privacy”Port scanning happens entirely on your machine using the local Nmap installation. DevKnife does not send scan results to any external server.