The News‎ > ‎

Schedule airodump via Cron to run every X minutes

posted Jan 4, 2018, 11:23 PM by Leigh Williams   [ updated Jan 4, 2018, 11:24 PM ]
service cron status -- check if it is running
ps -ef |grep cron --another way to check if cron is running

You can use the below to generate output files every XX minutes with a list of APs and stations nearby. Airodump will automatically create a new file every time you run it. You can then import these files into a DB to track channels, connected stations, track MAC addresses, etc

crontab -e
Add the below line:
*/2 * * * * /usr/sbin/timout -s 9 -k 5 1m /root/ -- -s 9 is the signal type, -k 5 says after 5 seconds KILL the process if it is still running. You kinda want this so you dont end up with multiple running airodumps. And then 1m is for how long to run the application.

In you must have this line:
/usr/sbin/airodump-ng --write /path/to/where --write-interval XX --output-format csv wlan0mon

Type "whereis timeout" to see where your timeout command is locateda
Type "whereis airodump-ng" to see where your airodump-ng is located