Posts Tagged ‘script’

Virtualmin mass disable-feature

DOMAINS=” domain1 domain2 domain3″

for i in ${DOMAINS}

do

virtualmin disable-feature –domain $i –webalizer

done

(more…)

Shell Array of Arrays

#!/bin/sh
array="aaa bbb ccc"
array2="aaa1 bbb1 ccc1"
test="\$array \$array2"

for i in ${test}
do
        for j in `eval echo  "$i"`
        do
                echo $j (more…)

Finding spam sending PHP scripts on your server

#php.ini


mail.add_x_header = On
mail.log = /var/log/phpmail.log

#find / -name php.ini | xargs perl -pi -e ‘s/\;mail\.log =/mail\.log = \/var\/log\/phpmail.log/i’

zyxel auto backup config

#!/bin/sh
(sleep 2 ; echo “LOGIN” ; sleep 2 ;echo “PASSWORD” ; sleep 2; echo “ENABLE_PASSWORD” ;echo “sh run” ; sleep 5; quit) | telnet 192.168.1.1