Compilation on Windows - rhaidiz/bettercap GitHub Wiki
Despite Windows support is not yet 100% complete, it is possible to build bettercap for Microsoft platforms and enjoy 99.99% of the experience. The steps to prepare the building environment are:
- Install go amd64 (add go binaries to your
%PATH%). - Install TDM GCC for amd64 (add TDM-GCC binaries to your
%PATH%). - Also add
TDM-GCC\x86_64-w64-mingw32\binto your%PATH%. - Install winpcap.
- Download Winpcap developer's pack and extract it to
C:\. - Find
wpcap.dllandpacket.dllin your PC (typically inc:\windows\system32). - Copy them to some other temp folder or else you'll have to supply Admin privs to the following commands.
- Run
gendefon those files:gendef wpcap.dllandgendef packet.dll(obtainable withMinGW Installation Manager, packagemingw32-gendef).
This will generate .def files, now we'll generate the static libraries files:
- Run
dlltool --as-flags=--64 -m i386:x86-64 -k --output-lib libwpcap.a --input-def wpcap.def. - and
dlltool --as-flags=--64 -m i386:x86-64 -k --output-lib libpacket.a --input-def packet.def. - Copy both
libwpcap.aandlibpacket.atoc:\WpdPack\Lib\x64.
And eventually just go get github.com/bettercap/bettercap as you would do on other platforms.