Giter Club home page Giter Club logo

horst's Introduction

HORST - Highly Optimized Radio Scanning Tool

or "Horsts OLSR Radio Scanning Tool"

Copyright (C) 2005-2016 Bruno Randolf ([email protected]) and licensed under the GNU Public License (GPL) V2

Links

Overview

horst is a small, lightweight IEEE802.11 WLAN analyzer with a text interface. Its basic function is similar to tcpdump, Wireshark or Kismet, but it's much smaller and shows different, aggregated information which is not easily available from other tools. It is made for debugging wireless LANs with a focus on getting a quick overview instead of deep packet inspection and has special features for Ad-hoc (IBSS) mode and mesh networks. It can be useful to get a quick overview of what's going on all wireless LAN channels and to identify problems.

  • Shows signal (RSSI) values per station, something hard to get, especially in IBSS mode
  • Calculates channel utilization (“usage”) by adding up the amount of time the packets actually occupy the medium
  • “Spectrum Analyzer” shows signal levels and usage per channel
  • Graphical packet history, with signal, packet type and physical rate
  • Shows all stations per ESSID and the live TSF per node as it is counting
  • Detects IBSS “splits” (same ESSID but different BSSID – this is/was a common driver problem on IBSS mode)
  • Statistics of packets/bytes per physical rate and per packet type
  • Has some support for mesh protocols (OLSR and batman)
  • Can filter specific packet types, operating modes, source addresses or BSSIDs
  • Client/server support for monitoring on remote nodes
  • Automatically adds and removes monitor interface

horst is a Linux program and can be used on any wireless LAN interface which supports monitor mode.

Checkout

If you just want to use horst, the recommended way is to download the latest stable version from https://github.com/br101/horst/releases or to use the stable branch:

git clone -b stable https://github.com/br101/horst

Note: The master branch is in heavy restructuring mode right now, as it is switching to use libuwifi (https://github.com/br101/libuwifi).

The master branch of horst builds on libuwifi as a git submodule and libuwifi in turn includes radiotap as a submodule. With newer versions of git the easiest way to check out is:

git clone --recursive https://github.com/br101/horst

For older versions of git, or if you have already cloned horst before, you can use:

git submodule update --init --recursive

Dependencies

horst is just a simple tool, and libncurses and header files is the only hard requirement as well as the pkg-config tool. Recently we have added support for nl80211 via libnl, so on Linux normally you need libnl3 + header files as well. On Debian/Ubuntu based distros you can install them with:

sudo apt-get install libncurses5-dev libnl-3-dev libnl-genl-3-dev pkg-config

Building

Building is normally done with "make" (optional V=1 or DEBUG=1). This checks out libuwifi as a submodule if necessary:

make

If you want to maintain libuwifi not as a submodule but in a directory outside of horst you can specify it with:

make LIBUWIFI=../my/path/to/libuwifi

Should you expect on libuwifi in the system path (/usr/local/include/ and /usr/local/lib/ or similar) you can do:

make LIBUWIFI=

To install (with optional DESTDIR=/path):

sudo make install

Config and other files

By default horst reads a config file /etc/horst.conf. The location of the file can be changed with the -c file command line option. See the file itself or man horst.conf for a description of the options.

You can use -Mfilename to define a MAC address to host name mapping file which can either be a dhcp.leases file or simply contain MAC-Address<whitesspace>Name one each line.

-o outfile can write the packets to a comma separated list file.

-X[filename] is not a real file, but allows a control socket named pipe which can later be used with -x command to send commands in the same format as the options in the config file.

Usage notes

Starting with version 5.0 horst can automatically set the WLAN interface into monitor mode or add a monitor interface. But you can still set the interface into monitor mode manually before you start horst as well. With most standard Linux (mac80211) drivers you can use the iw command to add an additional monitor interface while you can continue to use the existing interface.

iw wlan0 interface add mon0 type monitor

Please note that while the main interface (wlan0) is in use, either as a client to an AP, in Ad-hoc mode, or creating an AP, the wifi driver does not allow horst to change the channel because that would disrupt connectivity. If you want horst to be able to change channels (horst -s or channel_scan option, or setting a channel manually in the horst UI) you need to set the main interface to monitor mode. This is how it is usually done:

ifconfig wlan0 down
iw wlan0 set type monitor

Optionally you could also set an initial channel, and it sometimes may be necessary to unblock the interface first:

rfkill unblock all
ifconfig wlan0 up
iw wlan0 set channel 6

If you still have to use the deprecated WEXT interface can put the interface into monitor mode with iwconfig wlan0 mode monitor channel X).

Usually you have to start horst as root:

sudo horst -i wlan0

To do remote monitoring over the network you can start a server (-q without a user interface), usually on your AP or device with

horst -i wlan0 -N -q

and connect a client (only one client is allowed at a time), usually from your PC with

horst -n IP

Please read the man page for more details about the options, output and abbreviations. It should be be part of your distribution package, but you can read it in the source code locally with:

man -l horst.8
man -l horst.conf.5

Please contact me if you have any problems or questions. New feature ideas, patches and feedback are always welcome. Please create GitHub issues at https://github.com/br101/horst/issues for problem reports and support.

Background and history

horst was created in 2005 to fill a need in the Wireless Mesh networking and Freifunk community of Berlin but has since grown to be a useful tool for debugging any kind of wireless network.

A notorious Berlin Freifunk community member known as "Offline Horst" had enough persistence to convince me that such a tool is necessary and thus started the development and gave the name to the horst tool.

With the usual wireless tools like iw, iwconfig and iwspy and even kismet or WireShark it is hard to measure the received signal strength (RSSI) of all available access points, stations and ad-hoc networks in a given location. It's especially difficult to differentiate the different nodes which form an ad-hoc network. This information however is very important for setting up, debugging and optimizing wireless mesh networks and antenna positions.

horst aims to fill this gap and lists each single node of an ad-hoc network separately, showing the signal strength (RSSI) of the last received packet. This way you can see which nodes are part of a specific ad-hoc cell (BSSID), discover problems with ad-hoc cell merging ("cell splitting", a problem of many WLAN drivers) and get a general overview of what's going on in the "air".

To do this, horst uses the monitor mode including radiotap headers (or before prism2 headers) for the signal strength information of the wlan cards and listens to all packets which come in the wireless interface. The packets are summarized by the MAC address of the sending node, analyzed and aggregated and displayed in a simple text (ncurses) interface.

Contributors

Thanks to the following persons for contributions:

  • Horst Krause
  • Sven-Ola Tuecke
  • Robert Schuster
  • Jonathan Guerin
  • David Rowe
  • Antoine Beaupré
  • Rami Refaeli
  • Joerg Albert
  • Tuomas Räsänen
  • Jiantao Fu

horst's People

Contributors

alexandreyc avatar anarcat avatar br101 avatar maxux avatar muratkrty avatar skruppy avatar trofi avatar tuomasjjrasanen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

horst's Issues

about the 802.11ac support

thanks for your great work,i am now using this tool. my question is "when will this tool support the 802.11ac?".because more and more 802.11ac ap in use

Packet type filter leaks packets with unknown/unmapped types

The problem

If horst is configured to filter out all but BEACON packets (-f BEACON), also ACTION packets get printed. This is because ACTION frames are not mapped to any packet type and because all non-mapped types are always included.

Adding a packet type filter always adds the generic frame type filter too (https://github.com/br101/horst/blob/master/conf_options.c#L251) and all packets belonging to generic group are always included (https://github.com/br101/horst/blob/master/main.c#L257) in the results.

So in other words, in this case, all packets with pkt_types == PKT_TYPE_MGMT get included in the results because -f BEACON not only adds PKT_TYPE_BEACON to the filter but also PKT_TYPE_MGMT. This rule matches all action frames because they are not mapped to any packet types, they only belong to the generic management frame group.

Expected behavior

If horst is configured to use inclusive packet type filtering it should filter out all except packets matching the given packet types.

In my opinion, the current behavior is wrong: unmapped frames should not get included in the result set, the filter is inclusive by definition so all non-matching packets should be excluded.

Conclusions

This specific problem could be fixed by adding PKT_TYPE_ACTION and mapping all action frames to it, but I think the problem is more generic and it should be fixed by filtering out (in filter_packet()) all packets which do not have any subtype flags set. Opinions?

bump libuwifi

@br101 Could you bump libuwifi to the version with the fixed radiotap link? Currently git clone git://github.com/br101/horst.git --recursive is broken (and this breaks building horst in OpenWrt). Thanks!

Trying to build Horst for Raspberry PI

I cloned the repository and did the suggested make from the readme guide. Here is my output -- any idea what I'm doing wrong?

echo '-std=gnu99 -Wall -Wextra -g -I.' | cmp -s - .buildflags || echo '-std=gnu99 -Wall -Wextra -g -I.' > .buildflags cc -std=gnu99 -Wall -Wextra -g -I. -c -o conf_options.o conf_options.c conf_options.c:25:24: fatal error: uwifi/util.h: No such file or directory #include <uwifi/util.h> ^ compilation terminated. <builtin>: recipe for target 'conf_options.o' failed make: *** [conf_options.o] Error 1

Best,
Henrik

Compilation and dependencies questions.

Hello,

I have a general question about the compilation and dependencies of horst.

Can you explain what is the difference between using libnl, libpcap and libuwifi ?
I'm a bit confused regarding the difference of each library ? (advandatage/disadvantage)

I also don't understand the comment in the "README.md"
"To experimentally build using libpcap (note that libpcap on Linux is not necessary and not recommended) use (Broken right now!):"

What is broken with libpcap?

Is there more than one way to capture the Wifi packet in horst ?
What is the recommended library in horst ?
Can I use two capture libraries at the same time with horst ? (ex: make PCAP=1 ... does it compile with PCAP=1 and LIBNL=1 ?)

thanks for your comments.

Installing horst from master branch fails on rpi3

I cloned master branch on raspberry pi using
git clone --recursive https://github.com/br101/horst
but the build fails with the error:

pi@rpi-inam:~/horst_master $ make
  CC      conf_options.c
conf_options.c:25:24: fatal error: uwifi/util.h: No such file or directory
 #include <uwifi/util.h>
                        ^
compilation terminated.
Makefile.default:62: recipe for target 'build/conf_options.o' failed
make: *** [build/conf_options.o] Error 1

P.S. I am able to enable monitor mode in Raspberry Pi 3 using nexmon. When I install horst from the stable branch, it gets installed, but exits with "Floating point exception error" after running for a while.

Error compiling master branch - too few arguments to function ‘uwifi_channel_width_string’

CC conf_options.c
cc -std=gnu99 -Wall -Wextra -g -I. -I./build/include/ -MD -DVERSION="version-5.0-105-g29bee88" -o build/conf_options.o -c conf_options.c
CC control.c
cc -std=gnu99 -Wall -Wextra -g -I. -I./build/include/ -MD -DVERSION="version-5.0-105-g29bee88" -o build/control.o -c control.c
CC display-channel.c
cc -std=gnu99 -Wall -Wextra -g -I. -I./build/include/ -MD -DVERSION="version-5.0-105-g29bee88" -o build/display-channel.o -c display-channel.c
display-channel.c: In function ‘update_channel_win’:
display-channel.c:50:4: error: too few arguments to function ‘uwifi_channel_width_string’
uwifi_channel_width_string(bp->max_chan_width));
^
In file included from main.h:29:0,
from display-channel.c:28:
./build/include/uwifi/channel.h:69:13: note: declared here
const char* uwifi_channel_width_string(enum uwifi_chan_width w, int ht40p);
^
display-channel.c: In function ‘channel_input’:
display-channel.c:171:4: warning: implicit declaration of function ‘uwifi_channel_fix_center_freq’ [-Wimplicit-function-declaration]
uwifi_channel_fix_center_freq(&conf.intf.channel_set, set_ht40plus);
^
Makefile.default:62: recipe for target 'build/display-channel.o' failed
make: *** [build/display-channel.o] Error 1

Install man files with make install (and rename)

Please consider installing the man files using a make install. Also add how to install the files manually.

The horst man file has the wrong name. To install correctly use something like:

# Note wrong name here, referring to wrong manual page of 1 instead of 8.
cp horst.1 horst.8
gzip horst.8
sudo cp horst.8.gz /usr/share/man/man8/horst.8.gz
gzip horst.conf.5
sudo cp horst.conf.5 /usr/share/man/man5/horst.conf.5.gz

rio.conf ?

For whats is the rio.conf file, and how to use upload_interval and upload_server options?

SNR output 99 dB

Hi,
I installed Horst on Raspberry Pi 3 B Jessie OS. Running the program is fine except the Signal output is 99 dB for every ESSID. When the Horst is used on my Openwrt OS I receive what I presume to be accurate signal levels.

  • The Horst version on Opnewrt is a little out date. Therefore I believe the problem is with the new version*

no scrolling capability on essid page

Ive looked and can not figure out how to display all ssids in the terminal interface. In the attached image there was over 3x the amount shown in history and output logs. If this is not a current feature, an option to scroll down so all are visible in live capture would be awesome.

screenshot - 08172015 - 11 49 10 am

does not compile on OSX

make OSX=1 results in
main.c:328:6: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
if (!conf.serveraddr[0] != '\0' && filter_packet(p)) {
^ ~~
main.c:328:6: note: add parentheses after the '!' to evaluate the comparison first
if (!conf.serveraddr[0] != '\0' && filter_packet(p)) {
^
( )
main.c:328:6: note: add parentheses around left hand side expression to silence this warning
if (!conf.serveraddr[0] != '\0' && filter_packet(p)) {
^
( )
main.c:495:6: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
if (!conf.serveraddr[0] != '\0') {
^ ~~
main.c:495:6: note: add parentheses after the '!' to evaluate the comparison first
if (!conf.serveraddr[0] != '\0') {
^
( )
main.c:495:6: note: add parentheses around left hand side expression to silence this warning
if (!conf.serveraddr[0] != '\0') {
^
( )
main.c:637:2: warning: implicit declaration of function 'clock_gettime' is invalid in C99 [-Wimplicit-function-declaration]
clock_gettime(CLOCK_MONOTONIC, &stats.stats_time);
^
main.c:637:16: error: use of undeclared identifier 'CLOCK_MONOTONIC'
clock_gettime(CLOCK_MONOTONIC, &stats.stats_time);
^
main.c:638:16: error: use of undeclared identifier 'CLOCK_MONOTONIC'
clock_gettime(CLOCK_MONOTONIC, &the_time);
^
main.c:723:17: error: use of undeclared identifier 'CLOCK_MONOTONIC'
clock_gettime(CLOCK_MONOTONIC, &the_time);
^
main.c:760:16: error: use of undeclared identifier 'CLOCK_MONOTONIC'
clock_gettime(CLOCK_MONOTONIC, &stats.stats_time);
^
3 warnings and 4 errors generated.
make: *** [main.o] Error 1

quiet mode

Hi,
I am running horst version 5.1-pre built on raspbian (PI Zero). I run horst as a server and connect to it with a custom Java client.

If I run Horst as horst -i wlan0 -N -p 4260 everything is fine. I get the the data over the network as expected and the user interfaces shows the data as well.

However, if I try quiet mode (both horst -i wlan0 -N -p 4260 -q and horst -i wlan0 -q) I get the following errors before exit:

Try to set max channel width HT40
nl80211 message failed: Object busy
ERROR: Failed to set CH 6 (2437 MHz) HT40+ center 2447
nl80211 message failed: Object busy
ERROR: Failed to set CH 6 (2437 MHz) HT40- center 2427
horst: failed to change the initial channel number: No such device

Is this expected?

I have not tried with the stable version or a new build, as I want some feedback before initiating a new build on a raspberry pi.

Thank you

Add build instructions for Raspberry Pi in README

Hi! Awesome low profile tool! But please add some build instructions for Raspberry Pi's. Libraries required seem to be named a little different from standard Linux distributions. After git clone -b stable we get:

pi@raspberrypi:~/horst $ make

gcc -MM -I. average.c capture.c channel.c conf_options.c control.c display-channel.c display-essid.c display-filter.c display-help.c display-history.c display-main.c display-spectrum.c display-statistics.c display.c essid.c ieee80211_util.c ifctrl-ioctl.c listsort.c main.c network.c node.c protocol_parser.c wlan_parser.c radiotap/radiotap.c util.c wlan_util.c ifctrl-nl80211.c >.objdeps.mk
Package libnl-3.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libnl-3.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libnl-3.0' found
...

There are no packages named libnl-3.0 for RPi3 (Jesse).
The way to resolve this, is by installing:

$ sudo apt-get install libncurses5-dev libnl-3-dev libnl-genl-3-dev

OSX: Build issues

JIANFU-M-M0AH:horst jeromy$ make PCAP=1
echo '-Wall -Wextra -g -I. -DDO_DEBUG -DPCAP' | cmp -s - .buildflags || echo '-Wall -Wextra -g -I. -DDO_DEBUG -DPCAP' > .buildflags
cc -Wall -Wextra -g -I. -DDO_DEBUG -DPCAP -c -o average.o average.c
cc -Wall -Wextra -g -I. -DDO_DEBUG -DPCAP -c -o capture-pcap.o capture-pcap.c
cc -Wall -Wextra -g -I. -DDO_DEBUG -DPCAP -c -o channel.o channel.c
cc -Wall -Wextra -g -I. -DDO_DEBUG -DPCAP -c -o conf_options.o conf_options.c
cc -Wall -Wextra -g -I. -DDO_DEBUG -DPCAP -c -o control.o control.c
cc -Wall -Wextra -g -I. -DDO_DEBUG -DPCAP -c -o display-channel.o display-channel.c
cc -Wall -Wextra -g -I. -DDO_DEBUG -DPCAP -c -o display-essid.o display-essid.c
cc -Wall -Wextra -g -I. -DDO_DEBUG -DPCAP -c -o display-filter.o display-filter.c
cc -Wall -Wextra -g -I. -DDO_DEBUG -DPCAP -c -o display-help.o display-help.c
cc -Wall -Wextra -g -I. -DDO_DEBUG -DPCAP -c -o display-history.o display-history.c
cc -Wall -Wextra -g -I. -DDO_DEBUG -DPCAP -c -o display-main.o display-main.c
cc -Wall -Wextra -g -I. -DDO_DEBUG -DPCAP -c -o display-spectrum.o display-spectrum.c
cc -Wall -Wextra -g -I. -DDO_DEBUG -DPCAP -c -o display-statistics.o display-statistics.c
cc -Wall -Wextra -g -I. -DDO_DEBUG -DPCAP -c -o display.o display.c
cc -Wall -Wextra -g -I. -DDO_DEBUG -DPCAP -c -o essid.o essid.c
cc -Wall -Wextra -g -I. -DDO_DEBUG -DPCAP -c -o ieee80211_util.o ieee80211_util.c
Package libnl-3.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libnl-3.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libnl-3.0' found
cc -c -Wall -Wextra -g -I. -DDO_DEBUG -DPCAP -o ifctrl-nl80211.o .buildflags
clang: warning: .buildflags: 'linker' input unused
clang: warning: argument unused during compilation: '-Wall'
clang: warning: argument unused during compilation: '-Wextra'
clang: warning: argument unused during compilation: '-g'
clang: warning: argument unused during compilation: '-I .'
clang: warning: argument unused during compilation: '-D DO_DEBUG'
clang: warning: argument unused during compilation: '-D PCAP'
cc -Wall -Wextra -g -I. -DDO_DEBUG -DPCAP -c -o listsort.o listsort.c
cc -Wall -Wextra -g -I. -DDO_DEBUG -DPCAP -c -o main.o main.c
In file included from main.c:32:
In file included from ./main.h:26:
./ccan/list/list.h:129:9: warning: 'LIST_HEAD' macro redefined [-Wmacro-redefined]

define LIST_HEAD(name) \

    ^

/usr/include/sys/queue.h:417:9: note: previous definition is here

define LIST_HEAD(name, type) \

    ^

main.c:230:52: warning: format specifies type 'long' but the argument has type 'darwin_suseconds_t'
(aka 'int') [-Wformat]
i += snprintf(buf + i, sizeof(buf) - i, ".%06ld", the_time.tv_usec);
~~~~~ ^~~~~~~~~~~~~~~~
%06d
/usr/include/secure/_stdio.h:57:62: note: expanded from macro 'snprintf'
__builtin___snprintf_chk (str, len, 0, __darwin_obsz(str), __VA_ARGS
)
^
2 warnings generated.
cc -Wall -Wextra -g -I. -DDO_DEBUG -DPCAP -c -o network.o network.c
cc -Wall -Wextra -g -I. -DDO_DEBUG -DPCAP -c -o node.o node.c
cc -Wall -Wextra -g -I. -DDO_DEBUG -DPCAP -c -o protocol_parser.o protocol_parser.c
cc -Wall -Wextra -g -I. -DDO_DEBUG -DPCAP -c -o protocol_parser_wlan.o protocol_parser_wlan.c
cc -Wall -Wextra -g -I. -DDO_DEBUG -DPCAP -c -o radiotap/radiotap.o radiotap/radiotap.c
cc -Wall -Wextra -g -I. -DDO_DEBUG -DPCAP -c -o util.o util.c
cc -Wall -Wextra -g -I. -DDO_DEBUG -DPCAP -c -o wext.o wext.c
cc -Wall -Wextra -g -I. -DDO_DEBUG -DPCAP -c -o wlan_util.o wlan_util.c
cc -o horst average.o capture-pcap.o channel.o conf_options.o control.o display-channel.o display-essid.o display-filter.o display-help.o display-history.o display-main.o display-spectrum.o display-statistics.o display.o essid.o ieee80211_util.o ifctrl-nl80211.o listsort.o main.o network.o node.o protocol_parser.o protocol_parser_wlan.o radiotap/radiotap.o util.o wext.o wlan_util.o -lncurses -lm -lpcap -lnl-3 -lnl-genl-3
clang: error: no such file or directory: 'ifctrl-nl80211.o'
make: *** [horst] Error 1

Wrong monitor type! Please use radiotap or prism2 headers

What am I doing wrong?

$ rpm -qa | grep horst
horst-3.0-6.fc23.x86_64
$ uname -a
Linux 4.2.8-300.fc23.x86_64 #1 SMP Tue Dec 15 16:49:06 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
$ sudo horst -s
horst: Interface wlan0 not found: No such device
$ dmesg | grep wlan0
[    8.176151] iwlwifi 0000:03:00.0 wls1: renamed from wlan0
$ sudo horst -s -i wls1
Wrong monitor type! Please use radiotap or prism2 headers
$ lspci | grep WiFi
03:00.0 Network controller: Intel Corporation Ultimate N WiFi Link 5300

Channel usage sometimes larger than 100%

Sometimes i saw to channel usage larger than 100%, is that normal, any links point to how the channel usage is calculated?

And the bps looks smaller than expected, is that due to the 802.11 capturing in poor performance? The usage is around 100%, but the bps is near 1~ 2 mbps.

question about node_timeout() function?

Hi! I am using & learning horst recently.But I found that the main display window never delete PR after timeout, I enable WIFI on my phone, then disable WIFI when I see it on display window, and wait for 60 sec, my phone mac address is still there.
I dig into the code and found something. It will delete node info using the code:
// node.c node_timeout() if (n->last_seen < (the_time.tv_sec - conf.node_timeout)) { //... }
last_seen is timestamp of the node:
// node.c copy_nodeinfo() n->last_seen = time(NULL);
the_time is current time:
clock_gettime(CLOCK_MONOTONIC, &the_time);
But, the_time.tv_sec is always smaller then n->last_seen, so it will not delete node info.

When I change
clock_gettime(CLOCK_MONOTONIC, &the_time);
to
clock_gettime(CLOCK_REALTIME, &the_time);
everything is OK.

Is there something wrong or just my misunderstanding of horst?
Thanks!

OLSR2 support?

Would it be possible for you to implement OLSR2 support?

Unable to scan beyond channel 1

I have HORST running on a RPi 2 with a USB RTL8812AU 802.11a/b/g/n/ac connected.

When running HORST I only see output from channel 1. Attempting to channel scan or set a channel other than 1 results in an error

ERROR: Failed to set CH 136 (5680 MHz) HT40-
ERROR: Failed to set CH 136 (5680 MHz) HT40+
ERROR: Failed to set CH 140 (5700 MHz) HT40-
ERROR: Failed to set CH 149 (5745 MHz) HT40+
ERROR: Failed to set CH 153 (5765 MHz) HT40-
nl80211 message failed: Operation not supported

enter and left promiscuous mode...

Hi, Im running horst every few minutes, to capture some data over a Router with openwrt.
My router have some stations connected via wifi, and (almost) every time horst is killed, the stations are disconected.

Im using this command to run horst (run horst, save content, kill after 55 seconds):
(horst -i mon0 -t 60 -f NULL -f QDATA -f PROBE -f ASSOC -o /tmp/capture.csv -q ) & sleep 55 ; kill $!;

and in logread I have this:

Fri May 29 20:23:21 2015 kern.info kernel: [ 2521.470000] device mon0 entered promiscuous mode
Fri May 29 20:24:00 2015 daemon.info hostapd: wlan1-1: STA 2c:8a:73:A4:13:15 IEEE 802.11: authenticated
Fri May 29 20:24:00 2015 daemon.info hostapd: wlan1-1: STA 2c:8a:73:A4:13:15 IEEE 802.11: associated (aid 1)
Fri May 29 20:24:00 2015 daemon.info hostapd: wlan1-1: STA 2c:8a:73:A4:13:15 WPA: pairwise key handshake completed (RSN)
Fri May 29 20:24:16 2015 kern.info kernel: [ 2576.480000] device mon0 left promiscuous mode
Fri May 29 20:24:54 2015 daemon.info hostapd: wlan0-1: STA 2c:8a:73:A4:13:15 IEEE 802.11: disassociated due to inactivity
Fri May 29 20:24:55 2015 daemon.info hostapd: wlan0-1: STA 2c:8a:73:A4:13:15 IEEE 802.11: deauthenticated due to inactivity (timer DEAUTH/REMOVE)

How I can prevent the horst left promiscuous mode?

Can't set 3 digit channels

When in the main interface of host, i hit 'c' to get to the Channel menu, and i then press 'm' to set a channel manually, it only allows me to enter a 2 digit channel. I cannot type in for example channel 104. However if i set the 'automatically channel change' option i do see it goes to these channel.

Can the code be updated to allow for channels to be manually set to allow for 3 digit channels? Basically can't manually set to channel 100-165

use "vX.Y" tag names (aka semantic versioning)

Hi!

Horst currently uses a tagging scheme like version-X.Y. this makes GitHub generate a tarball (and its content) that is weirdly named:

$ tar zft ../version-5.0.tar.gz  | head -1
horst-version-5.0/

If you would use the more conventional vX.Y or simply X.Y as a naming scheme, Github would strip away that v letter an create a more reasonable tarball:

$ tar zft ../build-area/horst-5.0.tar.gz  | head -1
horst-5.0/

This would be useful for the Debian package I am maintaining as it would make it possible to reproducibly rebuild the original tarball from the Git source more easily.

Thanks!

Better error handling

Based in 33f6562

Provoking an error, by starting horst on an interface which is down, results in the following output:

Set 'interface' = 'wlp2s0'
Can't activate pcap: -9
horst: Couldn't open packet socket: Success

This could be done better :)

  • Use pcap_perror() or similar to get a meaningful PCAP error message.
  • Stop horst after the first error (There shouldn't be any further error messages). Forgot to check a return value?
  • The classical "Error: Success" in the last line also indicates an inpropper return value or errno handling.

(Perhaps I find time to fix this by my self, but not in the near feature)

Date stamp is always 1970 RPI 2

System: Raspberry Pi 2 with latest(as of 1-2-17) Raspian install. Horst compiled and running
from latest source.
Date stamps in output log file are always 1970, even though system clock/time date etc are all correct.
Like this:
1970-01-01 00:18:19.578439 +0000

Segfault since 8345a13

Hi,

I've encountered a segfault which seems to be introduced by commit 8345a13 (I found out this using git bisect).

The command I use is the following: horst -i mon0 -q -o /tmp/stream -f PROBRQ where /tmp/stream is a named pipe. The command starts correctly and after a few seconds it segfaults. Notice that sometimes it doesn't segfault but it's just frozen and output nothing. Debug log doesn't bring much interesting information...

Let me know if you need more informations, I'm also working on it.

Broken link to submodule libuwifi

If you issue the following command:

git clone git://github.com/br101/horst.git horst --recursive

it will fail to clone the libuwifi submodule and produce the following error:

fatal: reference is not a tree: 013ba18f9f2589d9478009a3b4abebfb09065054
Unable to checkout '013ba18f9f2589d9478009a3b4abebfb09065054' in submodule path 'libuwifi'

It is easy to see why this occurs if you go to https://github.com/br101/horst and click on the link to the libuwifi submodule (https://github.com/br101/libuwifi/tree/013ba18f9f2589d9478009a3b4abebfb09065054)

I was able to manually clone libuwifi using:

git clone git://github.com/br101/libuwifi libuwifi --recursive

However, when I tried to checkout the commit (013ba18f9f2589d9478009a3b4abebfb09065054) with:

git checkout 013ba18f9f2589d9478009a3b4abebfb09065054

it reproduces the error:

fatal: reference is not a tree: 013ba18f9f2589d9478009a3b4abebfb09065054

I think the problem may be that this particular commit of libuwifi has not been pushed to Github. This means the parent module (horst) is referencing a commit that doesn't exist on Github yet.

Linking issue with new version

Hallo all,

I was trying the latest (Unstable) version of horst using libuwifi. I am getting some linking error with libuwifi.so.1

`./horst: error while loading shared libraries: libuwifi.so.1: cannot open shared object file: No such file or directory

Should I need to set the path to the libuwifi build folder(thats the plan) or whether makefile should be modified into such way that, it is copied into default linux location?

I think the libuwifi.so.1 should be copied into /usr/lib64/ ..and should I modify the makefile ??

Thanks

Can't turn off channel switch data

When scanning you can't turn off the red channels switch data, which is not useful data and just
makes the display difficult to read.

Filtering probrq at start

Hi, I'm running Horst on a Raspberry Pi/touchscreen and this menu system. The Horst button triggers a script that includes the following code:

iw wlan2 interface add mon0 type monitor horst -i mon0 -f probrq -o "horst.$(date +%F_%R).log"

When Horst runs, the console window appears with no activity. If I use a keyboard to select 'f' and 'p' to only show probe requests, I get activity. Is the above command incorrect? Is there a command that can run Horst only showing/logging probe requests?

Thank you

Support for GPSd?

Hello,
Is there any way you could support adding location information to each record, every x seconds (or something similar)? I'd love to use GPSd to keep location and time records with my data. Thoughts?

dont show own packets

on OpenWrt trunk/r47244 with horst Version 4.2 (build date Oct 27 2015 10:12:38) in
hybrid mode (ap+adhoc) i can see my own packets:

18: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc prio state UP qlen 1000
    link/ether f8:d1:11:a9:ce:c8 brd ff:ff:ff:ff:ff:ff
    inet 10.10.5.1/8 brd 10.255.255.255 scope global wlan0
       valid_lft forever preferred_lft forever
    inet6 fe80::fad1:11ff:fea9:cec8/64 scope link 
       valid_lft forever preferred_lft forever
19: wlan0-1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc prio state UP qlen 1000
    link/ether fa:d1:11:a9:ce:c8 brd ff:ff:ff:ff:ff:ff
    inet 10.10.5.2/27 brd 10.10.5.31 scope global wlan0-1
       valid_lft forever preferred_lft forever
    inet6 fe80::f8d1:11ff:fea9:cec8/64 scope link 
       valid_lft forever preferred_lft forever

horst shows e.g. beacons from 'f8:d1:11:a9:ce:c8' (=wlan0) when invoked via:

iw phy phy0 interface add MON type monitor
horst -i MON

Add version info to binary

Please consider also adding a --version or -v switch to the horst binary. (The only package available for Raspberry Pi is way outdated, and version can only be checked by using apt/dpkg info.)

cd49bed fails to build on OS X 10.11.6

I'm trying to build cd49bed (of July 29) on a Mac OS X 10.11.6 machine. This causes a build error, see below. Let me know if I can try and help debug the problem, or if there is any additional information about the build environment that you need.

$ make OSX=1
gcc -MM -I. conf_options.c control.c display-channel.c display-essid.c display-filter.c display-help.c display-history.c display-main.c display-spectrum.c display-statistics.c display.c essid.c hutil.c ieee80211_duration.c listsort.c main.c network.c protocol_parser.c >.objdeps.mk
conf_options.c:25:10: fatal error: 'uwifi/util.h' file not found
#include <uwifi/util.h>
         ^
1 error generated.
In file included from control.c:27:
./main.h:27:10: fatal error: 'ccan/list/list.h' file not found
#include <ccan/list/list.h>
         ^
1 error generated.
In file included from display-channel.c:25:
./main.h:27:10: fatal error: 'ccan/list/list.h' file not found
#include <ccan/list/list.h>
         ^
1 error generated.
display-essid.c:24:10: fatal error: 'uwifi/node.h' file not found
#include <uwifi/node.h>
         ^
1 error generated.
display-filter.c:24:10: fatal error: 'uwifi/wlan_util.h' file not found
#include <uwifi/wlan_util.h>
         ^
1 error generated.
display-help.c:24:10: fatal error: 'uwifi/wlan_util.h' file not found
#include <uwifi/wlan_util.h>
         ^
1 error generated.
display-history.c:24:10: fatal error: 'uwifi/util.h' file not found
#include <uwifi/util.h>
         ^
1 error generated.
display-main.c:25:10: fatal error: 'uwifi/wlan80211.h' file not found
#include <uwifi/wlan80211.h>
         ^
1 error generated.
display-spectrum.c:24:10: fatal error: 'uwifi/util.h' file not found
#include <uwifi/util.h>
         ^
1 error generated.
display-statistics.c:24:10: fatal error: 'uwifi/wlan_util.h' file not found
#include <uwifi/wlan_util.h>
         ^
1 error generated.
display.c:29:10: fatal error: 'uwifi/wlan80211.h' file not found
#include <uwifi/wlan80211.h>
         ^
1 error generated.
essid.c:23:10: fatal error: 'uwifi/wlan80211.h' file not found
#include <uwifi/wlan80211.h>
         ^
1 error generated.
ieee80211_duration.c:19:10: fatal error: 'uwifi/platform.h' file not found
#include <uwifi/platform.h>
         ^
1 error generated.
listsort.c:46:10: fatal error: 'ccan/list/list.h' file not found
#include <ccan/list/list.h>
         ^
1 error generated.
main.c:32:10: fatal error: 'uwifi/packet_sock.h' file not found
#include <uwifi/packet_sock.h>
         ^
1 error generated.
network.c:30:10: fatal error: 'uwifi/util.h' file not found
#include <uwifi/util.h>
         ^
1 error generated.
protocol_parser.c:28:10: fatal error: 'uwifi/raw_parser.h' file not found
#include <uwifi/raw_parser.h>
         ^
1 error generated.
echo '-std=gnu99 -Wall -Wextra -g -I.' | cmp -s - .buildflags || echo '-std=gnu99 -Wall -Wextra -g -I.' > .buildflags
cc -std=gnu99 -Wall -Wextra -g -I.   -c -o conf_options.o conf_options.c
conf_options.c:25:10: fatal error: 'uwifi/util.h' file not found
#include <uwifi/util.h>
         ^
1 error generated.
make: *** [conf_options.o] Error 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.