Skip to content

Instantly share code, notes, and snippets.

View grant-h's full-sized avatar

Grant Hernandez grant-h

View GitHub Profile
@grant-h
grant-h / bhwatch.py
Created June 4, 2020 15:46
Watch Black Hat's session API for changes.
#!/usr/bin/env python3
"""
BlackHat USA session watcher
by Grant Hernandez.
Monitor sessions (briefings) to see when new ones are added.
Tested: Thu Jun 4 11:41:59 EDT 2020
"""
import requests
@grant-h
grant-h / importmon.py
Created April 2, 2021 06:29
Hooking all Python imports to print the increase in pages and memory size (Linux only, Python 3.7 tested)
import sys
import importlib
class ImportInterceptor(importlib.abc.Loader):
def __init__(self):
pass
def find_module(self, fullname, path=None):
#sys.stderr.write("LOAD INFO: %s\n" % (fullname))
return self
@grant-h
grant-h / epic_manager.py
Created August 24, 2022 15:39
Samsung EPIC Decryptor
#!/usr/bin/env python3
HELP="""
Samsung EPIC Decrypter
by @Digital_Cold, Aug 2022
Samsung EPIC is a power management daemon for Android. It stores its profiles
in AES CFB encrypted JSON files. The key is hardcoded per build in an ELF
section. By extracting the key and using the same decryption, we can recover
the JSON file.