Sunday, February 28, 2010
Compiled cowpatty 4.6 inn cygwin.
1. install winpcap and WinPcap Developer's Packs.
2. Install cygwin.
3. Unfortunatelly the default installation of cygwin does not come wide all the needed depensis. you ned to add ;make & ;gcc-g77 & ;gcc-c++ & openssl-dev.
a) Make sure that Curr is selected and click on View to make it Partial (the word should be printed on the left from the View button). In this mode you will see what packages will be installed by default. You see that they will be installed as Bin and Src is not selected. This what we need. It is a good idea to leave the default packages as they are. Our next goal is to add a few more packages to this list.
b) Click on View to make it Category (again the word should be printed on the left from the View button).
c) Click on + before Devel to expand it.
d) Find gcc-c++ and click on Skip. Instead of Skip there should appear version (in time of writing 3.4.4-1) and a cross in Bin. Note that other dependent packages are selected automatically.
e) Find gcc-g77 and click on Skip. Instead of Skip there should appear version (in time of writing 3.4.4-1) and a cross in Bin.
f) Find make and clike on Skip. Instead of Skip there should appear version (in time of writing 3.80-1) and a cross in Bin.
g) Click on - before Devel to close the tree of the development packages.
That's i
4. Edit the makefile inn cowpatty folder (add path for pcap headers).
old makefile.
##################################
LDLIBS = -lpcap
CFLAGS = -pipe -Wall -DOPENSSL
CFLAGS += -O2
LDLIBS += -lcrypto
new makefile.
##################################
LDLIBS = -lwpcap
CFLAGS = -pipe -Wall -DOPENSSL
CFLAGS += -I /usr/include/pcap/ -I /usr/include/
CFLAGS += -O2
LDLIBS += -lcrypto
5. Copy headers files from .\include\* to c:\cygwin\usr\include\pcap and libary file from .\lib\* to c:\cygwin\lib\ . FROM THE WINPCAP-DEV PACK.
6. Check that you've correctly installed winpcap dll wid the command "which Packet.dll wpcap.dll".
$ which Packet.dll wpcap.dll
/cygdrive/c/WINDOWS/system32/Packet.dll
/cygdrive/c/WINDOWS/system32/wpcap.dll
7. Now It's time to compile, use the command "make".
$ make
cc -pipe -Wall -DOPENSSL -I /usr/include/pcap/ -I /usr/include/ -O2 -g3 -ggdb
-c -o md5.o md5.c
cc -pipe -Wall -DOPENSSL -I /usr/include/pcap/ -I /usr/include/ -O2 -g3 -ggdb
-c -o sha1.o sha1.c
cc -pipe -Wall -DOPENSSL -I /usr/include/pcap/ -I /usr/include/ -O2 -g3 -ggdb
-c -o utils.o utils.c
cc -pipe -Wall -DOPENSSL -I /usr/include/pcap/ -I /usr/include/ -O2 -g3 -ggdb
-c -o cowpatty.o cowpatty.c
cc -pipe -Wall -DOPENSSL -I /usr/include/pcap/ -I /usr/include/ -O2 -g3 -ggdb
-c -o genpmk.o genpmk.c
8. Copy cowpatty.exe,genpmk.exe,cygwin1.dll and cygcrypto-0.9.8.dll. I didn't have cygcrypto-0.9.8.dll so i copied it from older cygwin copy off cowpatty-4.0
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment