Skip to content
ᴄʜʀɪꜱ ᴍᴄᴋᴇɴᴢɪᴇ edited this page Dec 7, 2016 · 4 revisions

Installing

On Debian based systems (raspberry pi, ubuntu) make sure you've got python-netaddr, python-scapy and tcpdump installed.

By default you won't see anything on the screen and it will drop things into a file called probemon.log.

Configuring

If you want to you can use logrotate on this (and get compression). It's not very hard, I swear.

Go to /etc/logrotate.d and make a file probemon with something like the following:

/var/log/probemon/probemon.log {
  rotate 60
  daily
  dateext
  compress
  missingok
  notifempty
}

And do

# mkdir /var/log/probemon

Why not make life easy? This is because if you call it probemon the init.d scripts (using the method below) will clobber things. There's many ways around ... from naming it something different to editing the scripts manually ... but this is a really easy thing to do.

Starting on boot

Now to start it on boot, don't worry about writing your own init.d, that's a pain. Use this tool which makes life easy.

In my case I go to the source directory and added this script, which I call startup.sh

#!/bin/sh
cd /var/log
exec /home/pi/probemon/probemon.py -i wlan1

Now I run the new-service.sh:

Service name : probemon
 Description : probemon
     Command : /home/pi/probemon/startup.sh
        User : root

It will error out a bunch of things and make things look terrible ... don't worry ... this is the easiest way. I know I know, the world is terrible.

# cd /etc/init.d
# ls -ltr
...
-rwx--x--x 1 root root 1875 Dec  7 08:58 filean4mZB
# mv filean4mZB probemon
# update-rc.d probemon defaults

Now we have a minimal thing going for us. Really? really.

extra pi

On the raspberry pi you should make sure you are in monitor mode first. The full startup script for me is as follows:

#!/bin/sh
dev=wlan1
cd /var/log
service ifplugd stop
ifconfig $dev down
iwconfig $dev mode monitor
ifconfig $dev up
exec /home/pi/probemon/probemon.py -i $dev
Clone this wiki locally