markwhi / reaver-wps

Automatically exported from code.google.com/p/reaver-wps
0 stars 0 forks source link

reaver @1.4 fails to build libwps.o #524

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
0. What version of Reaver are you using?  (Only defects against the latest
version will be considered.)
reaver version 1.4

1. What operating system are you using (Linux is the only supported OS)?
Darwin 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; 
root:xnu-1228.15.4~1/RELEASE_I386 i386

2. Is your wireless card in monitor mode (yes/no)?
not applicable

3. What is the signal strength of the Access Point you are trying to crack?
not applicable

4. What is the manufacturer and model # of the device you are trying to
crack?
not applicable

5. What is the entire command line string you are supplying to reaver?
not applicable

6. Please describe what you think the issue is.
When compiling reaver it fails to build object libwps.o

7. Paste the output from Reaver below.
gcc -Wall libwps.c -c
In file included from libwps.c:14:
libwps.h:50: warning: type defaults to ‘int’ in declaration of ‘u_char’
libwps.h:50: error: syntax error before ‘*’ token
libwps.h:129: warning: type defaults to ‘int’ in declaration of ‘u_char’
libwps.h:129: error: syntax error before ‘*’ token
libwps.h:130: warning: type defaults to ‘int’ in declaration of ‘u_char’
libwps.h:130: error: syntax error before ‘*’ token
libwps.h:131: warning: type defaults to ‘int’ in declaration of ‘u_char’
libwps.h:131: error: syntax error before ‘*’ token
libwps.h:132: warning: type defaults to ‘int’ in declaration of ‘u_char’
libwps.h:132: error: syntax error before ‘*’ token
libwps.h:133: error: syntax error before ‘*’ token
libwps.h:133: warning: type defaults to ‘int’ in declaration of ‘u_char’
libwps.h:133: error: syntax error before ‘*’ token
libwps.h:133: warning: type defaults to ‘int’ in declaration of 
‘libwps_radio_header’
libwps.h:133: warning: data definition has no type or storage class
libwps.c:26: warning: type defaults to ‘int’ in declaration of ‘u_char’
libwps.c:26: error: syntax error before ‘*’ token
libwps.c: In function ‘parse_wps_parameters’:
libwps.c:28: error: nested functions are disabled, use -fnested-functions to 
re-enable
libwps.c:28: error: syntax error before ‘*’ token
libwps.c:33: error: ‘wps’ undeclared (first use in this function)
libwps.c:33: error: (Each undeclared identifier is reported only once
libwps.c:33: error: for each function it appears in.)
libwps.c:37: error: ‘len’ undeclared (first use in this function)
libwps.c:41: error: ‘packet’ undeclared (first use in this function)
libwps.c:44: error: ‘data’ undeclared (first use in this function)
libwps.c: At top level:
libwps.c:55: warning: type defaults to ‘int’ in declaration of ‘u_char’
libwps.c:55: error: syntax error before ‘*’ token
libwps.c: In function ‘parse_wps_tag’:
libwps.c:81: error: ‘tags’ undeclared (first use in this function)
libwps.c:81: error: ‘len’ undeclared (first use in this function)
libwps.c:82: error: ‘wps’ undeclared (first use in this function)
libwps.c: At top level:
libwps.c:190: warning: type defaults to ‘int’ in declaration of ‘u_char’
libwps.c:190: error: syntax error before ‘*’ token
libwps.c: In function ‘get_wps_data’:
libwps.c:197: error: ‘len’ undeclared (first use in this function)
libwps.c:200: error: ‘data’ undeclared (first use in this function)
libwps.c:222: error: ‘tag_len’ undeclared (first use in this function)
libwps.c: At top level:
libwps.c:234: warning: type defaults to ‘int’ in declaration of ‘u_char’
libwps.c:234: error: syntax error before ‘*’ token
libwps.c: In function ‘get_wps_data_element’:
libwps.c:242: error: ‘len’ undeclared (first use in this function)
libwps.c:244: error: ‘data’ undeclared (first use in this function)
libwps.c:247: error: ‘type’ undeclared (first use in this function)
libwps.c:257: error: ‘el_len’ undeclared (first use in this function)
libwps.c: At top level:
libwps.c:269: warning: type defaults to ‘int’ in declaration of ‘u_char’
libwps.c:269: error: syntax error before ‘*’ token
libwps.c: In function ‘libwps_has_rt_header’:
libwps.c:274: error: ‘packet’ undeclared (first use in this function)
libwps.c:278: error: ‘len’ undeclared (first use in this function)
libwps.c: At top level:
libwps.c:291: error: syntax error before ‘*’ token
libwps.c:291: warning: type defaults to ‘int’ in declaration of ‘u_char’
libwps.c:291: error: syntax error before ‘*’ token
libwps.c:292: warning: return type defaults to ‘int’
libwps.c: In function ‘libwps_radio_header’:
libwps.c:293: error: ‘packet’ undeclared (first use in this function)
libwps.c:293: error: ‘len’ undeclared (first use in this function)
libwps.c:299: error: ‘u_char’ undeclared (first use in this function)
libwps.c:299: error: syntax error before ‘)’ token
libwps.c:302: warning: control reaches end of non-void function
make[1]: *** [libwps.o] Error 1

