MOD: updated scripts

This commit is contained in:
JohnE 2017-03-31 08:38:04 -07:00
parent 22973be4d6
commit f2b0e240cd
3 changed files with 48 additions and 0 deletions

27
scripts/adbwireshark.pl Executable file
View File

@ -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...");
<STDIN>;

View File

@ -55,6 +55,7 @@
"file": "/Users/j3g/.bash_android", "file": "/Users/j3g/.bash_android",
"settings": "settings":
{ {
<<<<<<< HEAD
"buffer_size": 2101, "buffer_size": 2101,
"encoding": "UTF-8", "encoding": "UTF-8",
"line_ending": "Unix" "line_ending": "Unix"
@ -65,6 +66,9 @@
"settings": "settings":
{ {
"buffer_size": 181, "buffer_size": 181,
=======
"buffer_size": 2074,
>>>>>>> MOD: updated scripts
"encoding": "UTF-8", "encoding": "UTF-8",
"line_ending": "Unix" "line_ending": "Unix"
} }
@ -138,7 +142,11 @@
"file": "/Users/j3g/.bash_history", "file": "/Users/j3g/.bash_history",
"settings": "settings":
{ {
<<<<<<< HEAD
"buffer_size": 6798, "buffer_size": 6798,
=======
"buffer_size": 6486,
>>>>>>> MOD: updated scripts
"line_ending": "Unix" "line_ending": "Unix"
} }
} }
@ -1224,15 +1232,24 @@
"semi_transient": false, "semi_transient": false,
"settings": "settings":
{ {
<<<<<<< HEAD
"buffer_size": 2101, "buffer_size": 2101,
=======
"buffer_size": 2074,
>>>>>>> MOD: updated scripts
"regions": "regions":
{ {
}, },
"selection": "selection":
[ [
[ [
<<<<<<< HEAD
449, 449,
449 449
=======
549,
549
>>>>>>> MOD: updated scripts
] ]
], ],
"settings": "settings":
@ -2572,7 +2589,11 @@
"semi_transient": false, "semi_transient": false,
"settings": "settings":
{ {
<<<<<<< HEAD
"buffer_size": 6798, "buffer_size": 6798,
=======
"buffer_size": 6486,
>>>>>>> MOD: updated scripts
"regions": "regions":
{ {
}, },