Skip to content

Instantly share code, notes, and snippets.

View JJTech0130's full-sized avatar

James Gill JJTech0130

View GitHub Profile
@JJTech0130
JJTech0130 / clearconnectx.lua
Created June 20, 2026 18:51
Lutron Clear Connect - Type X dissector
-- Wireshark Lua dissector for Lutron Clear Connect - Type X (CCX)
-- UDP/9190 over a Thread/802.15.4 mesh
local cbor = require("simple_cbor")
local ccx_proto = Proto("clearconnectx", "Lutron Clear Connect - Type X")
local f_msg_id = ProtoField.uint32("clearconnectx.msg_id", "Message ID", base.DEC)
local f_note = ProtoField.string("clearconnectx.note", "Note")
ccx_proto.fields = { f_msg_id, f_note }
Model BoardConfig Processor Chipset Module Fillmore[^1]
Mac Pro (2023) J180dAP M2 Ultra 4388 sumatra no
Mac mini (M1, 2020) J274AP M1 4378 atlantisb no
MacBook Pro (13-inch, M1, 2020) J293AP M1 4378 honshu no
MacBook Air (M1, 2020) J313AP M1 4378 shikoku no
MacBook Pro (14-inch, 2021) J314cAP M1 Max 4387 maldives no
MacBook Pro (14-inch, 2021) J314sAP M1 Pro 4387 maldives no
MacBook Pro (16-inch, 2021) J316cAP M1 Max 4387 madagascar no
MacBook Pro (16-inch, 2021) J316sAP M1 Pro 4387 madagascar no
@JJTech0130
JJTech0130 / DeviceTree.j700ap.dts
Created June 17, 2026 05:27
MacBook Neo DeviceTree
device-tree:
AAPL,phandle: 1
config-number: "syscfg/CFG#/0x40,zeroes/0x40"
target-type: "J700"
region-info: "syscfg/Regn/0x20,zeroes/0x20"
time-stamp: "Mon Jun 1 21:23:12 PDT 2026"
chosen:
dram-vendor: 0
marketing-software-behavior: "syscfg/MkBS"
display-scale: 0
@JJTech0130
JJTech0130 / iap2.lua
Last active May 9, 2026 21:32
iAP2 (iPod Accessory Protocol 2) Wireshark Dissector
-- iAP2 (iPod Accessory Protocol 2)
--
-- Layers:
-- 1. iAP2 Link — packet framing, control flags, checksums
-- 2. iAP2 Session — payload interpretation based on session type
-- a. Control Session messages with parameters
-- b. File Transfer Session datagrams
-- c. External Accessory Session datagrams
-- ============================================================
@JJTech0130
JJTech0130 / libressllog.js
Created May 9, 2026 06:17
SSL keylogging for libssl.35.dylib for MobileDevice.framework
// This script implements SSL keylogging for libssl.35.dylib, which is an old version of LibreSSL.
// Primarily intended to be used when debugging MobileDevice.framework, which uses it for some reason.
var mod = Process.getModuleByName("libssl.35.dylib");
var gen_master = mod.findExportByName("tls1_generate_master_secret");
var keylogPath = '/tmp/keylog.txt';
var keylog = new File(keylogPath, "a");
var toHex = function(arr) {
@JJTech0130
JJTech0130 / usbmuxd.lua
Last active May 24, 2026 12:12 — forked from axelkar/usbmuxd.lua
Usbmuxd protocol dissector for Wireshark. Passes TCP to Wireshark's built-in TCP dissector
local proto_usbmuxd = Proto("usbmuxd", "Usbmuxd Protocol")
proto_usbmuxd.fields.protocol = ProtoField.uint32("usbmuxd.protocol", "Message Kind", base.DEC)
proto_usbmuxd.fields.length = ProtoField.uint32("usbmuxd.length", "Length", base.DEC)
proto_usbmuxd.fields.magic = ProtoField.uint32("usbmuxd.magic", "Magic", base.HEX)
proto_usbmuxd.fields.tx_seq = ProtoField.uint16("usbmuxd.tx_seq", "Transmit sequence", base.DEC)
proto_usbmuxd.fields.rx_seq = ProtoField.uint16("usbmuxd.rx_seq", "Receive sequence", base.DEC)
proto_usbmuxd.fields.version_major = ProtoField.uint32("usbmuxd.version_major", "Major version", base.DEC)
proto_usbmuxd.fields.version_minor = ProtoField.uint32("usbmuxd.version_minor", "Minor version", base.DEC)
@JJTech0130
JJTech0130 / jjg_asm.py
Created April 28, 2026 19:42
jjgRISC assembler for Digital Systems II at RIT
"""
jjgRISC assembler
Assembles fmlRISC assembly (.s) to Altera .mif format.
Based on dxp_asm, which is written in C, aimed to be implemented in a cleaner way.
I added support for .equ and .word directives, .word doesn't happen to be very useful for SMIOP due to the fact that you can't load PM into registers.
Also, I fixed the jump implementation. Needs a second pass to calculate the label address to jump to first.
I implemented support for all memnotics for all IDNs, so hopefully it should be usable for everyone.
@JJTech0130
JJTech0130 / ConsumerKeys.swift
Created March 7, 2026 09:17
Creating fake/virtual USB devices on macOS using IOUSBHostControllerInterface
// ConsumerKeys.swift
// Boot-protocol keyboard that reports keycodes in Consumer page (0x0C).
// iOS maps consumer page usages received this way to system actions.
import Foundation
public final class ConsumerKeys: SyntheticHID {
// MARK: - Consumer usages sent as boot-keyboard keycodes (page 0x0C, ≤ 0xFF)
@JJTech0130
JJTech0130 / VZUSBPassthrough.swift
Last active March 7, 2026 09:23
Using USB passthrough with Virtualization.framework
import Dynamic
import Foundation
import IOKit
import Virtualization
enum PassthroughError: Error {
case deviceNotFound(vendor: Int, product: Int)
case failedToCreateDeviceConfig(underlyingError: Error?)
case failedToCreateDevice(underlyingError: Error?)
case failedToAttachDevice(underlyingError: Error)
@JJTech0130
JJTech0130 / README.md
Created March 3, 2026 13:15 — forked from zhaofengli/README.md
Selectively bypass entitlement validation by debugging amfid

amfid-allow

This script hooks into macOS amfid to grant restricted entitlements to selected executables. Tested on macOS 15.4.

Prerequisites

Only disabling Debugging Restrictions (ALLOW_TASK_FOR_PID) is required and other SIP restrictions can be left enabled: