Skip to content

Commit

Permalink
o [Ndiff] Ndiff is now included in the Windows zip distribution. For
Browse files Browse the repository at this point in the history
  space reasons, it is not an executable compiled with py2exe as in
  the executable installer, rather it is the Ndiff source code
  (ndiff.py) and a batch file wrapper (ndiff.bat). Because it's not
  precompiled, it's necessary to have a Python interpreter
  installed. [David]
  • Loading branch information
david committed Feb 4, 2009
1 parent 5ec6085 commit 7f3effd
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Nmap Changelog ($Id$); -*-text-*-

o [Ndiff] Ndiff is now included in the Windows zip distribution. For
space reasons, it is not an executable compiled with py2exe as in
the executable installer, rather it is the Ndiff source code
(ndiff.py) and a batch file wrapper (ndiff.bat). Because it's not
precompiled, it's necessary to have a Python interpreter
installed. [David]

o [Zenmap] A better method of detecting the system locale is used, so
it should not be necessary to set the LANG environment variable on
Windows to get internationalized text. Thanks to Dirk Loss for the
Expand Down
5 changes: 5 additions & 0 deletions mswin32/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ winbuild:
cp winpcap/winpcap-nmap-*.exe nmap-$(NMAP_VERSION)
cp vcredist_x86.exe nmap-$(NMAP_VERSION)
cp ../ncat/Release/ncat.exe nmap-$(NMAP_VERSION)
# Install the ndiff batch file wrapper in the zip distribution.
cp ../ndiff/ndiff nmap-$(NMAP_VERSION)/ndiff.py
cp python-wrap.bat nmap-$(NMAP_VERSION)/ndiff.bat
zip -r nmap-$(NMAP_VERSION)-win32.zip nmap-$(NMAP_VERSION)
# Remove ndiff.py and ndiff.bat for the installer because it has ndiff.exe.
rm -f nmap-$(NMAP_VERSION)/ndiff.py nmap-$(NMAP_VERSION)/ndiff.bat
cd ../zenmap && install_scripts/windows/copy_and_compile.bat
cp -R ../zenmap/dist/* nmap-$(NMAP_VERSION)/
cp ../zenmap/README nmap-$(NMAP_VERSION)/ZENMAP_README
Expand Down
35 changes: 35 additions & 0 deletions mswin32/python-wrap.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@echo off

rem This batch file searches for a Python interpreted and uses it to run a
rem script. It displays an error message if not Python is found. The script
rem to run must have the same filename as the batch file, with an extension of
rem .py rather than .bat.

setlocal

rem %0 is the name of the batch file. "dpn" means drive, path, filename
rem (excluding extension).
set PROG=%~dpn0.py

if not exist "%PROG%" (
echo Cannot run %PROG%
echo because that file does not exist.
exit /B 1
)

set PATH=%PATH%;C:\Python26;C:\Python25;C:\Python24
for %%P in ( python.exe ) do set PYTHON=%%~f$PATH:P

if not exist "%PYTHON%" (
echo Cannot run %PROG%
echo because python.exe was not found anywhere in
echo %PATH%.
echo.
echo To run this program, download and install Python from
echo http://www.python.org/download.
exit /B 1
)

"%PYTHON%" "%PROG%" %*

endlocal

0 comments on commit 7f3effd

Please sign in to comment.