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
/* Copyright (C) 2012-2015 P.D. Buchan ([email protected]) | |
This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 3 of the License, or | |
(at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
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/usr/env python2 | |
from scapy.all import * | |
from argparse import ArgumentParser | |
from sys import argv | |
from time import time | |
# shut up scapy | |
conf.verb=0 |
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
asn() { | |
if [ -z "$1" ] | |
then | |
echo "usage: asn url" 1>&2 | |
return 1 | |
fi | |
ips=$(dig $DIG_ARGS +short $1) | |
if [ -z "$ips" ] | |
then |
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 | |
############################################################################################################ | |
# ---------------------------------------------------------------------- | |
# ASN/IPv4/Prefix lookup tool. Uses Team Cymru's whois service for data. | |
# ---------------------------------------------------------------------- | |
# example usage: | |
# asn <ASnumber> -- to lookup matching ASN data. Supports "as123" and "123" formats (case insensitive) | |
# asn <IP.AD.DR.ESS> -- to lookup matching route and ASN data | |
# asn <ROUTE> -- to lookup matching ASN data |
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 | |
#vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: | |
# | |
# Author : Nicolas Brousse <[email protected]> | |
# From : https://www.shell-tips.com/2010/09/13/linux-sysctl-configuration-and-tuning-script/ | |
# | |
# Added kernel version < 2.6.33 set net.ipv4.tcp_congestion_control=htcp | |
# Notes : | |
# This script is a simple "helper" to configure your sysctl.conf on linux | |
# There is no silver bullet. Don't expect the perfect setup, review comments |
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
seq 10 | xargs -l -I{} dig +short -t TXT @ns1.google.com _cloud-netblocks{}.googleusercontent.com | tr ' ' '\n' | grep -F ip4 | cut -d ':' -f 2 | sort -V > cloud-netblocks.cidr |
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 | |
export _SSH_COMPLETE_F_CACHE="/tmp/_ssh_complete" | |
export _SSH_COMPLETE_HOSTS="" | |
[[ ! -f "$_SSH_COMPLETE_F_CACHE" ]] && touch "$_SSH_COMPLETE_F_CACHE" | |
_ssh_complete() { | |
if [ -z "$_SSH_COMPLETE_HOSTS" ]; then |
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 -o nounset | |
set -o errexit | |
set -o pipefail | |
set -x | |
INSTANCE_NAME=$1 | |
shift |
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
DOCTL | |
Installation | |
Option 1 – Download a Release from GitHub | |
Visit the Releases page for the doctl GitHub project. | |
https://github.com/digitalocean/doctl/releases | |
tar xf ~/doctl-1.4.0-linux-amd64.tar.gz | |
sudo mv ~/doctl /usr/local/bin | |
Configure |
OlderNewer