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 | |
# Linux host info script | |
# Matthew Morcaldi 2015 | |
# DONUTS version 0.2.8 last update (9/18/2015) | |
# w00t be in r00t | |
# Config ------------------------------------------------ | |
outfile="${HOSTNAME}_linux_info.txt" | |
#-------------------------------------------------------- |
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
#!/usr/bin/env bash | |
# | |
# This bootstraps Puppet on Ubuntu or CentOS 6.x. | |
# | |
set -e | |
checkroot() { | |
if [ $UID -ne 0 ] ; then | |
echo "User has insufficient privilege." | |
exit 4 |
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
sudo grep @ mail.log | perl -p -e 's/ warning: header .*\[/header=<--removed-->,/g;s/from=<.+?@/from=<--removed-->@/g; s/to=<.+?@/to=<--removed-->@/g; s/<.+?com>/<--removed-->.com/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
ruby -e 'C=`stty size`.scan(/\d+/)[1].to_i;S=["2743".to_i(16)].pack("U*");a={};loop{a[rand(C)]=0;a.each{|x,o|;a[x]+=1;print "\ 🙈 🙉 🙊"};$stdout.flush;sleep 0.1}' |
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
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* | |
#Bashrc | |
if [ -f ~/.bashrc ]; then | |
. ~/.bashrc | |
fi |
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 | |
# FIRMWARE ver. | |
# w00t be in r00t | |
header() { | |
echo '' | |
echo -e "----------------------" | |
echo -e " [*] $title " | |
echo -e "----------------------" |
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
#stop services | |
#x27 is single quote character | |
#start services | |
xmit_hash_policy | |
xmit_hash_policy() { | |
if egrep '^BONDING_OPTS.*mode=802.3ad' /etc/sysconfig/network-scripts/ifcfg-bond0 > /dev/null | |
then | |
echo modifying bonding xmit_hash_policy | |
perl -pi.bak -e 's/^(BONDING_OPTS=.*802.3ad.*)("|\x27)$/$1 xmit_hash_policy=layer3+4$2/' /etc/sysconfig/network-scripts/ifcfg-bond0 |
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 | |
# Config ------------------------------------------------ | |
outfile="${HOSTNAME}_Net_io_config.txt" | |
#-------------------------------------------------------- | |
checkroot() { | |
if [ $UID -ne 0 ] ; then | |
echo "User has insufficient privilege." | |
exit 4 |
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 | |
# Config ------------------------------------------------ | |
outfile="${HOSTNAME}_audit.txt" | |
#-------------------------------------------------------- | |
checkroot() { | |
if [ $UID -ne 0 ] ; then | |
echo "User has insufficient privilege." | |
exit 4 |
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
while read -u 3 i; read -u 4 g; do | |
echo "$i" | |
echo "$g" | |
dns-add-record --zone=dr.wd5.wd --record="$i" --type=CNAME --record-value="$g" | |
done 3< list.csv 4< list2.csv |
OlderNewer