Skip to content

Instantly share code, notes, and snippets.

View JJTech0130's full-sized avatar

JJTech JJTech0130

View GitHub Profile
@JJTech0130
JJTech0130 / snap_circuits_led_mc_keyboard.bas
Created July 7, 2023 23:48
PICAXE program to use Snap Circuits keyboard (U26) with LED MC (U29)
View snap_circuits_led_mc_keyboard.bas
; calling convention
symbol arg1 = b0
symbol arg2 = b1
symbol arg3 = b2
;symbol arg1w = w3
symbol shift_out_current_mask = b3
symbol shift_out_temp = b4
symbol main_last = b5
@JJTech0130
JJTech0130 / itml.py
Last active June 9, 2023 20:08
Parse Apple's ITML into proper HTML
View itml.py
from lxml import etree
import requests
OVERRIDE_CSS = """
/* Custom injected CSS */
.VBoxView {
display: flex;
flex-direction: column;
}
View frida-log-hook.js
var m = 'libsystem_trace.dylib';
// bool os_log_type_enabled(os_log_t oslog, os_log_type_t type);
var isEnabledFunc = Module.findExportByName(m, 'os_log_type_enabled');
// _os_log_impl(void *dso, os_log_t log, os_log_type_t type, const char *format, uint8_t *buf, unsigned int size);
var logFunc = Module.findExportByName(m, '_os_log_impl');
Interceptor.attach(isEnabledFunc, {
onLeave: function (ret) {
// console.log('log_enabled', ret);
ret.replace(0x1);
View memorymap.rs
use std::{alloc::Layout, mem, ops::{Deref, DerefMut}};
use crate::pager::Pagable;
pub struct MemoryMap(Vec<u8>);
impl MemoryMap {
fn page_round(size: usize) -> usize {
Layout::from_size_align(size, Vec::<u8>::page_size()).unwrap().size()
}
@JJTech0130
JJTech0130 / mac_changer.sh
Last active April 17, 2023 20:46
Quick script to change your MAC address
View mac_changer.sh
# Make sure the script is run as root
# Otherwise, try to run it with sudo
if [ $EUID -ne 0 ]; then
echo "This script must be run as root"
sudo $0
exit $? # Exit with the same exit code as sudo
fi
# Look for .mac files in the current folder
shopt -s nullglob
@JJTech0130
JJTech0130 / gsa.py
Last active December 27, 2022 22:04
Grand Slam Authentication (WIP)
View gsa.py
import srp
import plistlib as plist
from base64 import b64encode, b64decode
import requests
import json
import pbkdf2
import hashlib
# Constants
DEBUG = True # Allows using a proxy for debugging (disables SSL verification)
@JJTech0130
JJTech0130 / unpin.js
Created September 5, 2022 13:09
Disable SSL pinning using Frida
View unpin.js
// Disables SSL pinning by replacing functions with no-ops.
function unpin() {
var SecTrustEvaluate_handle = Module.findExportByName('Security', 'SecTrustEvaluate');
var SecTrustEvaluateWithError_handle = Module.findExportByName('Security', 'SecTrustEvaluateWithError');
var SSL_CTX_set_custom_verify_handle = Module.findExportByName('libboringssl.dylib', 'SSL_CTX_set_custom_verify');
var SSL_get_psk_identity_handle = Module.findExportByName('libboringssl.dylib', 'SSL_get_psk_identity');
var boringssl_context_set_verify_mode_handle = Module.findExportByName('libboringssl.dylib', 'boringssl_context_set_verify_mode');
if (SecTrustEvaluateWithError_handle) {
var SecTrustEvaluateWithError = new NativeFunction(SecTrustEvaluateWithError_handle, 'int', ['pointer', 'pointer']);
View GitHubIssueNumbers.user.js
// ==UserScript==
// @name GitHub Project Issue Numbers
// @namespace https://jjtech.dev
// @description Appends issue numbers to issue titles
// @version 0.7
// @require https://code.jquery.com/jquery-3.6.0.slim.min.js
// @match https://github.com/*
// @icon https://github.githubassets.com/pinned-octocat.svg
// @inject-into content
// ==/UserScript==
@JJTech0130
JJTech0130 / UIApplication+VolumeButtons.swift
Created June 30, 2022 23:38
Extension for UIApplication that allows capturing Volume Button events in Swift
View UIApplication+VolumeButtons.swift
//
// UIApplication+VolumeButtons.swift
//
// Based on https://stackoverflow.com/a/70815088
//
import UIKit
// Stub protocol to allow us to call private methods
@objc private protocol UIApplicationPrivate {
@JJTech0130
JJTech0130 / GitHubLabelsFixup.user.js
Last active June 16, 2022 16:23
Greasemonkey script that moves labels on GitHub issues in front of the title
View GitHubLabelsFixup.user.js
// ==UserScript==
// @name GitHub Labels Fixup
// @namespace https://jjtech.dev
// @description Moves labels on GitHub issues in front of the title
// @version 4.3
// @require https://code.jquery.com/jquery-3.6.0.slim.min.js
// @match https://github.com/*
// @icon https://github.githubassets.com/pinned-octocat.svg
// @inject-into content
// ==/UserScript==