forked from TerrorSource/Root-A-Toon
-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathpayload
25 lines (25 loc) · 1.52 KB
/
payload
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh
/qmf/bin/bxt -d :happ_usermsg -s Notification -n CreateNotification -a type -v task -a subType -v notify -a text -v "Rooting your toon - please wait" 2>/dev/null >/dev/null
echo "Rooting your toon" > /qmf/www/rsrc/log
echo "Patching firewall" >> /qmf/www/rsrc/log
sed -i 's/^#-A/-A/' /etc/default/iptables.conf 2>&1 >> /qmf/www/rsrc/log
if grep -q nxt /etc/opkg/arch.conf 2>/dev/null
then
echo "Detected NXT device, installing dropbear and setting password"
curl -Nks https://raw.githubusercontent.com/ToonSoftwareCollective/Root-A-Toon/master/dropbear_2014.66-r0_cortexa9hf-vfp-neon.ipk -o /tmp/dropbear_2014.66-r0_cortexa9hf-vfp-neon.ipk >> /qmf/www/rsrc/log
opkg install /tmp/dropbear_2014.66-r0_cortexa9hf-vfp-neon.ipk >> /qmf/www/rsrc/log
sed -i 's/root:DISABLED/root:FTR0zlZvsHEF2/' /etc/shadow
else
echo "Detected QB2 device, installing dropbear and setting password" >> /qmf/www/rsrc/log
curl -Nks https://raw.githubusercontent.com/ToonSoftwareCollective/Root-A-Toon/master/dropbear_2015.71-r0_qb2.ipk -o /tmp/dropbear_2015.71-r0_qb2.ipk >> /qmf/www/rsrc/log
opkg install /tmp/dropbear_2015.71-r0_qb2.ipk >> /qmf/www/rsrc/log
sed -i 's/root:DISABLED/root:FTR0zlZvsHEF2/' /etc/passwd
fi
/etc/init.d/iptables restart >> /qmf/www/rsrc/log
/etc/init.d/dropbear start >> /qmf/www/rsrc/log
#get update script
curl -Nks https://raw.githubusercontent.com/ToonSoftwareCollective/update-rooted/main/update-rooted.sh -o /root/update-rooted.sh
#run update script fixes
sh /root/update-rooted.sh -f >> /qmf/www/rsrc/log
killall -9 qt-gui
sync