From bdce34a1b163d6eb9e286467f6ffedf216bc1b6f Mon Sep 17 00:00:00 2001 From: Cyryl Plotnicki-Chudyk Date: Thu, 2 Apr 2015 20:49:05 +0200 Subject: [PATCH] added default values for the interface devices for usb armory scripts --- tools/armory_demasq | 9 +++++++-- tools/armory_masq | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/tools/armory_demasq b/tools/armory_demasq index 4646ead9..8851dd6c 100755 --- a/tools/armory_demasq +++ b/tools/armory_demasq @@ -1,8 +1,13 @@ #!/bin/bash set -e set -v -USB_INTERFACE=enp0s20u3 -INTERNET_INTERFACE=wlp3s0 +if [[ -z "$USB_INTERFACE" ]]; then + USB_INTERFACE=usb0 +fi + +if [[ -z "$INTERNET_INTERFACE" ]]; then + INTERNET_INTERFACE=wlan0 +fi echo 0 | sudo tee /proc/sys/net/ipv4/ip_forward diff --git a/tools/armory_masq b/tools/armory_masq index 48ef10a2..93c82adf 100755 --- a/tools/armory_masq +++ b/tools/armory_masq @@ -1,8 +1,13 @@ #!/bin/bash set -e set -v -USB_INTERFACE=enp0s20u3 -INTERNET_INTERFACE=wlp3s0 +if [[ -z "$USB_INTERFACE" ]]; then + USB_INTERFACE=usb0 +fi + +if [[ -z "$INTERNET_INTERFACE" ]]; then + INTERNET_INTERFACE=wlan0 +fi sudo /sbin/ip link set $USB_INTERFACE up