projects
/
my-code
/
hdw-sniff.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
80bdf76
)
added flite support for new beacon frames
author
hackbard
<hackbard>
Fri, 10 Jun 2005 14:45:45 +0000
(14:45 +0000)
committer
hackbard
<hackbard>
Fri, 10 Jun 2005 14:45:45 +0000
(14:45 +0000)
parse.c
patch
|
blob
|
history
diff --git
a/parse.c
b/parse.c
index
f18ba98
..
7eac803
100644
(file)
--- a/
parse.c
+++ b/
parse.c
@@
-46,12
+46,15
@@
void parse_package(unsigned char *ptr,const struct pcap_pkthdr *pcap_header,cons
t_beacon_fb *beacon_fb;
int ret;
char string[MESSAGE_MAX];
t_beacon_fb *beacon_fb;
int ret;
char string[MESSAGE_MAX];
+ char sc[MAX_SYSCALL_CHARS];
+ unsigned char new;
info=(t_info *)ptr;
info->count++;
memset(&new_sta,0,sizeof(t_sta));
info=(t_info *)ptr;
info->count++;
memset(&new_sta,0,sizeof(t_sta));
+ new=0;
if(info->dump_fd!=0) {
ret=write(info->dump_fd,pcap_header,sizeof(struct pcap_pkthdr));
if(info->dump_fd!=0) {
ret=write(info->dump_fd,pcap_header,sizeof(struct pcap_pkthdr));
@@
-80,6
+83,7
@@
void parse_package(unsigned char *ptr,const struct pcap_pkthdr *pcap_header,cons
if((ret==L_EMPTY_LIST)|(ret==L_NO_SUCH_ELEMENT)) {
list_add_element(&(info->sniffed_sta),&new_sta,sizeof(t_sta));
sta=(t_sta *)info->sniffed_sta.current->data;
if((ret==L_EMPTY_LIST)|(ret==L_NO_SUCH_ELEMENT)) {
list_add_element(&(info->sniffed_sta),&new_sta,sizeof(t_sta));
sta=(t_sta *)info->sniffed_sta.current->data;
+ new=1;
}
else sta=(t_sta *)info->sniffed_sta.current->data;
// fill in stuff ...
}
else sta=(t_sta *)info->sniffed_sta.current->data;
// fill in stuff ...
@@
-95,6
+99,10
@@
void parse_package(unsigned char *ptr,const struct pcap_pkthdr *pcap_header,cons
(i==ADDR_LEN-1)?'.':':');
string[22+3*ADDR_LEN+1]=0;
display_console(info,string);
(i==ADDR_LEN-1)?'.':':');
string[22+3*ADDR_LEN+1]=0;
display_console(info,string);
+ if(new) {
+ snprintf(sc,MAX_SYSCALL_CHARS,"flite 'new ssid: %s'",sta->ssid);
+ system(sc);
+ }
}
}
}
}