Create payload.txt

master
Darren Kitchen 2019-09-13 17:23:21 -07:00 committed by GitHub
parent 2b7015ea11
commit f7533240a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,36 @@
#!/bin/bash
# Title: Arming Mode
# Author: Hak5
# Version: 1.0
function check_version() {
VERSION=$(cat /etc/owl/VERSION)
[[ $VERSION = "1.0.0" ]] || {
echo "ERROR: Requires firmware version 1.0.0." > /dev/console
return 1
}
}
function configure_network() {
uci set wireless.radio0.disabled='0'
uci commit wireless
/etc/init.d/network restart
}
function start_ssh() {
/etc/init.d/sshd start
}
function run() {
check_version && {
echo "ARMING" > /tmp/MODE
configure_network
start_ssh
LED R DOUBLE
}
}
run &> /dev/null