>>> s = commands.getoutput('nmap -O 67.171.238.246')
>>> s
'\nStarting nmap 3.30 ( http://www.insecure.org/nmap/ ) at 2004-02-07 19:36 PST\nNote: Host seems down. If it is really up, but blocking our ping probes, try -P0\nNmap run completed -- 1 IP address (0 hosts up) scanned in 14.875 seconds'
>>> print s
Starting nmap 3.30 ( http://www.insecure.org/nmap/ ) at 2004-02-07 19:36 PST
Note: Host seems down. If it is really up, but blocking our ping probes, try -P0
Nmap run completed -- 1 IP address (0 hosts up) scanned in 14.875 seconds
>>>
note that there are also a number of specialised third party modules that allow you to manipulate packets using libpcap and to do some interesting things in terms of gauging the state of the network in between.
On Saturday, February 7, 2004, at 07:14 PM, Ben Barrett wrote:
If you had the first part setup as a python script that just outputted the--
IP, you could tack on "|xargs nmap -allMyOptions " to the command where you
start that from. man xargs, yada yada; this puts the IP at the end of the
nmap command, with -allMuOptions being whatever you feel comfortable and
legal with in terms of getting the fingerprint from nmap. Just remember,
"every tool is a weapon if you hold it right" (Ani Difranco said that)...
Cheerio,
Ben
PS - those more practiced in python can surely offer a system.something call
to start nmap from python =-)
On Sat, 07 Feb 2004 19:05:14 -0800 john fleming <[EMAIL PROTECTED]> wrote:
| Bob Miller wrote:
|
| >john fleming wrote:
| >
| >
| >
| >>I prefer pyton but is there a gizmo that will translate a url into an
| >>isp so I can run nmap on it and take it's os fingerprint?
| >>
| >>
| >
| >
| >
| >>>>import socket
| >>>>socket.gethostbyname('www.microsoft.com')
| >>>>
| >>>>
| >'207.46.244.188'
| >
| >Is that what you wanted?
| >
| >
| >
| That is good but how do I get it to hand it to nmap to run the scan?
|
|
|
| _______________________________________________
| EuG-LUG mailing list
| [EMAIL PROTECTED]
| http://mailman.efn.org/cgi-bin/listinfo/eug-lug
-- _______________________________________________ EuG-LUG mailing list [EMAIL PROTECTED] http://mailman.efn.org/cgi-bin/listinfo/eug-lug
Metaphors for system administration -----------------------------------------------
bailing the titanic with paper cups: or polishing the deck chairs thereof
steering an iceberg with a broom: nonexciting challenges await you
capturing runaway bulldozers: once is chance, twice coincidence, ...
_______________________________________________ EuG-LUG mailing list [EMAIL PROTECTED] http://mailman.efn.org/cgi-bin/listinfo/eug-lug
