Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added sdcard support to urlsnarf module #24

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions modules/urlsnarf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash /usr/lib/turtle/turtle_module
VERSION="1.1"
VERSION="1.2"
DESCRIPTION="URL Snarf sniffs HTTP traffic"
CONF=/tmp/urlsnarf.form

Expand Down Expand Up @@ -33,6 +33,10 @@ function start {
echo "urlsnarf -n -i br-lan" | at now
echo urlsnarf started with pid $(pidof urlsnarf)
;;
sdcard)
echo "urlsnarf -n -i br-lan > /sd/urlsnarf_$DATE.log" | at now
echo urlsnarf started with pid $(pidof urlsnarf)
;;
esac
else
echo "URLSnarf not configured."
Expand Down Expand Up @@ -63,10 +67,11 @@ function configure {
--help-button \
--title "URLSnarf Configuration" \
--radiolist "\n\
urlsnarf outputs all requested URLs sniffed from HTTP traffic in CLF (Common Log Format, used by most web servers), suitable for offline post-processing with web log analysis tool (analog, wwwstat, etc.)...\n\nUse [Space] to select choice.\n" 16 60 3\
urlsnarf outputs all requested URLs sniffed from HTTP traffic in CLF (Common Log Format, used by most web servers), suitable for offline post-processing with web log analysis tool (analog, wwwstat, etc.)...\n\nUse [Space] to select choice.\n" 16 60 4\
1 "Save log to SSHFS if available." off\
2 "Save log to /tmp/" off\
3 "Do not save log file." on\
4 "Save log to /sd/" off\
2>$CONF

return=$?
Expand All @@ -87,6 +92,10 @@ urlsnarf outputs all requested URLs sniffed from HTTP traffic in CLF (Common Log
uci set urlsnarf.log="none"
uci commit urlsnarf
;;
4)
uci set urlsnarf.log="sdcard"
uci commit urlsnarf
;;
esac
;;
$DIALOG_CANCEL)
Expand Down