Skip to content

Instantly share code, notes, and snippets.

View afit's full-sized avatar

Aidan Fitzpatrick afit

View GitHub Profile
@jan0
jan0 / imessage_decrypt.py
Created June 30, 2012 11:46
Decrypt iMessages
from Crypto.Cipher import AES
from StringIO import StringIO
from bplist import BPlistReader #https://github.com/farcaller/bplist-python
import M2Crypto
import gzip
import struct
def xor_strings(s, key):
res = ""
for i in xrange(len(s)):
@defrex
defrex / pretty_request.py
Last active September 8, 2023 14:33
A simple function to print a Django request the way requests are meant to be printed.
def pretty_request(request):
headers = ''
for header, value in request.META.items():
if not header.startswith('HTTP'):
continue
header = '-'.join([h.capitalize() for h in header[5:].lower().split('_')])
headers += '{}: {}\n'.format(header, value)
return (
@anaisbetts
anaisbetts / AccentColors.cs
Created August 18, 2015 17:54
Render the accent background of a Windows Store-style icon
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media;
// https://raw.githubusercontent.com/maxtruxa/AccentColors/master/AccentColors/AccentColor.cs
@graphis
graphis / simpleMLB.sh
Created September 14, 2016 18:13 — forked from al3xtjames/simpleMLB.sh
Simple Main Logic Board (MLB) Serial Generator Script
#!/bin/bash
#
# Simple Main Logic Board (MLB) Serial Generator Script by TheRacerMaster
# Based off the work of Hanger1, AGuyWhoIsBored & Alien:X
# NOTE: This is a simple script that doesn't do any checking of other SMBIOS values. It needs valid SMBIOS data which includes the following:
# - Valid SmUUID value in Clover config.plist under SMBIOS (generated using uuidgen)
# - ROM value set to UseMacAddr0 in Clover config.plist (uses MAC address of your first NIC as ROM value)
# - Properly formatted serial number (doesn't have to be a real one, just formatted properly) in Clover config.plist under SMBIOS
# - Don't use a generic serial number (such as Clover's default)! It needs to be at least semi-unique.
# - Try using a generated serial number that isn't real (but formatted correctly) from Clover Configurator, Chameleon Wizard, etc.
@kamermans
kamermans / generate_imei.py
Last active April 12, 2024 08:51
Generates a complete, valid IMEI from a TAC code or otherwise incomplete IMEI.
#!/usr/bin/env python2
from random import randint
def generate_imei(incomplete_imei):
luhn_sum = 0
imei_digits = []
for i in xrange(0,14):
# Pull each digit from the TAC, generate missing numbers with rand()