Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Installing software on linux from source
#1

I have been having trouble installing cowpatty on a dell server at work. OpenSUSE Enterprise 9. I get missing .h files. I have tried moving the missing .h files into the program directory. I have tried checking out the Makefile file. I have no idea what to try even after hours of googling. I know its something simple I'm missing.

 

I went home and tried installing cowpatty/aircrack-ng/aircrack-ptw on my ubuntu 7 laptop and got similar and more errors. I dont know what I'm missing.

 

I download the .tar.gz files

then decompress the gz

then tar xvf the tar file

then cd into the directory

then ./configure (no file found)

ok then sudo make

 

cc -pipe -Wall -DOPENSSL -g3 -ggdb -c -o md5.o md5.c

cc -pipe -Wall -DOPENSSL -g3 -ggdb -c -o sha1.o sha1.c

sha1.c: In function \u2018pbkdf2_sha1_f\u2019:

sha1.c:148: warning: pointer targets in initialization differ in signedness

sha1.c:164: warning: pointer targets in passing argument 1 of \u2018hmac_sha1_vector\u2019 differ in signedness

sha1.c:169: warning: pointer targets in passing argument 1 of \u2018hmac_sha1\u2019 differ in signedness

sha1.c: In function \u2018sha1_prf\u2019:

sha1.c:213: warning: pointer targets in initialization differ in signedness

sha1.c:213: warning: pointer targets in initialization differ in signedness

sha1.c:213: warning: pointer targets in initialization differ in signedness

cc -pipe -Wall -DOPENSSL -g3 -ggdb -c -o utils.o utils.c

cc -pipe -Wall -DOPENSSL -g3 -ggdb -c -o cowpatty.o cowpatty.c

cowpatty.c:56: error: expected \u2018=\u2019, \u2018,\u2019, \u2018;\u2019, \u2018asm\u2019 or \u2018__attribute__\u2019 before \u2018*\u2019 token

cowpatty.c:59: error: \u2018PCAP_ERRBUF_SIZE\u2019 undeclared here (not in a function)

cowpatty.c: In function \u2018openpcap\u2019:

cowpatty.c:240: error: \u2018p\u2019 undeclared (first use in this function)

cowpatty.c:240: error: (Each undeclared identifier is reported only once

cowpatty.c:240: error: for each function it appears in.)

cowpatty.c:240: warning: implicit declaration of function \u2018pcap_open_offline\u2019

cowpatty.c:247: warning: implicit declaration of function \u2018pcap_datalink\u2019

cowpatty.c:251: error: \u2018DLT_NULL\u2019 undeclared (first use in this function)

cowpatty.c:252: error: \u2018DLT_EN10MB\u2019 undeclared (first use in this function)

cowpatty.c:259: error: \u2018DLT_IEEE802_11\u2019 undeclared (first use in this function)

cowpatty.c:266: error: \u2018DLT_PRISM_HEADER\u2019 undeclared (first use in this function)

cowpatty.c: In function \u2018closepcap\u2019:

cowpatty.c:285: warning: implicit declaration of function \u2018pcap_close\u2019

cowpatty.c:285: error: \u2018p\u2019 undeclared (first use in this function)

cowpatty.c: In function \u2018getpacket\u2019:

cowpatty.c:294: warning: implicit declaration of function \u2018pcap_next_ex\u2019

cowpatty.c:294: error: \u2018p\u2019 undeclared (first use in this function)

cowpatty.c: In function \u2018main\u2019:

cowpatty.c:827: warning: implicit declaration of function \u2018gettimeofday\u2019

make: *** [cowpatty.o] Error 1

Reply
#2

.h files are usually the kernel headers

 

that's what you need to get installed

 

cheers

 

niall

Reply
#3

Quote:cowpatty.c:59: error: "PCAP_ERRBUF_SIZE" undeclared here (not in a function)
 

This is the first error in the chain, tells me that you need to install libpcap and its headers.

 

Something like:

 



Code:
yast -i libpcap libpcap-devel




 

That will work if those are in the repositories (hopefully they are), otherwise find the RPMs for your system.

Reply
#4

thanks, that makes sense. I know something is missing. I have installed libpcap-devel. libpcap was there. When I try to compile I see that it is missing openssl/md5.h

I know I installed openssl with the standard

 

./config

make

make test

make install

 

I am re-installing it with those libpcap-devel libraries in place. I have had luck this weekend compiling for the first time on one of my home pcs when I reformated and installed fedora core 6 then installed openssl, libpcap, libpcap-devel, then cowpatty.

 

ok I just reinstalled openssl. I think the files are out of place.

 

