Skip to content

Instantly share code, notes, and snippets.

View mzpqnxow's full-sized avatar

AG mzpqnxow

View GitHub Profile
mzpqnxow /
Created June 12, 2023 11:37 — forked from p-sherratt/
Produce a "CIDR report" from Netbox
#!/usr/bin/env python3
# quick hacky script to produce a "CIDR report" of your global address space from Netbox
# this is released to the public domain, free of copyright and licensing.
# by Paul Sherratt
import urllib3
# This could use some cleanup and robustness changes, but it works for me. Modifications are welcome!
# How to setup a Ubiquiti EdgeRouter POE for FreeRADIUS
# Based on
# SSH into your router
mzpqnxow /
Last active December 8, 2022 17:20
Building lightweight (somewhat statically linked) smbclient executable
# This won't build a *complete* statically linked smbclient exe, but it will do better ... :/
$ ./configure --without-winbind --without-ldap --without-ads --disable-cups --without-quotas --disable-avahi --without-syslog --without-pam --disable-pthreadpool --without-acl-support --without-automount --without-pie --nopyc --nopyo --hostcc=musl-gcc --disable-python --without-ad-dc --disable-fault-handling --without-libunwind --disable-iprint --without-gettext --disable-python --without-json --with-iconv --without-libarchive --with-static-modules=ALL --without-systemd --disable-cephfs --disable-glusterfs --without-ads --without-winbind --without-ldap --disable-cups --disable-iprint --without-pam --disable-avahi --disable-tdb-mutex-locking --without-gpgme --hostcc=musl-gcc CC=musl-gcc LDFLAGS=-static
mzpqnxow / kernel-5.10.patch
Created October 23, 2022 23:27 — forked from kyujin-cho/kernel-5.10.patch
MLNX_OFED 4.9- on Debian 11
View kernel-5.10.patch
diff -Naur /home/kyujin/mlnx-ofed-patch/mlnx-ofed-kernel-4.9-orig/include/linux/sched/mm.h include/linux/sched/mm.h
--- a/include/linux/sched/mm.h 2021-12-08 23:08:07.000000000 +0900
+++ b/include/linux/sched/mm.h 2022-08-05 17:28:35.539301521 +0900
@@ -35,18 +35,18 @@
* This has to be called after a get_task_mm()/mmget_not_zero()
- * followed by taking the mmap_sem for writing before modifying the
+ * followed by taking the mmap_lock for writing before modifying the
* vmas or anything the coredump pretends not to change from under it.
mzpqnxow /
Created October 21, 2022 17:00 — forked from adejones/
Python class and utility for file rotation. Configurable daily, weekly and monthly retention; can use hard links to save space; supports `argparse` config files.
#!/usr/bin/env python3
# vim: ft=python ts=4 sw=4 expandtab
# Copyright (c) 2013 Reed Kraft-Murphy <>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
mzpqnxow /
Created August 1, 2022 14:14 — forked from korniltsev/
C/C++ header to IDA


In IDAPython,

parse_file('<path>/a.cpp',[r'-I<path>\LuaJIT-2.0.5\src', '-D__NT__', '-D__X64__', '-D__EA64__'])
mzpqnxow /
Last active June 3, 2022 22:25
Diff between decompiled class files for xwork-1.0.3-atlassian-7 and xwork-1.0.3-atlassian-10 (CVE-2022-26134)
// For context, the full "old" version of the class
// Taken from a decompiled xwork-1.0.3-atlassian-7-m08.jar
// - AG
package com.opensymphony.xwork;
import com.opensymphony.xwork.util.OgnlValueStack;
import com.opensymphony.xwork.util.TextParseUtil;
import java.util.HashMap;
import java.util.HashSet;
View bind_interface.patch
diff --git i/conn.go w/conn.go
index ef701c8..f8cfb29 100644
--- i/conn.go
+++ w/conn.go
@@ -5,7 +5,9 @@ import (
+ "os"
mzpqnxow / networkmap1.png
Created April 30, 2022 15:07 — forked from adrianmihalko/networkmap1.png
wireguard edgerouter mullvad config
View networkmap1.png
set interfaces wireguard wg0 address
set interfaces wireguard wg0 listen-port 51820
set interfaces wireguard wg0 route-allowed-ips false
set interfaces wireguard wg0 peer JuE+ endpoint mullvadserverip:51820
set interfaces wireguard wg0 peer JuE+ allowed-ips
mzpqnxow / sources.list
Last active April 30, 2022 13:11
EdgeRouter 1.x firmware APT source configurations (4/2022)
View sources.list
# APT Configuration for EdgeRouter/EdgeOS 2.x
# Vanilla APT configuration can be problematic since VyattaOS is a fork
# of Debian with enhancements, but is not aggressively kept up to date
# with Debian releases. Not all mirrors have "old" packages and not all
# mirrors have all architectures (e.g. very few have older MIPS architecture
# platforms
# - AG