Nmap Development mailing list archives

RE: Unofficial WinPcap Installer Issue


From: "Rob Nicholls" <robert () everythingeverything co uk>
Date: Tue, 20 May 2008 00:15:03 +0100

I was hoping to avoid using sc.exe because it's not installed on Windows
2000 (it's part of the Windows 2000 Server Resource Kit though), but it does
seem like a good way of doing it. I could perhaps check that the user has
Windows XP or higher before offering the modified options (but that might
mean yet another ini file for InstallOptions :-S). That way it wouldn't be
any less user friendly on Windows 2000 than the current setup file (and
Win2K users are probably used to frequent restarts hehe), but would be
better for those using systems that aren't in Extended Support from
Microsoft.

Based on the info provided, I'm now considering playing with VBScript and
WMI (which 2000 should support) to try and do the same thing using
objService.Create:
http://www.microsoft.com/technet/scriptcenter/guide/sas_ser_unza.mspx?mfr=tr
ue

Thanks jah and GV for the advice so far, I'll have a play and see what works
most reliably. Ideally I'd like to see WinPcap's installer support a silent
option so we can ditch Nmap's version of the installer ;)


Rob


-----Original Message-----
From: jah [mailto:jah () zadkiel plus com]
Sent: 19 May 2008 20:46
To: Rob Nicholls
Cc: nmap-dev
Subject: Re: Unofficial WinPcap Installer Issue

Hi,

This might help a bit.
I've had a look at the CACE installer for winpcap (using 7zip) and it
includes WinPcapInstall.dll  which exports a public method(?) called
manage_npf_driver(char *,char)
It seems that this function calls OpenSCManagerA and CreateServiceA to
create a service using the Service Control Manager.
Running sc query npf gives:

SERVICE_NAME: npf
        TYPE               : 1  KERNEL_DRIVER
        STATE              : 4  RUNNING

(STOPPABLE,NOT_PAUSABLE,IGNORES_SHUTDOWN)
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0
        PID                : 0
        FLAGS              :

So it looks like nmap's winpcap installer will have to do something
like

sc create npf binpath= %windir%\system32\drivers\npf.sys type= kernel

start= may also be required, I'm not sure what the value would need to
be.

then sc start npf should start the service.

Could be a step in the right direction.

Regards,

jah

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org


_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org


Current thread: