diff --git a/scripts/adbwireshark.pl b/scripts/adbwireshark.pl new file mode 100755 index 0000000..1c66901 --- /dev/null +++ b/scripts/adbwireshark.pl @@ -0,0 +1,27 @@ +#!/usr/bin/perl + +# Perform adb command on shell +# to check if the device is attached +$netstat = `adb shell 'netstat' 2>&1`; +if($netstat =~ m/error: device not found/) +{ +die("Plug in your phone!\n"); +} + +# Gain root priviledges +open(SUDO, "|sudo echo ''"); +close(SUDO); + +# Redirect STDERR output to STDOUT +open STDERR, '>&STDOUT'; + +# Perform tcpdump and nc in background +open(COMMAND1, "(adb shell \"data/local/tcpdump -n -s 0 -w - | busybox nc -l 23456\") |"); + +# Perform piping to wireshark +open(COMMAND2, "((adb forward tcp:23456 tcp:54321 && nc 127.0.0.1 54321 | sudo wireshark -k -S -i lo0) &) 2>&1 > /dev/null |"); + +# Make sure the exit message appears after wireshark has been launched (hacky) +sleep(5); +print("Press ctrl-c to exit..."); +; diff --git a/j3g_server_notes b/scripts/dns_ip similarity index 100% rename from j3g_server_notes rename to scripts/dns_ip diff --git a/settings/mac_bash.sublime-workspace b/settings/mac_bash.sublime-workspace index 03f4052..690a444 100644 --- a/settings/mac_bash.sublime-workspace +++ b/settings/mac_bash.sublime-workspace @@ -55,6 +55,7 @@ "file": "/Users/j3g/.bash_android", "settings": { +<<<<<<< HEAD "buffer_size": 2101, "encoding": "UTF-8", "line_ending": "Unix" @@ -65,6 +66,9 @@ "settings": { "buffer_size": 181, +======= + "buffer_size": 2074, +>>>>>>> MOD: updated scripts "encoding": "UTF-8", "line_ending": "Unix" } @@ -138,7 +142,11 @@ "file": "/Users/j3g/.bash_history", "settings": { +<<<<<<< HEAD "buffer_size": 6798, +======= + "buffer_size": 6486, +>>>>>>> MOD: updated scripts "line_ending": "Unix" } } @@ -1224,15 +1232,24 @@ "semi_transient": false, "settings": { +<<<<<<< HEAD "buffer_size": 2101, +======= + "buffer_size": 2074, +>>>>>>> MOD: updated scripts "regions": { }, "selection": [ [ +<<<<<<< HEAD 449, 449 +======= + 549, + 549 +>>>>>>> MOD: updated scripts ] ], "settings": @@ -2572,7 +2589,11 @@ "semi_transient": false, "settings": { +<<<<<<< HEAD "buffer_size": 6798, +======= + "buffer_size": 6486, +>>>>>>> MOD: updated scripts "regions": { },