Skip to content

Instantly share code, notes, and snippets.

@mildsunrise
mildsunrise / blobs.py
Last active May 16, 2024 07:22
Logic to work with Android KeyMaster blobs and Vold
#!/usr/bin/env python3
'''
keymaster blob logic.
Offers:
- low-level blob encoding and decoding
- loading softkeymaster blobs
- performing cryptographic operations (emulating KeyMaster) on a loaded blob
- CLI tool for parsing softkeymaster blobs and performing operations with them
@sts
sts / openidc_otp_validation.sh
Last active June 18, 2024 11:51
Keycloak OTP Validation API
BASE_URL=https://localhost:8081/auth
CLIENT_ID=curl-test
CLIENT_SECRET=
USERNAME=
PASSWORD=
REALM=validation-test
OTP_CODE=027253
# OpenID Access Token via "Resource Owner Password Credentials Grant"
@bgromov
bgromov / git-reset-author.sh
Created June 23, 2016 17:50
Git: reset author for ALL commits
#!/bin/sh
# Credits: http://stackoverflow.com/a/750191
git filter-branch -f --env-filter "
GIT_AUTHOR_NAME='Newname'
GIT_AUTHOR_EMAIL='new@email'
GIT_COMMITTER_NAME='Newname'
GIT_COMMITTER_EMAIL='new@email'
" HEAD