From 036fa7d5ae341d2a408ebd4065db4718a31bbc9f Mon Sep 17 00:00:00 2001 From: Zappus Date: Sat, 16 Dec 2017 08:57:47 -0500 Subject: [PATCH] added sdcard support added a new selectable option to output data to sdcard (/sd/ folder) --- modules/urlsnarf | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/modules/urlsnarf b/modules/urlsnarf index d0f1892..6d08775 100755 --- a/modules/urlsnarf +++ b/modules/urlsnarf @@ -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 @@ -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." @@ -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=$? @@ -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)