Is it possible to use nmap
to ping like a url with an embedded port number? .
How would I ping this? http://openleadr.org:8911/OpenADR2/Simple/2.0b
?
I think nmap -p 8911 openleadr.org
would work but doesn't it leave off the remaining URL? /OpenADR2/Simple/2.0b
Would it also make a difference if the site was https?
I think you are mixing up a few things here. A ping test works using ICMP and will therefore only check network-layer connectivity.
nmap -p
will simply check whether there is some process listening on that port. Therefore it checks transport-layer end-to-end connectivity.
What you seem to be trying to achieve is to check if there is a process responding with HTTP traffic, right? If that is all you want to do, then you could simply consider to create a HTTP (or HTTPS) request using curl
. Depending on what you are trying to inspect about that HTTP endpoint you could parse specific information from the response. For example, although curl may return an HTTP response, this does not mean that the remote host considers the request successfull. To determine that, you would need to check the response code or body.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments