Skip to content

Instantly share code, notes, and snippets.

View KrustyHack's full-sized avatar
💭
┬─┬ ノ( ゜-゜ノ)

Nicolas Hug KrustyHack

💭
┬─┬ ノ( ゜-゜ノ)
View GitHub Profile
@KrustyHack
KrustyHack / docker-install-full.sh
Created April 14, 2015 07:51
Install docker and docker-compose
#!/bin/sh
curl http://get.docker.com |sh
curl -L https://github.com/docker/compose/releases/download/1.1.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
@KrustyHack
KrustyHack / web_scraping_emails_website.sh
Last active March 5, 2024 10:26
Scrape a website with wget and get uniques emails from it or scrap websites whois to get email
#!/bin/bash
DOMAINS=$1
TMP_DIR=$2
if [[ "$DOMAINS" == "" || "$TMP_DIR" == "" ]] ; then
echo -e "Usage : script.sh DOMAINS.txt (with one domain per line) TMP_DIR"
echo -e "Example : ./script.sh mydomains.txt /tmp"
exit 1
fi
http_port 3128
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320
acl localnet src 10.0.0.0/8 # RFC 1918 possible internal network
acl localnet src 172.16.0.0/12 # RFC 1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC 1918 possible internal network
#!/bin/bash
echo "options dummy numdummies=2" > /etc/modprobe.d/dummy.conf
modprobe dummy
@KrustyHack
KrustyHack / whois_scrap_email.sh
Last active June 30, 2016 15:58
whois_scrap_email
#!/bin/bash
DOMAINS=$1
OUTPUT=$2
if [ "$DOMAINS" == "" ]; then
echo "Usage : script.sh DOMAINS.txt (with one domain per line) OUTPUT.txt"
exit 1
fi
@KrustyHack
KrustyHack / README.md
Created October 11, 2016 12:41 — forked from warmfusion/README.md
Cloud Init script for building a coreos cluster at home on XenServer using Cloud-Init and ETCD2

This Cloud-init script can be used to bootstrap a Xen based CoreOS server through Xen orchestra.

Features;

  1. Workaround for the lack of /etc/environment on 'unsupported' hypervisors
  2. Static IP allocation to deal with dhcp causing problems (On my network at least)
  3. etcd2 bootstrap discovery using public service and discovery tokens
    1. Manual reconfiguration to allow for membership changes after cluster is operational

Usage

#!/bin/bash
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
cat <<EOF > /etc/apt/sources.list.d/kubernetes.list
deb http://apt.kubernetes.io/ kubernetes-xenial main
EOF
apt-get update && apt-get upgrade -y && apt-get install -y apt-transport-https docker.io kubelet kubeadm kubectl kubernetes-cni
@KrustyHack
KrustyHack / NOTES.md
Created November 10, 2016 16:36 — forked from DenisIzmaylov/NOTES.md
Step By Step Guide to Configure a CoreOS Cluster From Scratch

Step By Step Guide to Configure a CoreOS Cluster From Scratch

This guide describes how to bootstrap new Production Core OS Cluster as High Availability Service in a 15 minutes with using etcd2, Fleet, Flannel, Confd, Nginx Balancer and Docker.

Content

@KrustyHack
KrustyHack / docker-squid.oneline.sh
Created December 10, 2016 13:52
Launch a Squid Proxy with Docker
wget -O - https://get.docker.io |sh && mkdir -p /home/docker/squid && wget -O /home/docker/squid/squid.conf https://gist.githubusercontent.com/KrustyHack/ae522e499ebede96effc39ab50ae40ee/raw/1262ff96528df31dd6a60808796a189e3f1249fe/squid-3.3.default.conf && docker run --name squid -d --restart=always --publish 3128:3128 --volume /home/docker/squid/squid.conf:/etc/squid3/squid.conf --volume /home/docker/squid/cache:/var/spool/squid3 sameersbn/squid:latest
@KrustyHack
KrustyHack / tor-proxies.sh
Created February 9, 2017 21:36
Tor rotating proxies
#!/bin/bash
curl -L https://get.docker.io |sudo sh
sudo docker run -d -p 5566:5566 -p 127.0.0.1:4444:4444 --env tors=25 mattes/rotating-proxy