View ex-members.py
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
#!/usr/bin/env python3 | |
""" | |
ASN to AS-SET mapping: | |
AS4200000011 -> AS-A1 | |
AS4200000021 -> AS-B1 | |
AS4200000022 -> AS-B2 | |
AS4200000023 -> AS-B3 | |
AS4200000031 -> AS-C1 | |
AS4200000032 -> AS-C2 |
View http_upload.py
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
#/usr/bin/python | |
# | |
# HTTP server with a HTML form that allows to upload files to the server. | |
# Files are stored in a folder named "files" inside the current directory. | |
from os import curdir | |
from os.path import join as pjoin | |
from http.server import BaseHTTPRequestHandler, HTTPServer |
View memcpy_aligned.c
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
#include <inttypes.h> // uint*_t | |
#include <stdio.h> // perror(), printf() | |
#include <stdlib.h> // memcpy, posix_memalign() | |
#include <string.h> // malloc() | |
#include <time.h> // clock_t, CLOCKS_PER_SEC | |
#include <unistd.h> // getpagesize() | |
static inline void memcpy_aligned(void *to, const void *from, size_t len) { | |
if (len <= 64) { | |
memcpy(to, from, 64); |
View BBC Pings
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
# Linux 3.2 (DON'T ASK!) v4 | |
$ping -M do -c 5 -s 69 151.101.192.81 | |
PING 151.101.192.81 (151.101.192.81) 69(97) bytes of data. | |
77 bytes from 151.101.192.81: icmp_req=1 ttl=60 time=0.286 ms | |
77 bytes from 151.101.192.81: icmp_req=2 ttl=60 time=0.320 ms | |
77 bytes from 151.101.192.81: icmp_req=3 ttl=60 time=0.265 ms | |
77 bytes from 151.101.192.81: icmp_req=4 ttl=60 time=0.269 ms | |
77 bytes from 151.101.192.81: icmp_req=5 ttl=60 time=0.286 ms |
View Google Pings
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
# Linux 3.2 (DON'T ASK!) v4 | |
$ping -M do -c 5 -s 1472 8.8.8.8 | |
PING 8.8.8.8 (8.8.8.8) 1472(1500) bytes of data. | |
76 bytes from 8.8.8.8: icmp_req=1 ttl=121 (truncated) | |
76 bytes from 8.8.8.8: icmp_req=2 ttl=121 (truncated) | |
76 bytes from 8.8.8.8: icmp_req=3 ttl=121 (truncated) | |
76 bytes from 8.8.8.8: icmp_req=4 ttl=121 (truncated) | |
76 bytes from 8.8.8.8: icmp_req=5 ttl=121 (truncated) |
View jinja2_render.py
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
#!/usr/bin/env python3 | |
# pip3 install jinja2 | |
from jinja2 import Environment, FileSystemLoader | |
import sys | |
file_loader = FileSystemLoader('.') | |
env = Environment(loader=file_loader) | |
template = env.get_template(sys.argv[1]) | |
print(template.render()) |
View af_packet_systap
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
// Not all functions are referenced below are called, that is intentional to verify that they are not being called. | |
// Provide timestamps: | |
function print_ts() { | |
ts = gettimeofday_us(); | |
printf("[%10d.%06d] ", ts/1000000, ts%1000000); | |
} |
View snmpv3walk.sh
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
snmpwalk -v 3 -n "" -u $USER -a MD5 -A "$PASS" -x AES -X "$KEY" -l authPriv $HOST .iso |
View curl.sh
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
curl -H "Authorization: Token XXXXXXX" -H "Accept: application/json; indent=4" -k https://myapp.net/api/get/object/1 |
View generate_macs.py
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
#!/usr/bin/python3 | |
# sudo -H pip3 install scapy | |
import copy | |
from scapy.all import * | |
import time | |
NewerOlder