From 56ab7c6858c9c26cc24faf55bf24934b7557c98a Mon Sep 17 00:00:00 2001 From: hackbard Date: Sun, 12 Jun 2005 19:32:09 +0000 Subject: [PATCH] some more specific info displayed --- main.c | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/main.c b/main.c index e3cb85c..9322b74 100644 --- a/main.c +++ b/main.c @@ -56,11 +56,6 @@ int display_console(t_info *info,char *string) { display_string(display,GUI_OFFSET_AP,3+i,help,3); snprintf(help,5,"| %c",sta->wep?'y':'n'); display_string(display,GUI_OFFSET_WEP,3+i,help,4); -/* - snprintf(help,21,"| %04d | %04d | %04d", - sta->count_mgmt,sta->count_ctrl, - sta->count_data); -*/ snprintf(help,21,"| %04d | n.a. | n.a.", sta->count_mgmt); display_string(display,GUI_OFFSET_MGMT,3+i,help,20); @@ -81,13 +76,30 @@ int display_console(t_info *info,char *string) { sta->addr[0],sta->addr[1],sta->addr[2], sta->addr[3],sta->addr[4],sta->addr[5]); display_string(display,1,1,help,21); + if(sta->ap) strcpy(help,"(access point)"); + else strcpy(help,"(station)"); + s=strlen(help); + display_string(display,23,1,help,s); + snprintf(help,2,"%c",sta->active); + display_string(display,x-1,1,help,1); + snprintf(help,7,"sq: %02d",sta->sq); + display_string(display,x-8,1,help,6); display_line(display,0,2,x,2,'-'); - display_string(display,1,3,info->clean_line,x); display_string(display,1,3,"ssid: ",6); s=strlen(sta->ssid); memcpy(help,sta->ssid,s); display_string(display,7,3,help,s); - display_string(display,1,5,"more specific info soon ...",27); + if(sta->wep) strcpy(help,"crypted"); + else strcpy(help,"not crypted"); + s=strlen(help); + display_string(display,x-s-1,3,help,s); + + snprintf(help,13,"mgmt: %06d",sta->count_mgmt); + display_string(display,1,5,help,12); + snprintf(help,13,"ctrl: %06d",sta->count_ctrl); + display_string(display,1,6,help,12); + snprintf(help,13,"data: %06d",sta->count_data); + display_string(display,1,7,help,12); } /* footer */ @@ -132,17 +144,8 @@ int get_user_interaction(t_info *info) { input_get_event(&(info->input),noop,info); - /* - if(info->input.content[0]=='h') { - display_console(info,"hdw-sniff help:"); - display_console(info,"h - print this help"); - display_console(info,"x - enable/disable hex output"); - display_console(info,"a - enable/disable ascii output"); - display_console(info,"q - quit"); - display_console(info,"console navigation: arrow up/down"); - display_console(info,"network list navigation: page up/down"); - } - */ + /* clear display */ + display_clear_screen(&(info->display)); if(info->input.content[0]=='x') { info->mode^=MODE_HEXOUT; -- 2.39.2