projects
/
my-code
/
hdw-sniff.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
beacon work ...
[my-code/hdw-sniff.git]
/
main.c
diff --git
a/main.c
b/main.c
index
8004e9e
..
1ed6040
100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-23,7
+23,13
@@
int display_console(t_info *info,char *string) {
display_line(display,0,0,2,0,'-');
display_string(display,4,0,"sta",3);
display_line(display,0,0,2,0,'-');
display_string(display,4,0,"sta",3);
- display_line(display,8,0,x,0,'-');
+ display_line(display,8,0,12,0,'-');
+
+ display_string(display,13,0,"bssid",5);
+ display_line(display,19,0,23,0,'-');
+
+ display_string(display,24,0,"M",1);
+ display_line(display,26,0,x,0,'-');
//display_line(display,0,0,0,y,'|');
//display_line(display,x,0,x,y,'|');
//display_line(display,0,0,0,y,'|');
//display_line(display,x,0,x,y,'|');
@@
-117,7
+123,8
@@
int hop_channel(t_event *event,void *ptr) {
info=(t_info *)ptr;
info=(t_info *)ptr;
- if(info->current_channel>=CHANNEL_MAX) info->current_channel=1;
+ if((info->current_channel>CHANNEL_MAX)|(info->current_channel==0))
+ info->current_channel=1;
memset(&iwreq,0,sizeof(iwreq));
strcpy(iwreq.ifr_name,info->device);
iwreq.u.freq.e=0;
memset(&iwreq,0,sizeof(iwreq));
strcpy(iwreq.ifr_name,info->device);
iwreq.u.freq.e=0;
@@
-127,8
+134,9
@@
int hop_channel(t_event *event,void *ptr) {
perror("ioctl");
return -23;
}
perror("ioctl");
return -23;
}
- ++(info->current_channel);
- return 23;
+ ++(info->current_channel);
+
+ return 23;
}
int main(int argc, char **argv) {
}
int main(int argc, char **argv) {
@@
-201,11
+209,12
@@
int main(int argc, char **argv) {
system(sys_call);
if(info.log_fd==0) {
system(sys_call);
if(info.log_fd==0) {
- if((info.log_fd=open("/tmp/hdw-sniff.log",O_RDWR|O_CREAT))!=0)
- puts("using logfile /tmp/hdw-sniff.log ...");
- else {
- puts("failed to open logfile ...");
- return -23;
+ if((info.log_fd=open("/tmp/hdw-sniff.log",O_RDWR|O_CREAT))!=0)
+ puts("using logfile /tmp/hdw-sniff.log ...");
+ else {
+ puts("failed to open logfile ...");
+ return -23;
+ }
}
/* pcap */
}
/* pcap */
@@
-248,5
+257,4
@@
int main(int argc, char **argv) {
puts("bugreports: hackbard@hackdaworld.org");
return 23;
puts("bugreports: hackbard@hackdaworld.org");
return 23;
-
}
}