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 i in 1 2; do X=$Y; sleep 1; Y=$(/sbin/ifconfig eth0|grep RX\ bytes|awk '{ print $2 }'|cut -d : -f 2); echo "$(( Y-X ))"; done | tail -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 | |
# Directory to store log files in | |
DST=/root/logs | |
# Any logs older than this will be deleted first | |
KEEPDAYS=5 | |
# Create DST if it doesn't exist |
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/perl | |
use warnings; | |
use strict; | |
use Getopt::Long; | |
use Data::Dumper; | |
my $file = ''; | |
my $csv = 0; | |
my $all = 0; | |
GetOptions( |
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/sh | |
if [ $# -lt 1 ]; then | |
echo "No arguments supplied" | |
echo "usage: sh $0 <username>" | |
exit 1 | |
fi | |
if [ ! -d /home/$1 ]; then | |
echo "User doesn't exist" | |
echo "usage: sh $0 <username>" |
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 | |
if [ -z "$1" ]; then | |
LIST=/tmp/symlink-list.txt | |
echo "Looking for links..." | |
nice -n 19 ionice -c3 find /home -type l -exec ls -ld {} \; > $LIST | |
else | |
LIST=$1 | |
fi | |
NFOWNERS="" | |
NFCNT=0 |
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/sh | |
# Directory to store log files in | |
DST=/root/logs | |
# Any logs older than this will be deleted first | |
KEEPDAYS=14 | |
# Create DST if it doesn't exist | |
if [ ! -d "$DST" ]; then |
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 | |
# Directory to store log files in | |
DST=/root/logs | |
# Any logs older than this will be deleted first | |
KEEPDAYS=5 | |
# Create DST if it doesn't exist | |
if [ ! -d "$DST" ]; then |
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 | |
BFDOMS=/root/.bf-doms | |
BFIPS=/root/.bf-ips | |
FINAL=/root/.bf-blacklist | |
DATE=$(date +%d/%b/%Y) | |
echo -n "Capturing for 30s.." | |
for S in {1..30}; do | |
service httpd fullstatus | grep POST | grep login | awk '{print $1}' >> $BFDOMS | |
sleep 1 | |
echo -n "." |
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/perl | |
my $user; | |
for $user (`ls /var/cpanel/users/`) { | |
chomp($user); | |
my @userinfo = getpwnam($user); | |
my $homedir = $userinfo[7]; | |
my $uid = $userinfo[2]; |
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/sh | |
# Directory to store log files in | |
DST=/root/logs | |
# Any logs older than this will be deleted first | |
KEEPDAYS=14 | |
# Create DST if it doesn't exist | |
if [ ! -d "$DST" ]; then |