This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"flag" | |
"fmt" | |
"math/rand" | |
"net" | |
"os" | |
"os/signal" | |
"runtime" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"flag" | |
"fmt" | |
"net" | |
"os" | |
"strings" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Usage: ./gvtcpdump | tcpdump -n -r - | |
*/ | |
#include <arpa/inet.h> | |
#include <errno.h> | |
#include <error.h> | |
#include <getopt.h> | |
#include <linux/filter.h> | |
#include <linux/if_ether.h> | |
#include <linux/if_packet.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import atexit | |
import os | |
import socket | |
import subprocess | |
import shlex | |
import time | |
import signal | |
tcpdump_bin = os.popen('which tcpdump').read().strip() | |
ss_bin = os.popen('which ss').read().strip() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define PFATAL(x...) \ | |
do { \ | |
fprintf(stderr, "[-] SYSTEM ERROR : " x); \ | |
fprintf(stderr, "\n\tLocation : %s(), %s:%u\n", __FUNCTION__, __FILE__, \ | |
__LINE__); \ | |
perror(" OS message "); \ | |
fprintf(stderr, "\n"); \ | |
exit(EXIT_FAILURE); \ | |
} while (0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
# Dependencies: | |
# apt install jq | |
if [ ]; then | |
GVFLAGS=--network=host | |
FILESZ=1G | |
else | |
FILESZ=16M |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
import os | |
import subprocess | |
import shlex | |
import time | |
import atexit | |
import signal | |
tcpdump_bin = os.popen('which tcpdump').read().strip() | |
def tcpdump_start(port): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
if [ ! -e './venv/bin/doitlive' ]; then | |
echo "Run ./venv/bin/pip3 install doitlive" | |
exit 1 | |
fi | |
if [ `id -u` != '0' ]; then | |
echo "[!] FATAL: run as root" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a.out invoked oom-killer: gfp_mask=0x2dc0(GFP_KERNEL|__GFP_NOWARN|__GFP_ZERO), order=0, oom_score_adj=0 | |
CPU: 0 PID: 131 Comm: a.out Not tainted 5.2.1+ #31 | |
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1 04/01/2014 | |
Call Trace: | |
dump_header.cold.35+0x11/0x985 | |
? ___ratelimit+0x1c6/0x400 | |
oom_kill_process+0x151/0x850 | |
? lockdep_sys_exit+0x50/0x50 | |
? _raw_spin_unlock+0x1f/0x30 | |
? oom_badness.part.26+0x3e1/0x510 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[SETSOCKOPT(SOL_ICMPV6, 1)]: {.bytes = 32} | |
[SETSOCKOPT(SOL_IP, IP_BIND_ADDRESS_NO_PORT)]: {.min = 0, .max = 1} | |
[SETSOCKOPT(SOL_IP, IP_CHECKSUM)]: {.min = 0, .max = 1} | |
[SETSOCKOPT(SOL_IP, IP_FREEBIND)]: {.min = 0, .max = 1} | |
[SETSOCKOPT(SOL_IP, IP_HDRINCL)]: {.min = 0, .max = 1} | |
[SETSOCKOPT(SOL_IP, IP_MINTTL)]: {.min = 0, .max = 255} | |
[SETSOCKOPT(SOL_IP, IP_MTU_DISCOVER)]: {.min = 0, .max = 6} | |
[SETSOCKOPT(SOL_IP, IP_MULTICAST_ALL)]: {.min = 0, .max = 1} | |
// [SETSOCKOPT(SOL_IP, IP_MULTICAST_IF)]: # not settable ?? | |
// [SETSOCKOPT(SOL_IP, IP_MULTICAST_IF)]: # only single value 0 |