{"action":"created","issue":{"url":"https://api.github.com/repos/hashcat/hashcat/issues/23","labels_url":"https://api.github.com/repos/hashcat/hashcat/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/hashcat/hashcat/issues/23/comments","events_url":"https://api.github.com/repos/hashcat/hashcat/issues/23/events","html_url":"https://github.com/hashcat/hashcat/pull/23","id":121509710,"number":23,"title":"Add freebsd build target","user":{"login":"stufus","id":12296344,"avatar_url":"https://avatars.githubusercontent.com/u/12296344?v=3","gravatar_id":"","url":"https://api.github.com/users/stufus","html_url":"https://github.com/stufus","followers_url":"https://api.github.com/users/stufus/followers","following_url":"https://api.github.com/users/stufus/following{/other_user}","gists_url":"https://api.github.com/users/stufus/gists{/gist_id}","starred_url":"https://api.github.com/users/stufus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stufus/subscriptions","organizations_url":"https://api.github.com/users/stufus/orgs","repos_url":"https://api.github.com/users/stufus/repos","events_url":"https://api.github.com/users/stufus/events{/privacy}","received_events_url":"https://api.github.com/users/stufus/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-12-10T15:22:47Z","updated_at":"2015-12-10T17:18:01Z","closed_at":"2015-12-10T16:58:28Z","pull_request":{"url":"https://api.github.com/repos/hashcat/hashcat/pulls/23","html_url":"https://github.com/hashcat/hashcat/pull/23","diff_url":"https://github.com/hashcat/hashcat/pull/23.diff","patch_url":"https://github.com/hashcat/hashcat/pull/23.patch"},"body":"See #20\r\n\r\nI think there are multiple people working on this so I'm happy to go with the majority on this one :) I only did this because I'm a native FreeBSD user and couldn't get the original one going with what was there. Happy to close this or merge it in with another PR - whatever works really.\r\n\r\nHowever, I've tested this on both FreeBSD and Linux and it seems to work. Evidence below:\r\n\r\n__FreeBSD__\r\n\r\n```\r\n[stuart@freefall ~/github/hashcat]$ gmake clean\r\nrm -rf core out word hash release obj/* hashcat.pot hashcat-cli*\r\n[stuart@freefall ~/github/hashcat]$ ls\r\nMakefile           build_freebsd.txt  deps/              examples/          makelog.txt        obj/               salts/             tables/\r\nREADME.md          charsets/          docs/              include/           masks/             rules/             src/               tools/\r\n[stuart@freefall ~/github/hashcat]$ gmake freebsd\r\ngcc -W -Wall -pipe -I include/ -O2 -s -fomit-frame-pointer -funroll-loops -I/usr/local/include -DFREEBSD -DPOSIX -m64 -msse2  -c src/common.c -o obj/common.FREEBSD.64.o\r\ngcc -W -Wall -pipe -I include/ -O2 -s -fomit-frame-pointer -funroll-loops -I/usr/local/include -DFREEBSD -DPOSIX -m64 -msse2  -c src/tsearch.c -o obj/tsearch.FREEBSD.64.o\r\ngcc -W -Wall -pipe -I include/ -O2 -s -fomit-frame-pointer -funroll-loops -I/usr/local/include -DFREEBSD -DPOSIX -m64 -msse2  -c src/rp.c -o obj/rp.FREEBSD.64.o\r\ngcc -W -Wall -pipe -I include/ -O2 -s -fomit-frame-pointer -funroll-loops -I/usr/local/include -DFREEBSD -DPOSIX -m64 -msse2  -c src/engine.c -o obj/engine.FREEBSD.64.o\r\ngcc -W -Wall -pipe -I include/ -O2 -fomit-frame-pointer -funroll-loops -I/usr/local/include -DFREEBSD -DPOSIX -m64 -msse2 obj/*.FREEBSD.64.o src/hashcat-cli.c -o hashcat-cli64.elf  -L/usr/local/lib -lgmp -lm -lpthread -lc\r\n[stuart@freefall ~/github/hashcat]$ ls   \r\nMakefile           build_freebsd.txt  deps/              examples/          include/           masks/             rules/             src/               tools/\r\nREADME.md          charsets/          docs/              hashcat-cli64.elf* makelog.txt        obj/               salts/             tables/\r\n[stuart@freefall ~/github/hashcat]$ ./hashcat-cli64.elf --version\r\n2.00\r\n```\r\n\r\n__Linux__\r\n\r\n```\r\nroot@kali:~/hosthome/github/hashcat# make clean\r\nrm -rf core out word hash release obj/* hashcat.pot hashcat-cli*\r\nroot@kali:~/hosthome/github/hashcat# make\r\ngcc -W -Wall -pipe -I include/ -O2 -s -fomit-frame-pointer -funroll-loops -Ideps/gmp/linux32/include -D__HC_x86_32__ -DPOSIX -m32 -msse2 -c src/common.c -o obj/common.LINUX.32.o\r\ngcc -W -Wall -pipe -I include/ -O2 -s -fomit-frame-pointer -funroll-loops -Ideps/gmp/linux64/include -D__HC_x86_64__ -DPOSIX -m64 -msse2 -c src/common.c -o obj/common.LINUX.64.o\r\ngcc -W -Wall -pipe -I include/ -O2 -s -fomit-frame-pointer -funroll-loops -Ideps/gmp/linux64/include -D__HC_XOP__ -DPOSIX -m64 -mxop -c src/common.c -o obj/common.LINUX.XOP.o\r\ni686-w64-mingw32-gcc -W -Wall -pipe -I include/ -O2 -s -fomit-frame-pointer -funroll-loops -Ideps/gmp/win32/include -D__HC_x86_32__ -DWINDOWS -m32 -msse2 -D__USE_MINGW_ANSI_STDIO=1 -mstackrealign -c src/common.c -o obj/common.WIN.32.o\r\nx86_64-w64-mingw32-gcc -W -Wall -pipe -I include/ -O2 -s -fomit-frame-pointer -funroll-loops -Ideps/gmp/win64/include -D__HC_x86_64__ -DWINDOWS -m64 -msse2 -D__USE_MINGW_ANSI_STDIO=1 -mstackrealign -c src/common.c -o obj/common.WIN.64.o\r\nx86_64-w64-mingw32-gcc -W -Wall -pipe -I include/ -O2 -s -fomit-frame-pointer -funroll-loops -Ideps/gmp/win64/include -D__HC_XOP__ -DWINDOWS -m64 -mxop -D__USE_MINGW_ANSI_STDIO=1 -mstackrealign -c src/common.c -o obj/common.WIN.XOP.o\r\ni686-apple-darwin10-gcc -W -Wall -pipe -I include/ -O2 -s -fomit-frame-pointer -funroll-loops -Ideps/gmp/osx64/include -D__HC_x86_64__ -DPOSIX -DOSX -m64 -msse2 -fnested-functions -arch x86_64 -mmacosx-version-min=10.5 -c src/common.c -o obj/common.OSX.64.o\r\ni686-apple-darwin10-gcc -W -Wall -pipe -I include/ -O2 -s -fomit-frame-pointer -funroll-loops -Ideps/gmp/osx64/include -D__HC_x86_64__ -DPOSIX -DOSX -m64 -msse2 -fnested-functions -arch x86_64 -mmacosx-version-min=10.5 -c src/tsearch.c -o obj/tsearch.OSX.64.o\r\ni686-apple-darwin10-gcc -W -Wall -pipe -I include/ -O2 -s -fomit-frame-pointer -funroll-loops -Ideps/gmp/osx64/include -D__HC_x86_64__ -DPOSIX -DOSX -m64 -msse2 -fnested-functions -arch x86_64 -mmacosx-version-min=10.5 -c src/rp.c -o obj/rp.OSX.64.o\r\ni686-apple-darwin10-gcc -W -Wall -pipe -I include/ -O2 -s -fomit-frame-pointer -funroll-loops -Ideps/gmp/osx64/include -D__HC_x86_64__ -DPOSIX -DOSX -m64 -msse2 -fnested-functions -arch x86_64 -mmacosx-version-min=10.5 -c src/engine.c -o obj/engine.OSX.64.o\r\ngcc -W -Wall -pipe -I include/ -O2 -s -fomit-frame-pointer -funroll-loops -Ideps/gmp/linux64/include -D__HC_XOP__ -DPOSIX -m64 -mxop -c src/tsearch.c -o obj/tsearch.LINUX.XOP.o\r\ngcc -W -Wall -pipe -I include/ -O2 -s -fomit-frame-pointer -funroll-loops -Ideps/gmp/linux64/include -D__HC_XOP__ -DPOSIX -m64 -mxop -c src/rp.c -o obj/rp.LINUX.XOP.o\r\ngcc -W -Wall -pipe -I include/ -O2 -s -fomit-frame-pointer -funroll-loops -Ideps/gmp/linux64/include -D__HC_XOP__ -DPOSIX -m64 -mxop -c src/engine.c -o obj/engine.LINUX.XOP.o\r\ngcc -W -Wall -pipe -I include/ -O2 -s -fomit-frame-pointer -funroll-loops -Ideps/gmp/linux32/include -D__HC_x86_32__ -DPOSIX -m32 -msse2 -c src/tsearch.c -o obj/tsearch.LINUX.32.o\r\ngcc -W -Wall -pipe -I include/ -O2 -s -fomit-frame-pointer -funroll-loops -Ideps/gmp/linux32/include -D__HC_x86_32__ -DPOSIX -m32 -msse2 -c src/rp.c -o obj/rp.LINUX.32.o\r\ngcc -W -Wall -pipe -I include/ -O2 -s -fomit-frame-pointer -funroll-loops -Ideps/gmp/linux32/include -D__HC_x86_32__ -DPOSIX -m32 -msse2 -c src/engine.c -o obj/engine.LINUX.32.o\r\ngcc -W -Wall -pipe -I include/ -O2 -s -fomit-frame-pointer -funroll-loops -Ideps/gmp/linux64/include -D__HC_x86_64__ -DPOSIX -m64 -msse2 -c src/tsearch.c -o obj/tsearch.LINUX.64.o\r\ngcc -W -Wall -pipe -I include/ -O2 -s -fomit-frame-pointer -funroll-loops -Ideps/gmp/linux64/include -D__HC_x86_64__ -DPOSIX -m64 -msse2 -c src/rp.c -o obj/rp.LINUX.64.o\r\ngcc -W -Wall -pipe -I include/ -O2 -s -fomit-frame-pointer -funroll-loops -Ideps/gmp/linux64/include -D__HC_x86_64__ -DPOSIX -m64 -msse2 -c src/engine.c -o obj/engine.LINUX.64.o\r\nx86_64-w64-mingw32-gcc -W -Wall -pipe -I include/ -O2 -s -fomit-frame-pointer -funroll-loops -Ideps/gmp/win64/include -D__HC_XOP__ -DWINDOWS -m64 -mxop -D__USE_MINGW_ANSI_STDIO=1 -mstackrealign -c src/tsearch.c -o obj/tsearch.WIN.XOP.o\r\nx86_64-w64-mingw32-gcc -W -Wall -pipe -I include/ -O2 -s -fomit-frame-pointer -funroll-loops -Ideps/gmp/win64/include -D__HC_XOP__ -DWINDOWS -m64 -mxop -D__USE_MINGW_ANSI_STDIO=1 -mstackrealign -c src/rp.c -o obj/rp.WIN.XOP.o\r\nx86_64-w64-mingw32-gcc -W -Wall -pipe -I include/ -O2 -s -fomit-frame-pointer -funroll-loops -Ideps/gmp/win64/include -D__HC_XOP__ -DWINDOWS -m64 -mxop -D__USE_MINGW_ANSI_STDIO=1 -mstackrealign -c src/engine.c -o obj/engine.WIN.XOP.o\r\ni686-w64-mingw32-gcc -W -Wall -pipe -I include/ -O2 -s -fomit-frame-pointer -funroll-loops -Ideps/gmp/win32/include -D__HC_x86_32__ -DWINDOWS -m32 -msse2 -D__USE_MINGW_ANSI_STDIO=1 -mstackrealign -c src/tsearch.c -o obj/tsearch.WIN.32.o\r\ni686-w64-mingw32-gcc -W -Wall -pipe -I include/ -O2 -s -fomit-frame-pointer -funroll-loops -Ideps/gmp/win32/include -D__HC_x86_32__ -DWINDOWS -m32 -msse2 -D__USE_MINGW_ANSI_STDIO=1 -mstackrealign -c src/rp.c -o obj/rp.WIN.32.o\r\ni686-w64-mingw32-gcc -W -Wall -pipe -I include/ -O2 -s -fomit-frame-pointer -funroll-loops -Ideps/gmp/win32/include -D__HC_x86_32__ -DWINDOWS -m32 -msse2 -D__USE_MINGW_ANSI_STDIO=1 -mstackrealign -c src/engine.c -o obj/engine.WIN.32.o\r\nx86_64-w64-mingw32-gcc -W -Wall -pipe -I include/ -O2 -s -fomit-frame-pointer -funroll-loops -Ideps/gmp/win64/include -D__HC_x86_64__ -DWINDOWS -m64 -msse2 -D__USE_MINGW_ANSI_STDIO=1 -mstackrealign -c src/tsearch.c -o obj/tsearch.WIN.64.o\r\nx86_64-w64-mingw32-gcc -W -Wall -pipe -I include/ -O2 -s -fomit-frame-pointer -funroll-loops -Ideps/gmp/win64/include -D__HC_x86_64__ -DWINDOWS -m64 -msse2 -D__USE_MINGW_ANSI_STDIO=1 -mstackrealign -c src/rp.c -o obj/rp.WIN.64.o\r\nx86_64-w64-mingw32-gcc -W -Wall -pipe -I include/ -O2 -s -fomit-frame-pointer -funroll-loops -Ideps/gmp/win64/include -D__HC_x86_64__ -DWINDOWS -m64 -msse2 -D__USE_MINGW_ANSI_STDIO=1 -mstackrealign -c src/engine.c -o obj/engine.WIN.64.o\r\ngcc -W -Wall -pipe -I include/ -O2 -s -fomit-frame-pointer -funroll-loops -Ideps/gmp/linux64/include -D__HC_XOP__ -DPOSIX -m64 -mxop obj/*.LINUX.XOP.o src/hashcat-cli.c -o hashcat-cliXOP.bin  -Ldeps/gmp/linux64/lib -lm -lpthread -lgmp\r\nx86_64-w64-mingw32-gcc -W -Wall -pipe -I include/ -O2 -s -fomit-frame-pointer -funroll-loops -Ideps/gmp/win64/include -D__HC_XOP__ -DWINDOWS -m64 -mxop -D__USE_MINGW_ANSI_STDIO=1 -mstackrealign obj/*.WIN.XOP.o /usr/x86_64-w64-mingw32/lib/CRT_glob.o src/hashcat-cli.c -o hashcat-cliXOP.exe  -Ldeps/gmp/win64/lib -lm -lgmp\r\ngcc -W -Wall -pipe -I include/ -O2 -s -fomit-frame-pointer -funroll-loops -Ideps/gmp/linux64/include -D__HC_x86_64__ -DPOSIX -m64 -msse2 obj/*.LINUX.64.o src/hashcat-cli.c -o hashcat-cli64.bin  -Ldeps/gmp/linux64/lib -lm -lpthread -lgmp\r\ngcc -W -Wall -pipe -I include/ -O2 -s -fomit-frame-pointer -funroll-loops -Ideps/gmp/linux32/include -D__HC_x86_32__ -DPOSIX -m32 -msse2 obj/*.LINUX.32.o src/hashcat-cli.c -o hashcat-cli32.bin  -Ldeps/gmp/linux32/lib -lm -lpthread -lgmp\r\ni686-w64-mingw32-gcc -W -Wall -pipe -I include/ -O2 -s -fomit-frame-pointer -funroll-loops -Ideps/gmp/win32/include -D__HC_x86_32__ -DWINDOWS -m32 -msse2 -D__USE_MINGW_ANSI_STDIO=1 -mstackrealign obj/*.WIN.32.o /usr/i686-w64-mingw32/lib/CRT_glob.o src/hashcat-cli.c -o hashcat-cli32.exe  -Ldeps/gmp/win32/lib -lm -lgmp\r\nx86_64-w64-mingw32-gcc -W -Wall -pipe -I include/ -O2 -s -fomit-frame-pointer -funroll-loops -Ideps/gmp/win64/include -D__HC_x86_64__ -DWINDOWS -m64 -msse2 -D__USE_MINGW_ANSI_STDIO=1 -mstackrealign obj/*.WIN.64.o /usr/x86_64-w64-mingw32/lib/CRT_glob.o src/hashcat-cli.c -o hashcat-cli64.exe  -Ldeps/gmp/win64/lib -lm -lgmp\r\ni686-apple-darwin10-gcc -W -Wall -pipe -I include/ -O2 -fomit-frame-pointer -funroll-loops -Ideps/gmp/osx64/include -D__HC_x86_64__ -DPOSIX -DOSX -m64 -msse2 -fnested-functions -arch x86_64 -mmacosx-version-min=10.5 obj/*.OSX.64.o src/hashcat-cli.c -o hashcat-cli64.app  -Ldeps/gmp/osx64/lib -lm -lpthread  -mmacosx-version-min=10.5 -lgmp\r\nroot@kali:~/hosthome/github/hashcat# ls \r\nbuild_linux.txt  docs               hashcat-cli32.exe  hashcat-cli64.exe   include      masks      rules  tables\r\ncharsets         examples           hashcat-cli64.app  hashcat-cliXOP.bin  Makefile     obj        salts  tools\r\ndeps             hashcat-cli32.bin  hashcat-cli64.bin  hashcat-cliXOP.exe  makelog.txt  README.md  src\r\nroot@kali:~/hosthome/github/hashcat# ./hashcat-cli32.bin --version\r\n2.00\r\nroot@kali:~/hosthome/github/hashcat# ./hashcat-cli64.bin --version\r\n2.00\r\nroot@kali:~/hosthome/github/hashcat# ./hashcat-cliXOP.bin --version\r\n2.00\r\nroot@kali:~/hosthome/github/hashcat# uname -a\r\nLinux kali 4.0.0-kali1-amd64 #1 SMP Debian 4.0.4-1+kali2 (2015-06-03) x86_64 GNU/Linux\r\n```\r\n\r\nSorry if this seems to have become a bit over-engineered - I kept it out of the main build targets because its not that straightforward to 'cross-compile' for BSD, but I wanted something that would be easy for FreeBSD users which didn't break anything else.\r\n\r\nFeel free to merge/close or just cut/paste into something else as you see fit :)"},"comment":{"url":"https://api.github.com/repos/hashcat/hashcat/issues/comments/163691923","html_url":"https://github.com/hashcat/hashcat/pull/23#issuecomment-163691923","issue_url":"https://api.github.com/repos/hashcat/hashcat/issues/23","id":163691923,"user":{"login":"jsteube","id":10434361,"avatar_url":"https://avatars.githubusercontent.com/u/10434361?v=3","gravatar_id":"","url":"https://api.github.com/users/jsteube","html_url":"https://github.com/jsteube","followers_url":"https://api.github.com/users/jsteube/followers","following_url":"https://api.github.com/users/jsteube/following{/other_user}","gists_url":"https://api.github.com/users/jsteube/gists{/gist_id}","starred_url":"https://api.github.com/users/jsteube/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsteube/subscriptions","organizations_url":"https://api.github.com/users/jsteube/orgs","repos_url":"https://api.github.com/users/jsteube/repos","events_url":"https://api.github.com/users/jsteube/events{/privacy}","received_events_url":"https://api.github.com/users/jsteube/received_events","type":"User","site_admin":false},"created_at":"2015-12-10T17:18:01Z","updated_at":"2015-12-10T17:18:01Z","body":"Well, two things from my side:\r\n\r\n* Having own Targets is good actually, I like that. But you're right, it's missing the targets for XOP and AVX. But he can still add them in the same way as he did for the 64 target.\r\n* It did not add an unnecessary define. You're right for the technical part, it would be unnecessary. But from a non-technical perspective, using -DFREEBSD and introducing a new define is analogue to the windows port. Therefore I'd say it's correct to do it.\r\n* The binary naming I'm unsure. I don't know what's common in the FreeBSD world. That said, using .bin in Linux isn't correct either, maybe we should fix that. This has historical reasons because for some reasons pure binary downloaded stuff mostly end up with .bin but since we're now OSS, we don't need that anymore"}}