In my previous article I was building SIPcrack from source on the Ubuntu 10.04 platform. I ran into a few erros during the build. The first error is explained here but after that I ran into one more. Below I describe how to get past the pcap.h error. This fix should work on any version of ubuntu that is giving you a pcap.h missing error.
The error I received looked like this:
- root@bt:~/SIPcrack-0.3pre# make
- gcc -O3 -c wrap.c
- gcc -O3 -c debug.c
- * Building sipcrack...
- gcc -O3 -o sipcrack wrap.o debug.o SIPcrack.c -lcrypto
- * Building sipdump...
- gcc -O3 -o sipdump wrap.o debug.o SIPdump.c -lpcap
- SIPdump.c:23:18: error: pcap.h: No such file or directory
- SIPdump.c:61: warning: ‘struct pcap_pkthdr’ declared inside parameter list
- SIPdump.c:61: warning: its scope is only this definition or declaration, which is probably not what you want
- SIPdump.c:68: error: expected ‘)’ before ‘*’ token
- SIPdump.c: In function ‘main’:
- SIPdump.c:101: error: ‘PCAP_ERRBUF_SIZE’ undeclared (first use in this function)
- SIPdump.c:101: error: (Each undeclared identifier is reported only once
- SIPdump.c:101: error: for each function it appears in.)
- SIPdump.c:103: error: ‘pcap_t’ undeclared (first use in this function)
- SIPdump.c:103: error: ‘handle’ undeclared (first use in this function)
- SIPdump.c:104: error: ‘bpf_u_int32’ undeclared (first use in this function)
- SIPdump.c:104: error: expected ‘;’ before ‘mask’
- SIPdump.c:105: error: storage size of ‘fp’ isn’t known
- SIPdump.c:107: error: invalid application of ‘sizeof’ to incomplete type ‘struct bpf_program’
- SIPdump.c:196: error: ‘net’ undeclared (first use in this function)
- SIPdump.c:196: error: ‘mask’ undeclared (first use in this function)
- SIPdump.c: At top level:
- SIPdump.c:467: warning: ‘struct pcap_pkthdr’ declared inside parameter list
- SIPdump.c:465: error: conflicting types for ‘sniff_logins’
- SIPdump.c:61: note: previous declaration of ‘sniff_logins’ was here
- SIPdump.c:778: error: expected ‘)’ before ‘*’ token
- make: *** [default] Error 1
This error is because we are missing the development libraries fot libpcap which are needed for SIPcrack to work with capture files.
The fix is simple, we just need to install libpcap-dev
- root@bt:~/SIPcrack-0.3pre# apt-get install libpcap-dev
- Reading package lists... Done
- Building dependency tree
- Reading state information... Done
- The following extra packages will be installed:
- libpcap0.8-dev
- The following NEW packages will be installed:
- libpcap-dev libpcap0.8-dev
- 0 upgraded, 2 newly installed, 0 to remove and 41 not upgraded.
- Need to get 0B/227kB of archives.
- After this operation, 729kB of additional disk space will be used.
- Do you want to continue [Y/n]?
- Selecting previously deselected package libpcap0.8-dev.
- (Reading database ... 70773 files and directories currently installed.)
- Unpacking libpcap0.8-dev (from .../libpcap0.8-dev_1.0.0-6_i386.deb) ...
- Selecting previously deselected package libpcap-dev.
- Unpacking libpcap-dev (from .../libpcap-dev_1.0.0-6_all.deb) ...
- Processing triggers for man-db ...
- Setting up libpcap0.8-dev (1.0.0-6) ...
- Setting up libpcap-dev (1.0.0-6) ...
Once that is installed you should be able to build SIPcrack with no problem
- root@bt:~/SIPcrack-0.3pre# make
- gcc -O3 -c wrap.c
- gcc -O3 -c debug.c
- * Building sipcrack...
- gcc -O3 -o sipcrack wrap.o debug.o SIPcrack.c -lcrypto
- * Building sipdump...
- gcc -O3 -o sipdump wrap.o debug.o SIPdump.c -lpcap
- * Stripping binaries....
- strip sipcrack sipdump
- * All done
Rafael CanelasHi Olaf.I’ve been triyng to use JMeter on the newest blackboard learn myself, but i’m having troubles creating and/or designing the scripts, especially on authenticating user through the JMeter. I was wondering if it would be possible to provide a few tips, or, if it isn’t too much to ask, maybe even a test script.Best regards,Rafael Canelas