Skip to content

Instantly share code, notes, and snippets.

View PythEch's full-sized avatar

PythEch

  • Amsterdam
View GitHub Profile
@DavidGoldman
DavidGoldman / LateLoading.xm
Created August 20, 2015 17:45
Hook late loaded classes without dlopen'ing anything
#import <objc/runtime.h>
#include <dlfcn.h>
#include <mach-o/dyld.h>
%group NormalHooks
// Regular hooks in here.
%end
require 'rubygems'
require 'openssl'
require 'digest/md5'
key = OpenSSL::PKey::RSA.new(2048)
cipher = OpenSSL::Cipher::AES.new(256, :CBC)
ctx = OpenSSL::SSL::SSLContext.new
puts "Spoof must be in DER format and saved as root.cer"
raw = File.read "root.cer"
cert = OpenSSL::X509::Certificate.new raw
cert.version = 2
@NinjaLikesCheez
NinjaLikesCheez / PuffGrab.py
Created March 3, 2014 14:41
PuffGrab - a nice way to grab 'secure' puffs from PuffChat.
import urllib2
import json
import urllib
import os
import errno
key = "dl81Vh2uorfNdj2Rt2M4EylW91uUsQRZwhQ99g7K0MRXeMYePS"
baseURL = "http://www.puffchat.me/chatAPI/requestAPI.php"
uploadURL = "http://www.puffchat.me/upload/"
@0xabad1dea
0xabad1dea / weird-machines-video-games.md
Last active December 28, 2021 17:38
Weird Machines in Video Games

Abadidea's Index of Weird Machines in Video Games

A "weird machine" is when user-supplied input is able to create an arbitrary new program running within an existing program due to Turing-completeness being exposed. Sometimes such functionality was deliberately included but it is often the result of exploitation of memory corruption. You can learn more at the langsec site. There is a good argument for weird machines being inherently dangerous, but this index is just for fun.

It is broken into two categories: intentional gameplay features which may be used as weird machines, and exploit-based machines which can be triggered by ordinary player input (tool-assisted for speed and precision is acceptable). Games with the sole purpose of programming (such as Core Wars) are not eligible and plugin APIs don't count. If you know of more, feel free to add a comment to this gist.

Intentional Gameplay Mechanics

@luca-m
luca-m / py-notes
Last active September 5, 2022 18:15
# >>> ACCESS TO ALL CLASSES ---------------------------------------------------
().__class__.__bases__[0].__subclasses__()
# >>> INSTIANTIATE NEW OBJECTS ------------------------------------------------
[].__class__.__class__.__new__( <TYPE> , <SUBTYPE> )
[c for c in ().__class__.__base__.__subclasses__() if c.__name__ == '<CLASSNAME>'][0]()
@urielka
urielka / ipin.py
Created September 3, 2012 12:37
iOS PNG uncrushers based on http://www.axelbrz.com.ar/?mod=iphone-png-images-normalizer with a fix for multiple IDAT
#---
# iPIN - iPhone PNG Images Normalizer v1.0
# Copyright (C) 2007
#
# Author:
# Axel E. Brzostowski
# http://www.axelbrz.com.ar/
# axelbrz@gmail.com
#
# References:
@mahmoudimus
mahmoudimus / python-monkey-patch-built-ins.py
Created February 4, 2010 22:20
pythonic monkey patching built-in types
# found this from Armin R. on Twitter, what a beautiful gem ;)
import ctypes
from types import DictProxyType, MethodType
# figure out side of _Py_ssize_t
if hasattr(ctypes.pythonapi, 'Py_InitModule4_64'):
_Py_ssize_t = ctypes.c_int64
else:
_Py_ssize_t = ctypes.c_int