Skip to content

Instantly share code, notes, and snippets.

View averonesis's full-sized avatar
💭
bloody moody

averonesis

💭
bloody moody
View GitHub Profile
@averonesis
averonesis / gist:6b632b24433861c78f27d7ce37ec1fff
Created December 11, 2017 08:05 — forked from bahayman/gist:9369651
tcpdump http monitor
Use TCPDUMP to Monitor HTTP Traffic
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)'
2. 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)'
3. To monitor HTTP traffic including request and response headers and message body from local host to local host:
@averonesis
averonesis / xip-io.py
Created January 20, 2021 19:29 — forked from bmanojlovic/xip-io.py
Generate base36 encoded host names (xip.io)
#!/usr/bin/python3
import ipaddress
import sys
# SO one :)
def base36encode(number):
"""