Back to cheatsheets
Developer
Port Scanning Reference
Common port reference and scanning techniques for identifying exposed services.
What you'll learn
- Common ports reference
- Nmap quick reference
How to use these snippets
- Click the Copy button next to any snippet to copy it to your clipboard.
- Paste the code into your project, IDE, or terminal.
- Replace placeholder values (like
example.comoryour-secret) with your actual data. - Review the code comments for important security notes and caveats.
- Try the interactive related tool to see the concept in action.
Code Snippets
Copy-paste code snippets
2 ready-to-use snippets for port scanning reference. Click copy and paste into your project.
Common ports reference
const COMMON_PORTS = {
20: 'FTP Data',
21: 'FTP Control',
22: 'SSH',
23: 'Telnet',
25: 'SMTP',
53: 'DNS',
80: 'HTTP',
110: 'POP3',
143: 'IMAP',
443: 'HTTPS',
465: 'SMTPS',
587: 'SMTP Submission',
993: 'IMAPS',
995: 'POP3S',
1433: 'MSSQL',
3306: 'MySQL',
3389: 'RDP',
5432: 'PostgreSQL',
6379: 'Redis',
8080: 'HTTP Alt',
8443: 'HTTPS Alt',
27017: 'MongoDB',
};
Nmap quick reference
# Fast scan of common ports
nmap -F target.com
# Full TCP port scan
nmap -p- -T4 --min-rate=1000 target.com
# Service + version detection
nmap -sV -sC -oA scan_results target.com
# UDP scan (top 200 ports)
nmap -sU --top-ports 200 target.com
# OS detection
nmap -O target.com
# Vulnerability scripts
nmap --script vuln -p 443 target.com
Tool
Related ShieldX tool
Try this concept hands-on with the interactive tool.
100% Free · No signup · No cost
Generate something unguessable right now
148 bits of entropy, a crack-time estimate you can trust, and a clipboard that clears itself after 30 seconds.
Part of the Toolly ecosystem · secure.toolly.site