robertdavidgraham / masscan

TCP port scanner, spews SYN packets asynchronously, scanning entire Internet in under 5 minutes.
GNU Affero General Public License v3.0
23.55k stars 3.08k forks source link

Results of nmap and masscan are different for localhost #129

Open ttohin opened 9 years ago

ttohin commented 9 years ago

mac os x

$:nmap 127.0.0.1
Starting Nmap 6.47 ( http://nmap.org ) at 2014-11-05 12:33 MSK
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00017s latency).
Not shown: 996 closed ports
PORT      STATE SERVICE
80/tcp    open  http
631/tcp   open  ipp
Nmap done: 1 IP address (1 host up) scanned in 6.17 seconds

and output of masscan:

$: bin/masscan 127.0.0.1 --ports 0-65535
Starting masscan 1.0.3 (http://bit.ly/14GZzcT) at 2014-11-05 09:15:22 GMT
 -- forced options: -sS -Pn -n --randomize-hosts -v --send-eth
Initiating SYN Stealth Scan
Scanning 1 hosts [65536 ports/host]

and nothing – no opened ports found

scripts commented 9 years ago

hi,you can try todo this use sudo commands。

发自我的 iPhone

在 2014年11月5日,下午5:37,Anton Simakov notifications@github.com 写道:

mac os x

$:nmap 127.0.0.1 Starting Nmap 6.47 ( http://nmap.org ) at 2014-11-05 12:33 MSK Nmap scan report for localhost (127.0.0.1) Host is up (0.00017s latency). Not shown: 996 closed ports PORT STATE SERVICE 80/tcp open http 631/tcp open ipp Nmap done: 1 IP address (1 host up) scanned in 6.17 seconds and output of masscan:

$: bin/masscan 127.0.0.1 --ports 0-65535 Starting masscan 1.0.3 (http://bit.ly/14GZzcT) at 2014-11-05 09:15:22 GMT -- forced options: -sS -Pn -n --randomize-hosts -v --send-eth Initiating SYN Stealth Scan Scanning 1 hosts [65536 ports/host] and nothing – no opened ports found

— Reply to this email directly or view it on GitHub.

ttohin commented 9 years ago

Same result - nothing

robertdavidgraham commented 9 years ago

Hi.

Masscan uses a custom stack. It cannot scan the local host.

On Wednesday, November 5, 2014 4:37 AM, Anton Simakov notifications@github.com wrote:

mac os x $:nmap 127.0.0.1 Starting Nmap 6.47 ( http://nmap.org ) at 2014-11-05 12:33 MSK Nmap scan report for localhost (127.0.0.1) Host is up (0.00017s latency). Not shown: 996 closed ports PORT STATE SERVICE 80/tcp open http 631/tcp open ipp Nmap done: 1 IP address (1 host up) scanned in 6.17 seconds and output of masscan: $: bin/masscan 127.0.0.1 --ports 0-65535 Starting masscan 1.0.3 (http://bit.ly/14GZzcT) at 2014-11-05 09:15:22 GMT -- forced options: -sS -Pn -n --randomize-hosts -v --send-eth Initiating SYN Stealth Scan Scanning 1 hosts [65536 ports/host] and nothing – no opened ports found — Reply to this email directly or view it on GitHub.

ttohin commented 9 years ago

Yes, It wasn't obvious but I figured it out. Thank you.

ttohin commented 9 years ago

Please, close the issue