Created
March 9, 2020 17:38
-
-
Save DanielAdeniji/ff5abb19f91aba51a04fbbd3963bf379 to your computer and use it in GitHub Desktop.
netcat on MS Windows - makewinCustomized.cmd
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
@REM Build script to compile Netcat on WIN32 using MinGW | |
@REM | |
@REM Rodney Beede (http://www.rodneybeede.com) | |
@REM | |
@REM 2009-09-02 | |
@REM | |
@REM Tested with gcc 3.4.5 and MinGW version 5.1.4 | |
setlocal | |
rem dadeniji | |
rem SET COMPILER=c:\MinGW\bin\gcc.exe | |
set _compilerFolder=C:\mingw\x86_64\8.1.0\posix\seh\mingw64\bin | |
set _compilerBinary=gcc.exe | |
set COMPILER=%_compilerFolder%\%_compilerBinary% | |
rem dadeniji | |
rem SET LIB_DIR=c:\MinGW\lib | |
SET LIB_DIR=C:\mingw\x86_64\8.1.0\posix\seh\mingw64\lib | |
rem dadeniji | |
set PATH=%PATH%;%_compilerFolder% | |
@REM not needed? SET COMPILE_OPTIONS=-c -DWIN32 -DNDEBUG -D_CONSOLE -DTELNET | |
SET COMPILE_OPTIONS=-c | |
if exist *.o del *.o | |
if exist nc.exe del nc.exe | |
"%COMPILER%" %COMPILE_OPTIONS% getopt.c | |
"%COMPILER%" %COMPILE_OPTIONS% doexec.c | |
"%COMPILER%" %COMPILE_OPTIONS% netcat.c | |
rem "%COMPILER%" getopt.o doexec.o netcat.o --output nc.exe -Wl,-L"%LIB_DIR%",-lkernel32,-luser32,-lwinmm,-lws2_32 | |
"%COMPILER%" getopt.o doexec.o netcat.o --output nc.exe -lkernel32 -luser32 -lwinmm -lws2_32 | |
endlocal |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment