Skip to content

Instantly share code, notes, and snippets.

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

Nicolas Hug KrustyHack

💭
┬─┬ ノ( ゜-゜ノ)
View GitHub Profile
  1. To monitor HTTP traffic including request and response headers and message body:

tcpdump -A -s 0 'tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)'

  1. To monitor HTTP traffic including request and response headers and message body from a particular source:

tcpdump -A -s 0 'src example.com and tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)'

  1. To monitor HTTP traffic including request and response headers and message body from local host to local host:
@KrustyHack
KrustyHack / misc.sh
Last active June 10, 2020 11:31
Squid Proxy Linux
mkdir -p /var/cache/squid3
chown -R proxy:proxy /var/cache/squid3
systemctl restart squid.service
@KrustyHack
KrustyHack / aws-lambda-unzipper.py
Created May 6, 2020 19:46 — forked from msharp/aws-lambda-unzipper.py
unzip archive from S3 on AWS Lambda
import os
import sys
import re
import boto3
import zipfile
def parse_s3_uri(url):
match = re.search('^s3://([^/]+)/(.+)', url)
if match:
return match.group(1), match.group(2)
@KrustyHack
KrustyHack / gist:de8706d3874f7224de6e41e4efff5c35
Created March 23, 2020 17:29
Amplify Angular Rewrites Rule
</^[^.]+$|\.(?!(css|gif|ico|jpg|js|png|txt|svg|woff|ttf|map|json)$)([^.]+$)/> to /index.html with rewrite 200
@KrustyHack
KrustyHack / .htaccess
Created March 14, 2020 10:13
Simple Wordpress .htaccess
# BEGIN WordPress
# Les directives (lignes) entre 'BEGIN WordPress' et 'END WordPress' sont
# généré dynamiquement, et ne doivent uniquement être modifiées via les filtres WordPress.
# Toute modification des directives entre ces marqueurs sera outrepassée.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
@KrustyHack
KrustyHack / get-latest-terraform.sh
Last active January 21, 2020 10:44 — forked from josh-padnick/get-latest-terraform.sh
Get latest Terraform release Linux amd64
#!/bin/bash
#
# Download latest Terraform release and install it in ~/.bin/
#
TMP_DIR=/tmp/terraform
BIN_DIR=~/.bin
LATEST_RELEASE=$(curl -Ss https://api.github.com/repos/hashicorp/terraform/releases/latest | jq --raw-output '.tag_name' | cut -c 2-)
@KrustyHack
KrustyHack / crisco_words_fr.txt
Created March 27, 2019 22:15
Crisco Words FR
à
à armes courtoises
à aucun prix
à bas prix
à base de
à bâtons rompus
à bientôt
à bloc
à bon compte
à bon droit
@KrustyHack
KrustyHack / RGPD mail
Created March 14, 2019 14:12
RGPD mail
Bonjour,
En vertu de la loi RGPD, pourriez-vous m’informer de la manière par laquelle vous avez obtenu mes coordonnées et effacer toutes données me concernant de vos différentes bases de données. Si vous les avez acquises, merci de me donner les coordonnées de votre fournisseur.
Bien à vous,
7 Days to Die
A Hat in Time
Aaero
Acceleration of SUGURI 2
AER Memories of Old
American Truck Simulator
Aviary Attorney
Battle Chef Brigade
Bear With Me - Collector's Edition
Black the Fall
@KrustyHack
KrustyHack / pve-autosnap
Created November 19, 2018 12:52
PVE Autosnap
wget https://github.com/EnterpriseVE/eve4pve-autosnap/releases/download/0.1.8/eve4pve-autosnap_0.1.8_all.deb && \
dpkg -i eve4pve-autosnap_0.1.8_all.deb && \
eve4pve-autosnap create --vmid=all --label=weekly --keep=3