Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
ns_setup()
{
ip netns add ns1
for i in $(seq 1 5); do
ip -n ns1 link add name out$i up type dummy
ip -n ns1 addr add 203.0.113.$((i*2))/31 dev out$i
done
@idosch
idosch / gist:3d524b887e16bc11b4b19e25c23dcc23
Created August 11, 2019 07:28
dropwatch and tshark example
dropwatch> set alertmode packet
Setting alert mode
Alert mode successfully set
dropwatch>
dropwatch> set trunc 64
Setting truncation length to 64
Truncation length successfully set
dropwatch>
dropwatch> show
Getting existing configuration
@idosch
idosch / gist:166b64384577174230fd2523866f6b1c
Created August 7, 2019 10:24
dropwatch and tshark example
dropwatch> set alertmode packet
Setting alert mode
Alert mode successfully set
dropwatch>
dropwatch> set trunc 64
Setting truncation length to 64
Truncation length successfully set
dropwatch>
dropwatch> show
Getting existing configuration
@idosch
idosch / gist:7391b77da0b16182406189561fdfa1ef
Created July 22, 2019 18:01
dropwatch and tshark example
dropwatch> set alertmode packet
Setting alert mode
Alert mode successfully set
dropwatch>
dropwatch> set trunc 64
Setting truncation length to 64
Truncation length successfully set
dropwatch>
dropwatch> show
Getting existing configuration
import argparse
def main():
parser = argparse.ArgumentParser()
parser.add_argument("asm", help="assembly code file", type=str)
parser.add_argument("output_asm", help="assembly output file", type=str)
parser.add_argument("offset", help="aslr offset (e.g. 0xffff)", type=str)
args = parser.parse_args()