Nmap Development mailing list archives
RE: Suggestion for Docs
From: "Rob Nicholls" <robert () robnicholls co uk>
Date: Fri, 15 Jan 2010 11:16:02 -0000
Michael had identified the full path wasn't required in a private email to me, I'm glad his code was of use. I must admit that after re-reading my initial response to Michael I may have come across a bit critical, I hope that wasn't the case as it was intended to be constructive. I'm just against hardcoded commands, as drive letters and paths can vary (for example, the default location for net.exe on a Windows x64 host is SysWOW64 not system32, although there is one in system32). I've tried David's new code, and although it was strange seeing a Microsoft dialog box pop up rather than anything Nmap related (I guess that's just how UAC handles it), it did work as described. One thing that was odd, however, was the error message when I told Nmap to run an unprivileged scan: C:\nmap-svn\mswin32\Release>nmap www.robnicholls.co.uk -vv --unprivileged Unable to start NPF service: ShellExecute returned 5. Resorting to unprivileged (non-administrator) mode. I'm not sure if it's an easy fix, but is it possible to only prompt if the user hasn't requested an unprivileged scan? Rob -----Original Message----- From: nmap-dev-bounces () insecure org [mailto:nmap-dev-bounces () insecure org] On Behalf Of David Fifield Sent: 15 January 2010 05:32 To: nmap-dev () insecure org Subject: Re: Suggestion for Docs On Thu, Jan 14, 2010 at 06:49:34AM -0500, Michael Pattrick wrote:
On Thu, Jan 14, 2010 at 6:32 AM, Rob Nicholls <robert () robnicholls co uk>
wrote:
The recommendation to fix the issue, however, might be more complicated
as
there are several ways of doing it: run Nmap/Zenmap at least once using
Run
as Administrator, or modify a registry key and reboot, or run the
command
"net start npf" using an elevated Command Prompt. I wouldn't like to recommend that people always run Nmap/Zenmap as Administrator.Attached is a small program which will run 'net start npf' from an elevated command.
Michael, that was very helpful. Having Nmap run that ShellExecute function makes the UAC dialog appear and load NPF. I found that it works even without the full path to net.exe.
From Wireshark I found the way to check if NPF is already running. I've
committed code that starts NPF with ShellExecute only when necessary. It seems to work well. The UAC dialog appears the first time you run the program, and doesn't after that. David Fifield _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/ _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/
Current thread:
- Suggestion for Docs Richards, Toby (Jan 06)
- Re: Suggestion for Docs Fyodor (Jan 13)
- Re: Suggestion for Docs Michael Pattrick (Jan 13)
- Re: Suggestion for Docs Richards, Toby (Jan 13)
- Re: Suggestion for Docs Hans Nilsson (Jan 14)
- RE: Suggestion for Docs Rob Nicholls (Jan 14)
- Re: Suggestion for Docs Michael Pattrick (Jan 14)
- RE: Suggestion for Docs Rob Nicholls (Jan 14)
- Re: Suggestion for Docs David Fifield (Jan 14)
- RE: Suggestion for Docs Rob Nicholls (Jan 15)
- Re: Suggestion for Docs Michael Pattrick (Jan 15)
- Re: Suggestion for Docs David Fifield (Jan 15)
- Re: Suggestion for Docs Michael Pattrick (Jan 13)
- Re: Suggestion for Docs Fyodor (Jan 13)
- Message not available
- RE: Suggestion for Docs Rob Nicholls (Jan 14)
- Re: Suggestion for Docs 'Fyodor' (Jan 14)
- [PATCH] WinPcap Bug Fixes Rob Nicholls (Jan 15)
- RE: [PATCH] WinPcap Bug Fixes Rob Nicholls (Jan 15)
- Re: Suggestion for Docs David Fifield (Jan 15)
- RE: Suggestion for Docs Rob Nicholls (Jan 15)