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
一般查找域名对应的IP,可以用这个命令 nslookup <域名>,但这样找,返回的ip比较少,今天看到一条命令,可以批量查找Google当前的IP范围。 | |
命令及返回的结果如下: | |
# nslookup -q=TXT _netblocks.google.com 8.8.8.8 | |
Server: 8.8.8.8 | |
Address: 8.8.8.8#53 | |
Non-authoritative answer: | |
_netblocks.google.com text = "v=spf1 ip4:64.18.0.0/20 ip4:64.233.160.0/19 ip4:66.102.0.0/20 ip4:66.249.80.0/20 ip4:72.14.192.0/18 ip4:74.125.0.0/16 ip4:108.177.8.0/21 ip4:173.194.0.0/16 ip4:207.126.144.0/20 ip4:209.85.128.0/17 ip4:216.58.192.0/19 ip4:216.239.32.0/19 ~all" |
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
#include <execinfo.h> // for backtrace | |
#include <dlfcn.h> // for dladdr | |
#include <cxxabi.h> // for __cxa_demangle | |
#include <cstdio> | |
#include <cstdlib> | |
#include <string> | |
#include <sstream> | |
// This function produces a stack backtrace with demangled function & method names. |
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/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 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 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
# | |
# The following script will | |
# - Create Linux bridge $BR_WAN, $BR_LAN | |
# - Install IP addresses and basic routes | |
# - Enable proxy_arp on $BR_WAN | |
# - Enable ip_forward | |
# - Enable MASQUERADE on $IF_INET | |
# - $BR_LAN, $BR_WAN has to be allowed in ~/.usr/etc/qemu/bridge.conf | |
# |
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 | |
set -e | |
DEFAULT_PACKAGES=ssh,language-pack-en-base | |
DEFAULT_COMPONENTS=main,universe | |
DEBOOTSTRAP=/usr/sbin/debootstrap | |
DEFAULT_MIRROR=http://archive.ubuntu.com/ubuntu | |
DEFAULT_VARIANT=minbase | |
MIRROR=${STRAP_MIRROR:-$DEFAULT_MIRROR} | |
ROOTFS=$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
pip uninstall -y rtslib-fb==2.1.49 | |
sudo apt-get remove -y lio-utils | |
sudo apt-get install -y python-prettytable python-ipaddr python-netifaces python-configobj python-pyparsing python-epydoc texlive-latex-base texlive-latex-extra texlive-latex-recommended lmodern texlive-fonts-recommended python-urwid | |
rm -rf rtslib | |
git clone https://github.com/Datera/rtslib | |
cd rtslib; make deb; sudo apt-get -y remove rtslib ; dpkg -i dist/*.deb; cd .. | |
rm -rf configshell | |
git clone https://github.com/Datera/configshell |
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
#~/.mutt/aliases | |
alias nick Nicholas Levandoski <[email protected]> | |
alias tim Timothy Pitt <[email protected]> | |
alias steven Steven Jackson <[email protected]> | |
alias kaleb Kaleb Hornsby <[email protected]> | |
alias alug-admin nick, tim, steven |
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
resolver 8.8.8.8; | |
location /video/ { | |
if ($request_uri ~ "^/video/(.+?)/.+") { | |
set $upstream_host $1.googlevideo.com; | |
add_header Content-Disposition "attachment; filename=video.mp4;"; | |
} | |
rewrite /video/.+?/(.+)$ /$1 break; | |
proxy_buffering off; | |
proxy_pass https://$upstream_host; | |
proxy_set_header Host $upstream_host; |