This file contains 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 | |
# It formats interactively your last_attached flash_disk. | |
# | |
# WARNING: It's under construction, this is the first working script | |
# There may be issues and improvements to be made. Any help will be appreciated. | |
# | |
# By MarcelFox | |
last_flash_disk=$(sudo dmesg -T | grep removable | tail -n1 | awk '{print $8"1"}' | sed 's/\[//g; s/\]//g') |
This file contains 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
import os, random, string | |
length = 10 | |
chars = string.ascii_letters + string.digits + '!@#$%^&*()' | |
o_chars = '!@#$%^&*()' | |
random.seed = (os.urandom(1024)) | |
print (random.choice(o_chars) + ''.join(random.choice(chars) for i in range(length)) + random.choice(o_chars)) |
This file contains 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 | |
status_conn=$(wget -q --spider http://google.com && echo 0 || echo 1) | |
if [ $status_conn -eq 1 ] | |
then | |
printf "\n \e[36m Your Internet is pretty much dead!\n Check your networks...\e[0m\n\n"; | |
elif [ $status_conn -eq 0 ] | |
then | |
external=$(dig +short myip.opendns.com @resolver1.opendns.com); |
This file contains 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 | |
echo -e "\nLista de Inodes do diretório: $(pwd)\n\n" ; for d in `find -maxdepth 1 -type d |cut -d\/ -f2 |grep -xv . |sort`; do c=$(find $d |wc -l) ; echo -e "$c\t\t- $d"; done | sort -nr ;echo -e "\nTotal: \t\t$(find $(pwd) | wc -l)" |
This file contains 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 | |
# | |
# Name: cp_testmail | |
# Version: 1.3.2 | |
# By MarcelFox | |
# | |
# HOW TO WORK WITH? | |
# As 'root' and in a cPanel server run: | |
# bash <(curl -ks http://bashdump.cf/cp_testmail.sh) | |
# |
This file contains 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 | |
# blog: https://sysadmins.co.za/mail-server-virtual-users-mysql-postfixadmin-on-centos/ | |
# dependencies | |
yum update -y | |
yum --enablerepo=centosplus install postfix mailx mutt -y | |
yum install dovecot mysql-server dovecot-mysql cyrus-sasl cyrus-sasl-devel -y | |
# mysql configuration | |
chkconfig mysqld on |
This file contains 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 | |
# Author: MarcelFox | |
sudo killall firefox | |
sudo wget -O firefox.tar.bz2 "https://download.mozilla.org/?product=firefox-latest&os=linux64&lang=pt-BR" | |
if [ -d /usr/lib/firefox ]; | |
then | |
sudo rm -rf /usr/lib/firefox |
This file contains 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 | |
# DIGGER by Fox | |
# Usage: | |
# digger http://google.com | |
if [ $# -eq 0 ] | |
then | |
printf "Inform the domain: " | |
read var_domain |
This file contains 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 | |
# | |
# Name: dns_cpmail | |
# Version: 1.0 | |
# By MarcelFox | |
# | |
# HOW TO WORK WITH? | |
# As 'root' and in a cPanel server run: | |
# bash dns_cpmail.sh | |
# |
This file contains 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 | |
# | |
# Name: check_vpn | |
# Version: 1.0 | |
# By MarcelFox | |
# COLORS & STYLES: | |
BOLD='\e[1m' | |
ITALIC='\e[3m' | |
NO_STL='\e[0m' |
OlderNewer