Added Jack-Tester payload

pull/1/head
Mike Flynn 2019-08-22 14:12:30 -07:00
parent 8f380aa2ac
commit c1f40e7fa7
2 changed files with 38 additions and 0 deletions

Binary file not shown.

View File

@ -0,0 +1,38 @@
#!/bin/bash
#
# Title: Jack Tester
# Author: Hydrox
# Version: 1.0
#
# Boots and looks for an ip address to test if the port is active on the LAN.
#
# Magenta Solid............Setup
# Red Slow Blink...........Inactive Jack
# Green....................Active Jack
#
function find_subnet() {
SUBNET=$(ip addr | grep -i eth0 | grep -i inet | grep -E -o "([0-9]{1,3}[\.]){3}[0-9]{1,3}[\/]{1}[0-9]{1,2}" | sed 's/\.[0-9]*\//\.0\//')
}
function run() {
LED SETUP
# Find IP address and subnet
for i in {1..30}; do
sleep 1 && find_subnet
if [ ! -z "$SUBNET" ]; then
break;
fi
done
if [ -z "$SUBNET" ]; then
LED FAIL
else
LED FINISH
fi
}
# Run payload
run &