iasimov wrote:Firstly, did you check it was a ram overconsumption problem?
Take a look to http://trac.aircrack-ng.org/browser/tru … ep/linux.c
In the functions "linux_read", "openraw" and "do_linux_open" you have almost all you need to write your own code without use airodump.
In a nutshell
1. create a packet socket, see the code of "do_linux_open" and http://man7.org/linux/man-pages/man7/packet.7.html
2. bind the socket to the wifi interface, see the code of "openraw"
3. read packets using "read" with the file descriptor of the socket, and get the rssi, see the code of "linux_read" and the lines of "ri_power" (ri = rx info)
I checked the ram consumption and is doing all good, it doesn't seem to be the problem. I can't check it when it freezes, because by that time I cannot run "cat /proc/meminfo", but when is not frozen I can see that the memory is not dropping, it stays stable at a really decent ammount of free memory available.
I've also tried to cross-compile the airodump-ng file as it is, but I can't get passed from this errors:
/tmp/ccN8pyyi.o: In function `check_shared_key':
airodump-ng.c:(.text+0x28d0): undefined reference to `crc_tbl'
airodump-ng.c:(.text+0x28d8): undefined reference to `crc_tbl'
/tmp/ccN8pyyi.o: In function `dump_add_packet':
airodump-ng.c:(.text+0x525c): undefined reference to `uniqueiv_init'
airodump-ng.c:(.text+0x8754): undefined reference to `uniqueiv_check'
airodump-ng.c:(.text+0x87f4): undefined reference to `known_clear'
airodump-ng.c:(.text+0x8904): undefined reference to `known_clear'
airodump-ng.c:(.text+0x8cf0): undefined reference to `uniqueiv_mark'
airodump-ng.c:(.text+0x8d60): undefined reference to `data_init'
airodump-ng.c:(.text+0x8db4): undefined reference to `data_check'
/tmp/ccN8pyyi.o: In function `getBatteryState':
I don't know why it says "undefined reference" for all these files, I'm including the headers.
Do you really think I should cross-compile the airodump-ng?
Maybe I'm doing something really wrong on my C code that pipesout the data. Do you mind checking my C code? I keep reading it and see no problems there tho, but I might be missing something as I'm really knew with C.
UPDATE
I missunderstood what you meant on your last post, I'm going to try it now the way you are telling using only the linux.c file, without airodump-ng.
(Last edited by cabada on 23 Mar 2016, 06:09)