A blackbag that actually compiles!
Jeremy Rauch | December 28th, 2005 | Filed Under: Matasano
It seems in our haste to make tools available to the public, we left some dependencies intact that would really preclude anyone from compiling or using them. Sucks. So I wrote an INSTALL file that details building, removed some hardcoded dependencies, and hopefully made it so people can compile the tools provided without too much difficulty. Let me know if you still have problems with blackbag-0.4.tar.gz.


Roy
December 28th, 2005 6:44 pmIt still craps out for me. I get a buttload of redifinition warnings, and then
util.c: In function `memfry’:
util.c:190: warning: implicit declaration of function `arc4random’
util.c: In function `file_last_modified’:
util.c:305: error: structure has no member named `st_mtimespec’
util.c: In function `udom’:
util.c:441: warning: implicit declaration of function `strlcpy’
util.c: In function `strtoamt’:
util.c:1100: warning: implicit declaration of function `strtold’
util.c: In function `r64′:
util.c:1384: warning: implicit declaration of function `srandomdev’
make: *** [util.o] Error 1
cat /etc/gentoo-release
Gentoo Base System version 1.12.0_pre12
Aaron
December 29th, 2005 11:27 amAm I blind or is there no license?
Matt Franz
December 29th, 2005 4:13 pmLikewise some problems on Ubuntu Breezy
And this was after fixing some differences in stat_mtime*, adding some of the ETHERTYPES and probably some other tweaks:
vmware@vmware-bavm:~/Desktop/blackbag-0.4$ make
cc -Wall -g -I. -I./format -o blit blit.o -L. -lfirebert -L./jenkins-hash -ljenkinshash -L./format -lfmt -levent -lcrypto -lpcap
./libfirebert.a(util.o): In function `memfry’:
/home/vmware/Desktop/blackbag-0.4/util.c:190: undefined reference to `arc4random’
./libfirebert.a(util.o): In function `udom’:
/home/vmware/Desktop/blackbag-0.4/util.c:440: undefined reference to `strlcpy’
./libfirebert.a(util.o): In function `udomc’:
/home/vmware/Desktop/blackbag-0.4/util.c:461: undefined reference to `strlcpy’
./libfirebert.a(util.o): In function `connectu’:
/home/vmware/Desktop/blackbag-0.4/util.c:481: undefined reference to `strlcpy’
./libfirebert.a(util.o): In function `r64′:
/home/vmware/Desktop/blackbag-0.4/util.c:1383: undefined reference to `srandomdev’
collect2: ld returned 1 exit status
Mark Grimes
December 30th, 2005 4:32 amFor you Mac OS X users that are having problems…
I have made an installer of blackbag-0.4+libevent here. No fink/dports required. Installs libevent under /usr/local and blackbag defaults to /usr/local/bin (but is relocatable of course). Thomas, say so if this is not cool and I’ll pull it — just trying to make it easier for some.
Mark Grimes
December 30th, 2005 5:29 amI could be wrong but iirc Linux doesn’t offer strl* functions in their libc. You’ll either want to include the functions in entirety or live in ifdef hell and replace strl* with strn* for the linux architecture. Yay Linux… i’m sure something similar holds true for arc4random and srandomdev. The glory of c portability — ifdef fsckage or the autoconf nightmare. Thomas is just making an argument for why people use python and friends despite the almost negligible slowdown of bytecode.
tqbf
December 30th, 2005 12:23 pmQuick notes:
1. Our company is standardized on MacOSX. Which means this should also build on Open/Net/FreeBSD. But we want it to work on Linux too, and, over the weekend, we’ll make that happen.
2. In the meantime:
* arc4random() is pin-compatible with libc random()
* strlcpy() is (in a pinch) pin-compatible with strncpy()
* i don’t know how Linux gets away with not having strtold() (string to long double), but, you can switch it to strtod and not break anything in this package.
* you can just delete the call to srandomdev()
* you can wholesale delete the function that makes reference to st_mtimespec
This doesn’t help you if you’re not comfortable editing C code, but we should have a clean building 0.5 package by Monday.
Code is hard!
tqbf
December 30th, 2005 12:24 pmaaron: you are not blind. There is no license. All rights are reserved. You can do whatever you want with the package with your own personal copy, but you cannot redistribute it.
Given the nature of this particular package, I’m sure that’s not an issue. It’s not like Red Hat is going to ship with any of this! =)
Leave a reply