I was learning how to use nmap and i have gone through many documentations and tutorials but no where iam getting perfect information about what is the use of -sS and -PS. In general what is the differences between all -s 's and -P 's? Both are for scanning right?
sudo nmap -sS 192.168.0.50
sudo nmap -PS 192.168.0.50
Whats the difference between both of them?
Thanks in advance.
This is well described in documentation.
Before doing port scan, nmap will ping the host to check if it's online.
-Poptions are used to select different ping methods. When-PSis selected, nmap will check if hosts are online by sending single SYN packet.-Pnwill skip this phase and jump right to port scan.-s*options select the method of detecting open ports (for hosts which were determined to be online). With-sSthis will be done by sending singleSYNpacket to each port.It makes sense to combine those options together:
nmap -sS -PS 192.168.0.50will cause nmap to useSYNpackets both for ping and to discover open ports.