Skip to content

Instantly share code, notes, and snippets.

View foxx's full-sized avatar

Cal Leeming foxx

View GitHub Profile
AndrewMarumoto /
Last active February 20, 2023 18:44
Adding new python hooks to Battlefield 2142


This is a proof of concept for hooking events that are normally inaccessible from python. It assumes you've set up an unrestricted python interpreter for 2142 and installed ctypes. The hooking is done dynamically through python, rather than by statically modifying the executable.


  • The code here is for 64 bit systems, it will not work as is on 32 bit
  • The offsets may be different depending on which 2142 patch you're working with
  • If you want to add new events, you'll need to reverse engineer the relevant parts of the server to find the offsets
  • You'll also need to be able to write assembly

Example: hooking comm rose events

drmpeg /
Last active April 26, 2022 14:33
How to create high quality gr-paint images.

High Quality Spectrum Painting

A quick tutorial on how to get high quality images from gr-paint and Gqrx.

Spectrum Example


  • Use a newer version of Gqrx with Ref. level and dB range sliders.
  • Set the FFT size in Gqrx to 32768
0x27 /
Last active January 20, 2017 05:05
checks for misfortune cookie vuln
# coding: utf-8
# misfortune cookie probe
# ~ skyhighatrist
import requests
import sys
def check(ip):
print "{+} Probing %s for the Misfortune Cookie Vuln..." %(ip)
url = "http://%s:7547/lol" %(ip) # /lol will never exist so it makes a good canary
callumacrae /
Last active March 20, 2023 14:24
Build tools written in JavaScript
janich / exportMysqlUsers.php
Created July 31, 2013 13:02
Export MySQL users and permissions
View exportMysqlUsers.php
* Export MySQL users and permissions
* This script exports raw CREATE USER and GRANT queries of a given database
* to help migrate MySQL users and permissions to a new server.
* Users will keep their passwords across the migration.
* Warning: The import queries expects exactly the same database structure!
dypsilon /
Last active September 28, 2023 18:58
A badass list of frontend development resources I collected over time.
jessepeterson /
Last active December 15, 2015 01:29
Convert an Apple emlx file to a .eml file (removing the Apple-proprietary parts; leaving a raw message file)
import sys
for i in sys.argv[1:]:
if i.lower().endswith('emlx'):
print 'Processing:', i
print 'Unknown file:', i
emlx = open(i, 'r')
klovadis / gist:5170446
Created March 15, 2013 14:59
Two Lua scripts for Redis to turn HGETALL and HMGET into dictionary tables
View gist:5170446
-- gets all fields from a hash as a dictionary
local hgetall = function (key)
local bulk ='HGETALL', key)
local result = {}
local nextkey
for i, v in ipairs(bulk) do
if i % 2 == 1 then
nextkey = v
result[nextkey] = v
brandonb927 /
Last active September 26, 2023 21:46
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see
# Alot of these configs have been taken from the various places
# on the web, most from here
samuraisam /
Created May 16, 2012 21:43
Parse an accept header in Python w/ support for vendor types
# The author disclaims copyright to this source code. In place of a legal
# notice, here is a blessing:
# May you do good and not evil.
# May you find forgiveness for yourself and forgive others.
# May you share freely, never taking more than you give.
# It is based on a snipped found in this project: