[GTER] Script remoção virus UBNT - ** remove e atualiza **

Alexandre J. Correa (Onda) alexandre at onda.net.br
Sun May 15 02:34:07 -03 2016


Versão que remove e atualiza o rádio

#!/bin/sh
#ajcorrea

/bin/sed -ir '/mcad/ c ' /etc/inittab
/bin/sed -ir '/mcuser/ c ' /etc/passwd
/bin/rm -rf /etc/persistent/https
/bin/rm -rf /etc/persistent/mcuser
/bin/rm -rf /etc/persistent/mf.tar
/bin/rm -rf /etc/persistent/.mf
/bin/rm -rf /etc/persistent/rc.poststart
/bin/rm -rf /etc/persistent/rc.prestart
/bin/kill -HUP `/bin/pidof init`
/bin/kill -9 `/bin/pidof mcad`
/bin/kill -9 `/bin/pidof init`
/bin/kill -9 `/bin/pidof search`
/bin/kill -9 `/bin/pidof mother`
/bin/kill -9 `/bin/pidof sleep`
/bin/cfgmtd -w -p /etc/

versao=`cat /etc/version | cut -d'.' -f1`
cd /tmp

if [ "$versao" == "XM" ]; then
URL='http://dl.ubnt.com/firmwares/XN-fw/v5.6.4/XM.v5.6.4.28924.160331.1253.bin'
         wget $URL
         ubntbox fwupdate.real -m /tmp/XM.v5.6.4.28924.160331.1253.bin
else
URL='http://dl.ubnt.com/firmwares/XW-fw/v5.6.4/XW.v5.6.4.28924.160331.1238.bin'
         wget $URL
         ubntbox fwupdate.real -m /tmp/XW.v5.6.4.28924.160331.1238.bin
fi


Diego Canton, atualiza o GITHUB lá que este procedimento já ajuda 
bastante a galera...

-- 
Sds.

Alexandre Jeronimo Correa
Onda Internet
Office: +55 34 3351 3077
www.onda.net.br




More information about the gter mailing list