Skip to content

Instantly share code, notes, and snippets.

View kallsyms's full-sized avatar
:shipit:
‌‌

Nick Gregory kallsyms

:shipit:
‌‌
View GitHub Profile
@kallsyms
kallsyms / as7712-32x_setup.md
Created March 30, 2024 20:16
AS7712-32X Setup
@kallsyms
kallsyms / flyweight.cpp
Last active July 5, 2023 15:56
Simple C++ flyweight implementation
// Simple flyweight pattern implementation.
#include <memory>
#include <mutex>
#include <unordered_set>
template <typename T>
class FlyweightObj
{
// FlyweightObj takes two forms:
// 1) A raw pointer to the object, which is used for cheap lookups.
@kallsyms
kallsyms / syzkaller_drill.py
Created March 11, 2023 17:27
syzkaller_drill.py
from lxml import html
import argparse
import logging
import os
import re
import requests
import subprocess
import sys
import tempfile
@kallsyms
kallsyms / vita_extract.py
Created June 2, 2022 04:28
Strip headers from VITA-49 packets and dump the raw I/Q data contained within
import sys
import struct
import requests
# some details from https://github.com/RedhawkSDR/VITA49/blob/master/cpp/include/BasicVRTPacket.h
def parse_vita_float(radix, bits):
# https://github.com/RedhawkSDR/VITA49/blob/a7230bcbd3547733be669b7c745eb7d9b0e17d25/cpp/include/VRTMath.h#L471
div = float(1 << radix)
return float(bits) / div
table netdev filter_test {
chain ingress {
type filter hook ingress device lo priority 0;
ip daddr 127.1.2.3 dup to lo
}
}