Advertisement
rupakita

NMAP Command

Nov 2nd, 2016
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.08 KB | None | 0 0
  1. Scan Hostname:
  2. [root@server1 ~]# nmap server2.tecmint.com
  3.  
  4. Scan IP:
  5. [root@server1 ~]# nmap 192.168.0.101
  6.  
  7. Scan -V (detail):
  8. [root@server1 ~]# nmap -v server2.tecmint.com
  9.  
  10. Scan Multiple Host:
  11. [root@server1 ~]# nmap 192.168.0.101 192.168.0.102 192.168.0.103
  12.  
  13. Scan subnet:
  14. [root@server1 ~]# nmap 192.168.0.*
  15.  
  16. Scan Multiple Servers using last octet of IP address:
  17. [root@server1 ~]# nmap 192.168.0.101,102,103
  18.  
  19. Scan list of Hosts from a File:
  20. [root@server1 ~]# cat > nmaptest.txt
  21.  
  22. Scan an IP Address Range:
  23. [root@server1 ~]# nmap 192.168.0.101-110
  24.  
  25. Scan Network Excluding Remote Hosts:
  26. [root@server1 ~]# nmap 192.168.0.* --exclude 192.168.0.100
  27.  
  28. Scan OS information and Traceroute:
  29. [root@server1 ~]# nmap -A 192.168.0.101
  30.  
  31. OS Detection:
  32. [root@server1 ~]# nmap -O server2.tecmint.com
  33.  
  34. Scan a Host to Detect Firewall:
  35. [root@server1 ~]# nmap -sA 192.168.0.101
  36.  
  37. Scan a Host to check its protected by Firewall:
  38. [root@server1 ~]# nmap -PN 192.168.0.101
  39.  
  40. Find out Live hosts in a Network:
  41. [root@server1 ~]# nmap -sP 192.168.0.*
  42.  
  43. Scan Ports Consecutively:
  44. [root@server1 ~]# nmap -r 192.168.0.101
  45.  
  46. Print Host interfaces and Routes:
  47. [root@server1 ~]# nmap --iflist
  48.  
  49. Scan for specific Port:
  50. [root@server1 ~]# nmap -p 80 server2.tecmint.com
  51.  
  52. Scan a TCP Port:
  53. [root@server1 ~]# nmap -p T:8888,80 server2.tecmint.com
  54.  
  55. Scan a UDP Port:
  56. [root@server1 ~]# nmap -sU 53 server2.tecmint.com
  57.  
  58. Scan Multiple Ports:
  59. [root@server1 ~]# nmap -p 80,443 192.168.0.101
  60.  
  61. Scan Ports by Network Range:
  62. [root@server1 ~]#  nmap -p 80-160 192.168.0.101
  63.  
  64. Scan remote hosts using TCP ACK (PA) and TCP Syn (PS):
  65. [root@server1 ~]# nmap -PS 192.168.0.101
  66.  
  67. Scan Remote host for specific ports with TCP ACK:
  68. [root@server1 ~]# nmap -PA -p 22,80 192.168.0.101
  69.  
  70. Scan Remote host for specific ports with TCP Syn:
  71. [root@server1 ~]# nmap -PS -p 22,80 192.168.0.101
  72.  
  73. Perform a stealthy Scan:
  74. [root@server1 ~]# nmap -sS 192.168.0.101
  75.  
  76. Check most commonly used Ports with TCP Syn:
  77. [root@server1 ~]# nmap -sT 192.168.0.101
  78.  
  79. Perform a tcp null scan to fool a firewall:
  80. [root@server1 ~]# nmap -sN 192.168.0.101
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement