Git Product home page Git Product logo

Comments (5)

mxrch avatar mxrch commented on August 15, 2024 1

My solution would be to first do a ping scan on the hosts with --unprivileged, then do the real scan with -Pn and without --unprivileged
Anyway it's my problem now, thanks :)

from nmap.

mxrch avatar mxrch commented on August 15, 2024

For example you can take a totally randomly written IP : 192.125.125.0/24

from nmap.

Ullaakut avatar Ullaakut commented on August 15, 2024

Hi @mxrch ! Thanks for opening this issue :)

Just for clarification, the nmap package does not tell or do much, it just calls the nmap binary. Do you encounter a different behavior when running the nmap binary with the same parameters? Since the package simply parses the output of the binary to define what to return to its users, I am assuming that for some reason while it might not be visible with the standard nmap output, if you enable the -X (XML) option in Nmap to test it yourself, you'll see hosts shown as up.

Could you please provide more information, such as:

  • the actual contents of what nmap returns to you
  • the XML output of the nmap command when you run it yourself (not through the package) -- to rule out a parsing issue
  • if possible, the XML output that the nmap package creates when running nmap (you can do so by using the WithNmapOutput scanner option)
// WithNmapOutput makes nmap output standard output to the filename specified.
func WithNmapOutput(outputFileName string) Option {
	return func(s *Scanner) {
		s.args = append(s.args, "-oN")
		s.args = append(s.args, outputFileName)
	}
}

Thank you :) Have a good day!

from nmap.

mxrch avatar mxrch commented on August 15, 2024

Hello @Ullaakut, thanks for responding fast.

I have just noticed that this is caused by... launching nmap with sudo.

nmap 192.125.125.7 -p 80,443
Starting Nmap 7.80 ( https://nmap.org ) at 2021-03-24 15:13 CET
Note: Host seems down. If it is really up, but blocking our ping probes, try -Pn
Nmap done: 1 IP address (0 hosts up) scanned in 3.04 seconds
sudo nmap 192.125.125.7 -p 80,443
Starting Nmap 7.80 ( https://nmap.org ) at 2021-03-24 15:13 CET
Nmap scan report for 192.125.125.7
Host is up (0.00038s latency).

PORT    STATE    SERVICE
80/tcp  filtered http
443/tcp filtered https

Nmap done: 1 IP address (1 host up) scanned in 1.40 seconds

from nmap.

Ullaakut avatar Ullaakut commented on August 15, 2024

No problem, thanks for the detailed explanations, this might help other people in the future! :)

from nmap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.