Jump to content

[Fixed][Bug] update-urlsnarf.sh error


dudemonkey

Recommended Posts

Hello

Just noticed that after the /www/ folder was removed that urlsnarf’s clean log file is not filling up.

The problem is that the path located in the /pineapple/urlsnarf/update-urlsnarf.sh bash file that fills the urlsnarf-clean.log is incorrect.

Here is the original code from the pineapple version 2.7.0

Update-urlsnarf.sh file...

_____________________________________________________________________________

#!/bin/sh

while true

do cat /pineapple/logs/urlsnarf.log | awk {'print $1 $8'} | sed 's,http://, ,' | sed 's/.lan//' | sed 's%/.*$%%' | uniq > /www/pineapple/logs/urlsnarf-clean.log

sleep 10

done

_______________________________________________________________________________

The /www folder no longer exists, if you remove it from the code the bash script works.

The awk {'print $1 $8'} command is also incorrect. $8 is the wrong column of the urlsnarf.log. The $8 should also be a $7.

Like so….

_____________________________________________________________________________

#!/bin/sh

while true

do cat /pineapple/logs/urlsnarf.log | awk {'print $1 $7'} | sed 's,http://, ,' | sed 's/.lan//' | sed 's%/.*$%%' | uniq > /pineapple/logs/urlsnarf-clean.log

sleep 10

done

_______________________________________________________________________________

Let me know if anyone else finds this useful.

thanks

Link to comment
Share on other sites

  • 1 month later...
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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