Jump to content

Parsing Wash


THCMinister
 Share

Recommended Posts

I'm trying to parse the output of wash for automation. Here is what I have been playing aroung with

ifconfig wlan2 up
airmon-ng start wlan2
wash -i mon0 -o /sd/wash.log -D

*This is only part of the script

I have it in a shell script that has been set as a boot mode. No matter how long wash runs as a daemon, I only get the start of wash in the log. If I manually execute wash as a daemon, It often does not work, sames results using wlan1

Side Note:

I make sure the interface is up and in monitor mode before trying wash.

Any help/ideas for achieving the parsing of wash would be great. I'm open to using anything other than bash aswell.

Link to comment
Share on other sites

Hrmm... Looking at the code, it processes the arguments and performs the associated operations, where appliccable, in order. My suggestion would be to use -D first, then -o and finally -i like so

wash -D -o /sd/wash.log -i mon0

Make sure that when you compiled wash your config.h defines CONFIG_DEBUG_FILE

And finally, the program uses buffered file operations (fopen, vfprintf) which aren't guaranteed to end up in the file before fflush or fclose is called on the file descriptor and I can't really see where the program is doing this. If you're outright killing the program, which I expect you to do since it's run as a daemon and I don't see a signalhandler for notification to cleanly shutdown, there's a fair chance some buffered data simply gets dropped.

Link to comment
Share on other sites

I running this on a Pineapple Mark V, I have tried your suggestion as to rearrange the switches for wash, No change, also about compiling, wash came with reaver comes with reaver(I believe.). Besides wash, is there an alternative method for scanning for WPS enabled routers?

Link to comment
Share on other sites

I installed the coreutils-nohup and manually tried "nohup wash -D -i mon0 | tee /sd/wash.log &", it kinda works, more output to the log but when I put it in the script for boot, it fails.

Here is the script I'm using for testing

#!/bin/ash
rm -f /sd/wash.log
rm -f /sd/wash2.log
rm -f /sd/wash3.log
ifconfig wlan2 up
airmon-ng start wlan2
nohup wash -D -i mon0 | tee /sd/wash.log &
sleep 300
ID=$(ps aux| grep "wash"|grep "mon0"|awk '{print $1}')
kill $ID
tail -n+3 /sd/wash.log > /sd/wash2.log
#rm -f /sd/wash.log
cat /sd/wash2.log | grep -v "(null)" > /sd/wash3.log
#rm -f /sd/wash2.log

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...