forked from nmap/npcap
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added "WinPcap Mode", in this mode, Npcap uses all WinPcap names and …
…APIs. So any software using WinPcap can use Npcap without change.
- Loading branch information
Showing
14 changed files
with
1,516 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
|
||
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: | ||
:: Copy Npcap driver files | ||
xcopy /Y "..\packetWin7\npf\Win7Release\npf Package\npf.cat" .\win7_above_winpcap\x86 | ||
xcopy /Y "..\packetWin7\npf\Win7Release\npf Package\npf.inf" .\win7_above_winpcap\x86 | ||
xcopy /Y "..\packetWin7\npf\Win7Release\npf Package\npf.sys" .\win7_above_winpcap\x86 | ||
xcopy /Y "..\packetWin7\npf\x64\Win7Release\npf Package\npf.cat" .\win7_above_winpcap\x64 | ||
xcopy /Y "..\packetWin7\npf\x64\Win7Release\npf Package\npf.inf" .\win7_above_winpcap\x64 | ||
xcopy /Y "..\packetWin7\npf\x64\Win7Release\npf Package\npf.sys" .\win7_above_winpcap\x64 | ||
xcopy /Y "..\packetWin7\npf\Win7ReleaseAdmin-onlyMode\npf Package\npf.cat" .\win7_above_winpcap\x86\admin_only | ||
xcopy /Y "..\packetWin7\npf\Win7ReleaseAdmin-onlyMode\npf Package\npf.inf" .\win7_above_winpcap\x86\admin_only | ||
xcopy /Y "..\packetWin7\npf\Win7ReleaseAdmin-onlyMode\npf Package\npf.sys" .\win7_above_winpcap\x86\admin_only | ||
xcopy /Y "..\packetWin7\npf\x64\Win7ReleaseAdmin-onlyMode\npf Package\npf.cat" .\win7_above_winpcap\x64\admin_only | ||
xcopy /Y "..\packetWin7\npf\x64\Win7ReleaseAdmin-onlyMode\npf Package\npf.inf" .\win7_above_winpcap\x64\admin_only | ||
xcopy /Y "..\packetWin7\npf\x64\Win7ReleaseAdmin-onlyMode\npf Package\npf.sys" .\win7_above_winpcap\x64\admin_only | ||
|
||
:: Copy Packet.dll | ||
xcopy /Y "..\packetWin7\Dll\Project\Release No NetMon and AirPcap(WinPcap Mode)\Packet.dll" .\win7_above_winpcap\x86 | ||
xcopy /Y "..\packetWin7\Dll\Project\x64\Release No NetMon and AirPcap(WinPcap Mode)\Packet.dll" .\win7_above_winpcap\x64 | ||
|
||
:: Copy NPFInstall.exe | ||
xcopy /Y "..\packetWin7\NPFInstall\Release(WinPcap Mode)\NPFInstall.exe" .\win7_above_winpcap\x86 | ||
xcopy /Y "..\packetWin7\NPFInstall\x64\Release(WinPcap Mode)\NPFInstall.exe" .\win7_above_winpcap\x64 | ||
|
||
:: Copy NPcapHelper.exe | ||
xcopy /Y "..\packetWin7\Helper\release\NPcapHelper.exe" .\win7_above_winpcap\x86\admin_only | ||
xcopy /Y "..\packetWin7\Helper\x64\release\NPcapHelper.exe" .\win7_above_winpcap\x64\admin_only | ||
|
||
:: Npcap uses the original WinPcap wpcap.dll with exactly the same code, we just changed the version number. | ||
:: Copy wpcap.dll | ||
xcopy /Y "..\wpcap\PRJ\Release No AirPcap\x86\wpcap.dll" . | ||
xcopy /Y "..\wpcap\PRJ\Release No AirPcap\x64\wpcap.dll" .\x64 | ||
|
||
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: | ||
:: First need to add "signtool.exe" to PATH, then put the cert file (e.g. C:\xxx.pfx) to environment variable %NPF_CERT_PATH%, | ||
:: put the private key string (e.g. 123456) to environment variable %NPF_SIGN_PK% | ||
|
||
:: Sign Packet.dll | ||
signtool sign /f %NPF_CERT_PATH% /p %NPF_SIGN_PK% .\win7_above_winpcap\x86\Packet.dll | ||
signtool sign /f %NPF_CERT_PATH% /p %NPF_SIGN_PK% .\win7_above_winpcap\x64\Packet.dll | ||
|
||
:: Sign NPFInstall.exe | ||
signtool sign /f %NPF_CERT_PATH% /p %NPF_SIGN_PK% .\win7_above_winpcap\x86\NPFInstall.exe | ||
signtool sign /f %NPF_CERT_PATH% /p %NPF_SIGN_PK% .\win7_above_winpcap\x64\NPFInstall.exe | ||
|
||
:: Sign NPcapHelper.exe | ||
signtool sign /f %NPF_CERT_PATH% /p %NPF_SIGN_PK% .\win7_above_winpcap\x86\admin_only\NPcapHelper.exe | ||
signtool sign /f %NPF_CERT_PATH% /p %NPF_SIGN_PK% .\win7_above_winpcap\x64\admin_only\NPcapHelper.exe | ||
|
||
:: Sign wpcap.dll | ||
signtool sign /f %NPF_CERT_PATH% /p %NPF_SIGN_PK% .\wpcap.dll | ||
signtool sign /f %NPF_CERT_PATH% /p %NPF_SIGN_PK% .\x64\wpcap.dll | ||
|
||
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: | ||
:: First need to add "makensis.exe" to PATH | ||
:: Generate installer | ||
"C:\Program Files (x86)\NSIS\makensis.exe" .\NPcap-for-nmap.nsi | ||
|
||
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: | ||
:: Sign npcap-nmap-0.01.exe | ||
signtool sign /f %NPF_CERT_PATH% /p %NPF_SIGN_PK% .\npcap-nmap-0.01.exe | ||
|
||
pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.