Skip to content

Instantly share code, notes, and snippets.

View bettse's full-sized avatar

Eric Betts bettse

View GitHub Profile
@bettse
bettse / hwid.proto
Created June 22, 2025 17:44
HWID BLE
syntax = "proto3";
package hwid;
message PortalToApp {
uint32 timestampMs = 1;
Event event = 2;
DeviceInfo deviceInfo = 3;
CommandResponse commandResponse = 4;
bytes accessoryMessage = 5;
}
@bettse
bettse / buffer-tools.js
Last active December 7, 2025 21:46
EAX and EAX-Prime in javascript
exports.bitShiftLeft = function (buffer) {
var shifted = Buffer.alloc(buffer.length);
var last = buffer.length - 1;
for (var index = 0; index < last; index++) {
shifted[index] = buffer[index] << 1;
if (buffer[index + 1] & 0x80) {
shifted[index] += 0x01;
}
}
shifted[last] = buffer[last] << 1;

GlobalPlatform and Secure Channel Analysis

Date: 2026-02-21
Project: HidGlobal.UniversalEncoder.Stubs.ConfigCardProgrammer


Q: Are there any references to GP/GlobalPlatform?

Yes, there are several references:

class Logger < ::ActiveSupport::Logger
def with_field(key, value)
Thread.current['lograge.data'] ||= {}
Thread.current['lograge.data'][key] = value
return self
end
def with_fields(hash)
if hash.is_a?(Hash)
Thread.current['lograge.data'] ||= {}