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/awk -f | |
| # # | |
| # | |
| # Inspired by http://www.percona.com/doc/percona-toolkit/2.1/pt-tcp-model.html | |
| # | |
| # Example usage: | |
| # $ tcpdump -i any -s 0 -nnq -tt 'tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)' | |
| # 1349692787.492311 IP X.X.X.X.XXXX > X.X.X.X.XXXX: tcp 1448 | |
| # $ ./requestor.awk dump.file |
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 username in a b c;do | |
| useradd -d /home/${username} -m ${username} -s /bin/bash | |
| pass=`echo $username | rev` | |
| echo -e "$pass\n$pass" | passwd ${username} | |
| echo "${username} ALL = (root) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/${username} | |
| sudo chmod 0440 /etc/sudoers.d/${username} | |
| 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
| fio --bs=4k --ioengine=libaio --iodepth=128 --size=1g --direct=1 \ | |
| --runtime=60 --filename=/tmp/file --name=rand-write --rw=randwrite |
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
| brew update | |
| brew upgrade openssl | |
| brew link openssl --force | |
| brew install --with-openssl curl | |
| brew link curl --force |
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
| cd /opt | |
| wget https://github.com/jgmdev/ddos-deflate/archive/master.zip | |
| unzip master.zip | |
| rm master.zip | |
| cd ddos-deflate-master | |
| ./install.sh | |
| echo '# Paths of the script and other files | |
| PROGDIR="/usr/local/ddos" |
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
| UsePAM yes | |
| PasswordAuthentication yes | |
| GatewayPorts=yes |
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
| tunip=`proxychains4 ssh [email protected] "ip addr show" | grep inet | grep tun0 | awk '{print $2}' | awk -F/ '{print $1}'`; ;ssh root@$tunip |
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
| debootstrap --arch=amd64 xenial ubuntu http://cn.archive.ubuntu.com/ubuntu/ | |
| systemd-nspawn -bD ubuntu --bind /root:/root --bind /home:/home |
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
| config rule | |
| option src 'wan' | |
| option target 'ACCEPT' | |
| option proto 'tcp' | |
| option dest_port '22' | |
| config 'rule' | |
| option 'target' 'ACCEPT' | |
| option 'src' 'wan' | |
| option 'proto' 'tcp' |
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
| wget http://www.inet.no/dante/files/dante-1.4.1.tar.gz | |
| tar xvfz dante-1.4.1.tar.gz | |
| cd dante-1.4.1 | |
| ./configure \ | |
| --prefix=/usr \ | |
| --sysconfdir=/etc \ | |
| --localstatedir=/var \ | |
| --disable-client \ | |
| --without-libwrap \ | |
| --without-bsdauth \ |