Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Wincent Balin
Wincent Balin

Posted on • Originally published atofdigitalwater.postach.io on

     

Static netcat .exe files

Today we are going to create static.exe binaries fornetcat.

While there are manyports and reimplementations of netcat, we are going to stick withwin32 ports fornetcat 1.11 ornetcat 1.12 (the latter one enables sendingCRLF line endings instead ofCR using command line option-c).

We will useMXE as our cross-compilation environment. Compile thecc package as described in thetutorial. Add the directory with cross-compilers to yourPATH.

Then download and unpack the source from thewin32 ports above and issue the following commands:

i686-w64-mingw32.static-gcc -DNDEBUG -DWIN32 -D_CONSOLE -DTELNET -DGAPING_SECURITY_HOLE getopt.c doexec.c netcat.c -O2 -s -static -lkernel32 -luser32 -lwsock32 -lwinmm -o nc.exe
Enter fullscreen modeExit fullscreen mode

and

x86_64-w64-mingw32.static-gcc -DNDEBUG -DWIN32 -D_CONSOLE -DTELNET -DGAPING_SECURITY_HOLE getopt.c doexec.c netcat.c -O2 -s -static -lkernel32 -luser32 -lwsock32 -lwinmm -o nc64.exe
Enter fullscreen modeExit fullscreen mode

to compile the 32-bit and 64-bit version respectively.

I compiled netcat 1.12 for you and placed it into aDropbox folder.

If you decide to use them, here are the MD5 checksums:

f630164e41932360440f43602f670d21 nc64.exebc3029d3e79265f9ab2e906009adb196 nc.exe
Enter fullscreen modeExit fullscreen mode

Here is the list with the netcat tutorials:

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

I have many interests, mostly where computer science or IT meets music or humanities.
  • Location
    Hamburg, Germany
  • Joined

More fromWincent Balin

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp