by xero updated 10.29.24
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 install beautifulsoup4 | |
# pip install requests | |
from bs4 import BeautifulSoup | |
import requests | |
def extract_meta(url): | |
r = requests.get(url) |
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
An example is | |
Code: | |
echo "\033[1;31m Hello \033[0m" | |
The '31' and the '1' are the things you change. The '31' is the color code, and the '1' is where you put whatever you want to color. The rest of it is the same for every color coding; the beginning starts coloring, and the stuff afterwards stops coloring ('0' switches it back to default text color). You can use the following color codes: | |
Code: | |
30 - black |
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
import requests | |
import sys | |
import json | |
def waybackurls(host, with_subs): | |
if with_subs: | |
url = 'http://web.archive.org/cdx/search/cdx?url=*.%s/*&output=json&fl=original&collapse=urlkey' % host | |
else: | |
url = 'http://web.archive.org/cdx/search/cdx?url=%s/*&output=json&fl=original&collapse=urlkey' % host |
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
import requests | |
import re | |
import sys | |
from multiprocessing.dummy import Pool | |
def robots(host): | |
r = requests.get( | |
'https://web.archive.org/cdx/search/cdx\ | |
?url=%s/robots.txt&output=json&fl=timestamp,original&filter=statuscode:200&collapse=digest' % host) |
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/sh | |
# Usage: | |
# wget -O- https://gist.githubusercontent.com/ifduyue/dea03b4e139c5758ca114770027cf65c/raw/install-proxychains-ng.sh | sudo bash -s | |
set -eu | |
version=4.14 | |
wget https://github.com/rofl0r/proxychains-ng/archive/v$version.tar.gz | |
tar xf v$version.tar.gz |
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
# Mandatory Files: copied from Centos7 ISO installer (minimal/full dvd) | |
# | |
# $ROOT/cdroot/.discinfo | |
# $ROOT/cdroot/LiveOS/squashfs.img | |
# $ROOT/cdroot/isolinux/boot.cat | |
# $ROOT/cdroot/isolinux/initrd.img | |
# $ROOT/cdroot/isolinux/isolinux.bin | |
# $ROOT/cdroot/isolinux/vmlinuz | |
# |
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/sh | |
# script downloads GeoIPCountryCSV.zip from geolite.maxmind.com | |
# extracts IP ranges into pfBlocker's country files (ie:/usr/local/pkg/pfblocker/US.txt) | |
# req unzip util, | |
# ie: pkg_add -r http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/ports/amd64/packages-8.3-release/Latest/unzip.tbz | |
# still needs method to convert ranges to CIDR | |
# define working dir | |
workdir='/usr/local/pkg' |
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
# compile iptables from source and install to /usr/local | |
mkdir -p /tmp/iptables | |
wget "http://www.netfilter.org/projects/iptables/files/iptables-1.4.21.tar.bz2" -qO- | tar --strip-components=1 -C /tmp/iptables -xvj | |
cd /tmp/iptables | |
./configure | |
make | |
make install | |
# set alternatives | |
sudo alternatives --install /sbin/iptables iptables.x86_64 /usr/local/sbin/iptables 100 \ |
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/python | |
# Modified by Travis Lee | |
# Last Updated: 4/21/14 | |
# Version 1.16 | |
# | |
# -changed output to display text only instead of hexdump and made it easier to read | |
# -added option to specify number of times to connect to server (to get more data) | |
# -added option to send STARTTLS command for use with SMTP/POP/IMAP/FTP/etc... | |
# -added option to specify an input file of multiple hosts, line delimited, with or without a port specified (host:port) |
NewerOlder