here is the output of the make command

 

cc -pipe -Wall -DOPENSSL -g3 -ggdb -c -o md5.o md5.c

md5.c:25:25: openssl/md5.h: No such file or directory

In file included from md5.c:29:

md5.h:30:25: openssl/md5.h: No such file or directory

md5.c: In function `md5_mac':

md5.c:33: error: `MD5_CTX' undeclared (first use in this function)

md5.c:33: error: (Each undeclared identifier is reported only once

md5.c:33: error: for each function it appears in.)

md5.c:33: error: parse error before "context"

md5.c:34: warning: implicit declaration of function `MD5_Init'

md5.c:34: error: `context' undeclared (first use in this function)

md5.c:35: warning: implicit declaration of function `MD5_Update'

md5.c:38: warning: implicit declaration of function `MD5_Final'

md5.c: In function `hmac_md5_vector':

md5.c:45: error: `MD5_CTX' undeclared (first use in this function)

md5.c:45: error: parse error before "context"

md5.c:53: error: `context' undeclared (first use in this function)

make: *** [md5.o] Error 1

 

So, the md5.h file is missing or out of place. I'll run a find to see where its been put.

 

vmware:/ # find -name md5.h

find: ./media/cdrom: No medium found

find: ./media/floppy: No medium found

./usr/lib/news/include/inn/md5.h

./usr/local/ssl/include/openssl/md5.h

./usr/src/linux-2.6.5-7.191/fs/cifs/md5.h

./tmp/cowpatty/md5.h

./tmp/openssl-0.9.8e/crypto/md5/md5.h

./tmp/openssl-0.9.8e/include/openssl/md5.h

 

Well, I'll try to move it manually to where I am guessing it needs to be to be found. /usr/include/openssl/md5.h ??

 

OK, I moved the contents of directory /usr/include/ssl/include/openssl/ to /usr/include/openssl

 

Here are the results of the make command

 

cc -pipe -Wall -DOPENSSL -g3 -ggdb -c -o md5.o md5.c

cc -pipe -Wall -DOPENSSL -g3 -ggdb -c -o sha1.o sha1.c

cc -pipe -Wall -DOPENSSL -g3 -ggdb -c -o utils.o utils.c

cc -pipe -Wall -DOPENSSL -g3 -ggdb -c -o cowpatty.o cowpatty.c

cowpatty.c: In function `dictfile_attack':

cowpatty.c:676: warning: int format, different type arg (arg 3)

cc -pipe -Wall -DOPENSSL -g3 -ggdb -c -o genpmk.o genpmk.c

genpmk.c: In function `main':

genpmk.c:248: warning: int format, different type arg (arg 3)

cc -pipe -Wall -DOPENSSL -g3 -ggdb cowpatty.c -o cowpatty utils.o md5.o sha1.o -lpcap -lcrypto

cowpatty.c: In function `dictfile_attack':

cowpatty.c:676: warning: int format, different type arg (arg 3)

/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../../x86_64-suse-linux/bin/ld: cannot find -lcrypto

collect2: ld returned 1 exit status

make: *** [cowpatty] Error 1

 

Ok, I've been doing some reading. No one said I needed openssl-devel installed to compile this. So I did a

 

yast -i openssl-devel

make clean

make

 

cc -pipe -Wall -DOPENSSL -g3 -ggdb -c -o md5.o md5.c

cc -pipe -Wall -DOPENSSL -g3 -ggdb -c -o sha1.o sha1.c

cc -pipe -Wall -DOPENSSL -g3 -ggdb -c -o utils.o utils.c

cc -pipe -Wall -DOPENSSL -g3 -ggdb -c -o cowpatty.o cowpatty.c

cowpatty.c: In function `dictfile_attack':

cowpatty.c:676: warning: int format, different type arg (arg 3)

cc -pipe -Wall -DOPENSSL -g3 -ggdb -c -o genpmk.o genpmk.c

genpmk.c: In function `main':

genpmk.c:248: warning: int format, different type arg (arg 3)

cc -pipe -Wall -DOPENSSL -g3 -ggdb cowpatty.c -o cowpatty utils.o md5.o sha1.o -lpcap -lcrypto

cowpatty.c: In function `dictfile_attack':

cowpatty.c:676: warning: int format, different type arg (arg 3)

cc -pipe -Wall -DOPENSSL -g3 -ggdb genpmk.c -o genpmk utils.o sha1.o -lpcap -lcrypto

genpmk.c: In function `main':

genpmk.c:248: warning: int format, different type arg (arg 3)

 

I see warnings, but it has been compiled! Thanks for the help

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)