dstumbler improvements:
- print the times of last seen, etc in proper, human-readable format - print the times in local timezone format, not GMT - quick hack to make dstumbler beep when it discovers a new base station. it works, as opposed to what was there before (using /dev/spkr) Thanks to Nikolay Sturm for testing sound
This commit is contained in:
parent
7014ba7264
commit
5dc6610854
@ -1,9 +1,9 @@
|
|||||||
# $OpenBSD: Makefile,v 1.2 2002/12/29 20:31:39 fgsch Exp $
|
# $OpenBSD: Makefile,v 1.3 2003/01/14 23:52:39 pvalchev Exp $
|
||||||
|
|
||||||
COMMENT= "wireless auditing suite"
|
COMMENT= "wireless auditing suite"
|
||||||
|
|
||||||
DISTNAME= bsd-airtools-v0.2
|
DISTNAME= bsd-airtools-v0.2
|
||||||
PKGNAME= bsd-airtools-0.2
|
PKGNAME= bsd-airtools-0.2p1
|
||||||
CATEGORIES= security net
|
CATEGORIES= security net
|
||||||
EXTRACT_SUFX= .tgz
|
EXTRACT_SUFX= .tgz
|
||||||
|
|
||||||
|
36
security/bsd-airtools/patches/patch-dstumbler_aps_c
Normal file
36
security/bsd-airtools/patches/patch-dstumbler_aps_c
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
$OpenBSD: patch-dstumbler_aps_c,v 1.1 2003/01/14 23:52:40 pvalchev Exp $
|
||||||
|
--- dstumbler/aps.c.orig Tue Feb 26 04:01:31 2002
|
||||||
|
+++ dstumbler/aps.c Sat Nov 23 11:43:42 2002
|
||||||
|
@@ -101,8 +101,7 @@ parse_ap(const char *iface)
|
||||||
|
redraw_aps();
|
||||||
|
|
||||||
|
if(audiomode)
|
||||||
|
- audio_play((!new.weped || new.weped == 2) ?
|
||||||
|
- SPKR_AP_PLAY_NOWEP : SPKR_AP_PLAY_WEP);
|
||||||
|
+ audio_play();
|
||||||
|
|
||||||
|
if(aps_new == 0 || autosel)
|
||||||
|
redraw_apinfo();
|
||||||
|
@@ -320,9 +319,9 @@ redraw_apinfo(void)
|
||||||
|
if(then != now || apnew || apchange)
|
||||||
|
{
|
||||||
|
if(apnew || apchange || !then)
|
||||||
|
- gmtime_r((time_t *)&ptr->firstseen.tv_sec, &firsttm);
|
||||||
|
+ localtime_r((time_t *)&ptr->firstseen.tv_sec, &firsttm);
|
||||||
|
|
||||||
|
- gmtime_r((time_t *)&ptr->lastseen.tv_sec, &lasttm);
|
||||||
|
+ localtime_r((time_t *)&ptr->lastseen.tv_sec, &lasttm);
|
||||||
|
then = now;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -353,8 +352,8 @@ redraw_apinfo(void)
|
||||||
|
" %s\n"
|
||||||
|
" Channel: %-2d %s\n"
|
||||||
|
" Signal/Noise: %d/%d/%d\n"
|
||||||
|
- " First Seen: %d:%d:%d\n"
|
||||||
|
- " Last Seen: %d:%d:%d\n",
|
||||||
|
+ " First Seen: %02d:%02d:%02d\n"
|
||||||
|
+ " Last Seen: %02d:%02d:%02d\n",
|
||||||
|
ptr->ssid, ptr->bssid[0], ptr->bssid[1], ptr->bssid[2], ptr->bssid[3],
|
||||||
|
ptr->bssid[4], ptr->bssid[5], mfg_buf, ptr->chan, mon_buf, ptr->quality[0],
|
||||||
|
ptr->quality[1], ptr->quality[2], firsttm.tm_hour, firsttm.tm_min,
|
33
security/bsd-airtools/patches/patch-dstumbler_audio_c
Normal file
33
security/bsd-airtools/patches/patch-dstumbler_audio_c
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
$OpenBSD: patch-dstumbler_audio_c,v 1.1 2003/01/14 23:52:40 pvalchev Exp $
|
||||||
|
--- dstumbler/audio.c.orig Tue Dec 4 19:34:40 2001
|
||||||
|
+++ dstumbler/audio.c Sat Nov 23 11:43:09 2002
|
||||||
|
@@ -61,17 +61,20 @@ audio_graph(int pitch)
|
||||||
|
b = (pitch % 10) / 2;
|
||||||
|
|
||||||
|
snprintf(audio_buf, AUDIO_BUF_LEN - 1, "L8o%dao%da", a, b);
|
||||||
|
- audio_play(audio_buf);
|
||||||
|
+/* audio_play(audio_buf); */
|
||||||
|
+ audio_play();
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
- * play specified audio string though the audio device
|
||||||
|
+ * Beep when a hostap is found
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
-audio_play(char *string)
|
||||||
|
+audio_play(void)
|
||||||
|
{
|
||||||
|
+ printf("\007");
|
||||||
|
+#if 0
|
||||||
|
if((sp_fd = open(SPKR_DEV, O_WRONLY|O_NONBLOCK|O_SYNC)) < 0)
|
||||||
|
{
|
||||||
|
alert("error: unable to open speaker device: %s", strerror(errno));
|
||||||
|
@@ -89,4 +92,5 @@ audio_play(char *string)
|
||||||
|
alert("error: error closing speaker device: %s", strerror(errno));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
}
|
12
security/bsd-airtools/patches/patch-dstumbler_dstumbler_h
Normal file
12
security/bsd-airtools/patches/patch-dstumbler_dstumbler_h
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
$OpenBSD: patch-dstumbler_dstumbler_h,v 1.1 2003/01/14 23:52:40 pvalchev Exp $
|
||||||
|
--- dstumbler/dstumbler.h.orig Sat Nov 23 11:42:14 2002
|
||||||
|
+++ dstumbler/dstumbler.h Sat Nov 23 11:42:23 2002
|
||||||
|
@@ -450,7 +450,7 @@ void mon_stop(void);
|
||||||
|
* audio.c
|
||||||
|
*/
|
||||||
|
void audio_graph(int);
|
||||||
|
-void audio_play(char *);
|
||||||
|
+void audio_play(void);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* log.c
|
30
security/bsd-airtools/patches/patch-dstumbler_log_c
Normal file
30
security/bsd-airtools/patches/patch-dstumbler_log_c
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
$OpenBSD: patch-dstumbler_log_c,v 1.1 2003/01/14 23:52:40 pvalchev Exp $
|
||||||
|
--- dstumbler/log.c.orig Fri Nov 8 15:00:50 2002
|
||||||
|
+++ dstumbler/log.c Fri Nov 8 15:01:08 2002
|
||||||
|
@@ -55,7 +55,7 @@ log_ap(FILE *fd, struct aps_s *ap, struc
|
||||||
|
{
|
||||||
|
struct tm tmval;
|
||||||
|
|
||||||
|
- gmtime_r((time_t *)&log->seen.tv_sec, &tmval);
|
||||||
|
+ localtime_r((time_t *)&log->seen.tv_sec, &tmval);
|
||||||
|
|
||||||
|
fprintf(fd, "%c %4.7f\t%c %4.7f\t( %s )\t%s\t"
|
||||||
|
"( %02x:%02x:%02x:%02x:%02x:%02x )\t"
|
||||||
|
@@ -122,7 +122,7 @@ log_node(FILE *fd, struct aps_s *ap, str
|
||||||
|
{
|
||||||
|
struct tm tmval;
|
||||||
|
|
||||||
|
- gmtime_r((time_t *)&log->seen.tv_sec, &tmval);
|
||||||
|
+ localtime_r((time_t *)&log->seen.tv_sec, &tmval);
|
||||||
|
|
||||||
|
fprintf(fd, "#NODE %c %4.7f\t%c %4.7f\t"
|
||||||
|
"( %02x:%02x:%02x:%02x:%02x:%02x )\t%s\t"
|
||||||
|
@@ -208,7 +208,7 @@ log_start(char *logfile)
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
- gmtime_r((time_t *)&curr_time, &tmval);
|
||||||
|
+ localtime_r((time_t *)&curr_time, &tmval);
|
||||||
|
|
||||||
|
/* print file header */
|
||||||
|
fprintf(fd,
|
Loading…
x
Reference in New Issue
Block a user