This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# correr como usuario zimbra | |
# se deja como password el username + contenido de la variable append | |
# se fuerza al usuario a cambiar la contraseña en el próximo inicio de sesión. | |
zmprov -l getAllAccounts > cuentas; | |
append='x0i1*'; | |
for line in $(cat cuentas); | |
do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# usage> ejecutarlo en el mismo directorio donde se encuentran las imagenes | |
# en el cut se indica a partir de cual caracter va a dejar el nombre | |
# falta codigo de autodestruccion - one liners rules! | |
for i in *.jpg; do mv "$i" "`echo $i|cut -c2-`"; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# For information about entries in this file, type "man shorewall-blacklist" | |
# Please see http://shorewall.net/blacklisting_support.htm for additional | |
# Shorewall version 4 - Blacklist File | |
# information. | |
############################################################################### | |
#ADDRESS/SUBNET PROTOCOL PORT | |
110.84.206.32 | |
110.84.209.87 | |
110.84.235.188 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/sh | |
route add -net 69.63.176.0 netmask 255.255.240.0 gw 127.0.0.1; | |
route add -net 66.220.144.0 netmask 255.255.240.0 gw 127.0.0.1; | |
route add -net 66.220.144.0 netmask 255.255.248.0 gw 127.0.0.1; | |
route add -net 66.220.152.0 netmask 255.255.248.0 gw 127.0.0.1; | |
route add -net 66.220.159.0 netmask 255.255.255.0 gw 127.0.0.1; | |
route add -net 69.28.179.0 netmask 255.255.255.0 gw 127.0.0.1; | |
route add -net 69.63.176.0 netmask 255.255.248.0 gw 127.0.0.1; | |
route add -net 69.63.184.0 netmask 255.255.248.0 gw 127.0.0.1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
resultado="/home/altmas5/scan.txt" | |
clamscan -r /www/ | grep FOUND > $resultado; | |
sed -i '/LibClamAV/ d' $resultado; | |
#guardando size del archivo para evitar correos vacios | |
TAM=$(stat --printf="%s" $resultado); | |
if [ "$TAM" != "0" ] #importante el espacio entre if-[-"-"-!=-"-"] | |
then | |
echo $resultado | /usr/bin/mail -s "Resultado de antivirus clamAV en servidor web" [email protected] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
current=`setxkbmap -query| grep layout| awk '{print $2}'` | |
echo $current; | |
if [ $current == "us" ] | |
then | |
# echo "Esta en gringo" | |
setxkbmap es | |
else | |
if [ $current == "es" ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# For including it on your OSSEC conf: | |
# Requires gnokii | |
# http://www.ossec.net/doc/manual/ar/ar-custom.html | |
/usr/bin/gnokii --deletesms ME 1 25; | |
ACTION=$1 | |
USER=$2 | |
IP=$3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# descargar playlist de youtube | |
# y convertir de flv a mp4 para ver | |
# offline en dispositivos como PDAs | |
# uso youtube-dl y ffmpeg | |
#agrega o linkea youtube-dl a tu PATH | |
DIR='$HOME/Videos/'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#invoke this script at the end of /etc/rc.local file | |
for j in $(/opt/xensource/bin/xe vm-list is-control-domain=false | grep label| awk '{print $4}') | |
do | |
/opt/xensource/bin/xe vm-start name-label=$j; | |
sleep 30; | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Ruta en la que se guarda el log de la operacion de backup. | |
logfile="/var/backup/mysql/backUp.log" | |
# Ruta en la que guardar los backups | |
backup_dir="/var/backup/mysql" | |
# Usuario | |
username="root" |
OlderNewer