See also ticket: https://trac.macports.org/ticket/39847

Original issue reported on code.google.com by nonstop....@gmail.com on 24 Jul 2013 at 3:18

GoogleCodeExporter commented 9 years ago
which version of gcc?
# gcc --version
here is 4.7.2 does not give it

Original comment by deltomaf...@gmail.com on 29 Jul 2013 at 12:48

GoogleCodeExporter commented 9 years ago
Version gcc 4.0.1 was used to compile reaver.

% gcc --version
i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5493)
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I also tried to compile using gcc-4.8 and clang-3.3, however both runs failed 
with likewise errors.

% /opt/local/bin/gcc-mp-4.8 --version
gcc-mp-4.8 (MacPorts gcc48 4.8.1_1) 4.8.1
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

% /opt/local/bin/clang-mp-3.3 --version
clang version 3.3 (tags/RELEASE_33/final)
Target: i386-apple-darwin9.8.0
Thread model: posix

I'll attach the logfiles of both other tries in an separate email message to 
you, because I don't see an option to upload any output and add it to this 
issue. Hopefully you don't mind me doing so.

Original comment by nonstop....@gmail.com on 29 Jul 2013 at 7:18

GoogleCodeExporter commented 9 years ago
Log output for failed compilations with gcc-4.8 and clang-3.3 concerning
issue 524.
Please see attached logfiles: main_clang-3.3.log.bz2
and main_gcc-4.8.log.bz2.

Original comment by nonstop....@gmail.com on 29 Jul 2013 at 7:26

GoogleCodeExporter commented 9 years ago
which version of cpp?
# cpp --version
here is same 4.7.2
only one that gives error?

Original comment by deltomaf...@gmail.com on 29 Jul 2013 at 8:14

GoogleCodeExporter commented 9 years ago
% cpp --version
i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5493)
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

% /opt/local/bin/cpp-mp-4.8 --version
cpp-mp-4.8 (MacPorts gcc48 4.8.1_1) 4.8.1
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

% /opt/local/bin/clang++-mp-3.3 --version 
clang version 3.3 (tags/RELEASE_33/final)
Target: i386-apple-darwin9.8.0
Thread model: posix

I'm not sure which error you refer to exactly, but you should be able to see 
them in the logfiles I send by email.

Original comment by nonstop....@gmail.com on 29 Jul 2013 at 9:17

GoogleCodeExporter commented 9 years ago
Reaver downloaded by svn?
Tried version 1.3?
Compiling the complete package of the Reaver
the error is only in this libwps?
in that email?

Original comment by deltomaf...@gmail.com on 30 Jul 2013 at 3:25

GoogleCodeExporter commented 9 years ago
I fetched the archive reaver-1.4.tar.gz from
http://reaver-wps.googlecode.com/files/.

No, I only tried version 1.4 so far.

libwps?
Yes, after the error in the compilation of libwps the build stops further
processing.

I guess you did not get the attached logfiles I provided by mail.
I'll attach the logfiles to MacPorts ticket
https://trac.macports.org/ticket/39847 please download them from there.

Original comment by nonstop....@gmail.com on 31 Jul 2013 at 2:24

GoogleCodeExporter commented 9 years ago
I see that your problem is missing or do not find Headers:
stdlib.h, stdint.h, stdio.h, string.h.
It may be that you have installed the SDK. (/ Developer / SDKs)
specify the - sysroot flag to the compiler
you also need to specify the MACOSX_DEPLOYMENT_TARGET environment variable.
set (CMAKE_CXX_FLAGS "- sysroot $ {CMAKE_OSX_SYSROOT CMAKE_CXX_FLAGS} $ {}")

Original comment by deltomaf...@gmail.com on 1 Aug 2013 at 3:36

GoogleCodeExporter commented 9 years ago
sorry, where is "- sysroot"
is "--sysroot"

Original comment by deltomaf...@gmail.com on 1 Aug 2013 at 3:39

GoogleCodeExporter commented 9 years ago
This is all I needed to fix to get reaver 1.4 to compile on Mac OS X 10.5:

https://trac.macports.org/browser/trunk/dports/security/reaver/files/patch-libwp
s-libwps.h.diff?rev=108855

Original comment by ryandesi...@gmail.com on 3 Aug 2013 at 9:48