Skip to content

Instantly share code, notes, and snippets.

@agleyzer
Created September 18, 2013 21:48
Show Gist options
  • Save agleyzer/6616242 to your computer and use it in GitHub Desktop.
Save agleyzer/6616242 to your computer and use it in GitHub Desktop.
a script to log http connections...
#!/bin/bash
ts=$(date +%Y%m%d-%H%M%S)
tcpdump -A -s 1492 -l \
'host blahblah and tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)' \
| grep HTTP -C 10 > httpdump-${ts}.log 2>&1 &
disown %1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment