summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/daemon/source/sniffer.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/noncore/net/wellenreiter/daemon/source/sniffer.c b/noncore/net/wellenreiter/daemon/source/sniffer.c
index 6f40503..31a5d13 100644
--- a/noncore/net/wellenreiter/daemon/source/sniffer.c
+++ b/noncore/net/wellenreiter/daemon/source/sniffer.c
@@ -1,20 +1,17 @@
1/* Its just a simple rfmon mode sniffer 1/* Its just a simple rfmon mode sniffer
2 i hope my C is at last a bit better then in my 2 i hope my C is at last a bit better then in my
3 early days :-). 3 early days :-).
4 This works only with cisco wireless cards with an rfmon 4 This works only with cisco wireless cards with an rfmon
5 able driver and not with wifi stuff. 5 able driver and not with wifi stuff.
6 Btw. did i mention that i hate C? 6 Btw. did i mention that i hate C?
7 7
8 To compile use: 8 To compile use:
9 gcc wlan-sniffer.c -o wlan-sniffer -lpcap 9 gcc sniffer.c -o wlan-sniffer -lpcap
10
11 use it like this:
12 wlan-sniffer interface
13 10
14*/ 11*/
15#include "sniffer.h" 12#include "sniffer.h"
16 13
17int main(int argc, char **argv) 14int main(int argc, char **argv)
18{ 15{
19 int ret; /* return code */ 16 int ret; /* return code */
20 ret = card_into_monitormode (SNIFFER_DEVICE, CARD_TYPE_NG); 17 ret = card_into_monitormode (SNIFFER_DEVICE, CARD_TYPE_NG);
@@ -210,17 +207,17 @@ void process_packets(u_char *useless,const struct pcap_pkthdr* pkthdr,const u_ch
210 if (pinfoptr->channel < 1 || pinfoptr->channel > 14) 207 if (pinfoptr->channel < 1 || pinfoptr->channel > 14)
211 { 208 {
212 /* Only channels between 1 and 14 are possible 209 /* Only channels between 1 and 14 are possible
213 others must be noise packets */ 210 others must be noise packets */
214 pinfoptr->isvalid = 0; 211 pinfoptr->isvalid = 0;
215 return; 212 return;
216 } 213 }
217 214
218 /* Decoding successfull of beacon frame */ 215 /* Here should be the infos to the gui issued */
219 if (pinfoptr->cap_ESS == 1 &&pinfoptr->cap_IBSS ==0) 216 if (pinfoptr->cap_ESS == 1 &&pinfoptr->cap_IBSS ==0)
220 { 217 {
221 printf ("\nHave found an accesspoint:"); 218 printf ("\nHave found an accesspoint:");
222 } 219 }
223 else if(pinfoptr->cap_ESS == 0 && pinfoptr->cap_IBSS == 1) 220 else if(pinfoptr->cap_ESS == 0 && pinfoptr->cap_IBSS == 1)
224 { 221 {
225 printf ("\nHave found an AD-HOC station:"); 222 printf ("\nHave found an AD-HOC station:");
226 223