THCMinister Posted March 18, 2014 Share Posted March 18, 2014 I'm trying to parse the output of wash for automation. Here is what I have been playing aroung with ifconfig wlan2 upairmon-ng start wlan2wash -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. Quote Link to comment Share on other sites More sharing options...
cooper Posted March 18, 2014 Share Posted March 18, 2014 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. Quote Link to comment Share on other sites More sharing options...
THCMinister Posted March 18, 2014 Author Share Posted March 18, 2014 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? Quote Link to comment Share on other sites More sharing options...
cooper Posted March 18, 2014 Share Posted March 18, 2014 How about nohup wash -D -i mon0 | tee /sd/wash.log & Quote Link to comment Share on other sites More sharing options...
THCMinister Posted March 18, 2014 Author Share Posted March 18, 2014 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/ashrm -f /sd/wash.logrm -f /sd/wash2.logrm -f /sd/wash3.logifconfig wlan2 upairmon-ng start wlan2nohup wash -D -i mon0 | tee /sd/wash.log &sleep 300ID=$(ps aux| grep "wash"|grep "mon0"|awk '{print $1}')kill $IDtail -n+3 /sd/wash.log > /sd/wash2.log#rm -f /sd/wash.logcat /sd/wash2.log | grep -v "(null)" > /sd/wash3.log#rm -f /sd/wash2.log Quote Link to comment Share on other sites More sharing options...
cooper Posted March 18, 2014 Share Posted March 18, 2014 What fails? Does it remain active for the duration of the script, or does it die prematurely? Quote Link to comment Share on other sites More sharing options...
THCMinister Posted March 18, 2014 Author Share Posted March 18, 2014 it remains active but the script haults and doesnt continue while nohup is redirecting the output of wash. Quote Link to comment Share on other sites More sharing options...
cooper Posted March 18, 2014 Share Posted March 18, 2014 Drop the -D Quote Link to comment Share on other sites More sharing options...
THCMinister Posted March 19, 2014 Author Share Posted March 19, 2014 Still no go :( Quote Link to comment Share on other sites More sharing options...
cooper Posted March 20, 2014 Share Posted March 20, 2014 nohup wash -i mon0 > /sd/wash.log & Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.