Skip to content

Instantly share code, notes, and snippets.

View foxx's full-sized avatar

Cal Leeming foxx

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

Overview

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.

Caveats

  • 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
drmpeg / gr-paint.md
Last active December 9, 2023 20:11
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

Setup

  • Use a newer version of Gqrx with Ref. level and dB range sliders.
  • Set the FFT size in Gqrx to 32768
@0x27
0x27 / misfortunecookie.py
Last active January 20, 2017 05:05
checks for misfortune cookie vuln
#!/usr/bin/python2
# 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
callumacrae / build-tools.md
Last active October 25, 2023 15:14
Build tools written in JavaScript
@janich
janich / exportMysqlUsers.php
Created July 31, 2013 13:02
Export MySQL users and permissions
<?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
dypsilon / frontendDevlopmentBookmarks.md
Last active March 27, 2024 06:36
A badass list of frontend development resources I collected over time.
@jessepeterson
jessepeterson / convert-emlx.py
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
else:
print 'Unknown file:', i
sys.exit(1)
emlx = open(i, 'r')
@klovadis
klovadis / gist:5170446
Created March 15, 2013 14:59
Two Lua scripts for Redis to turn HGETALL and HMGET into dictionary tables
-- gets all fields from a hash as a dictionary
local hgetall = function (key)
local bulk = redis.call('HGETALL', key)
local result = {}
local nextkey
for i, v in ipairs(bulk) do
if i % 2 == 1 then
nextkey = v
else
result[nextkey] = v
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active March 27, 2024 06:33
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.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@samuraisam
samuraisam / parse_accept.py
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:
# https://github.com/martinblech/mimerender