- Packets are 0x40 (64) bytes long
- Byte 0-1: Command & Subcommand
- Byte 2-3: Offset (or Result for packets from keyboard)
- Byte 4: padding? (always 00)
- Byte 5: Size of payload (max 0x38)
- Byte 6-7: checksum
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
# gk64.py - exploration stuff using pyusb to talk to a GK6x keyboard | |
# | |
# Copyright (c) 2019 Will Woods <w@wizard.zone> | |
# | |
# You shouldn't be using this, because it's horrible, but if you are, | |
# consider it licensed as GPLv2+. Also, I'm sorry. | |
# | |
# If you just wanna send random commands and see what happens, try: | |
# sudo python3 gk64.py [cmd] [subcmd] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/home/wwoods/Documents/Wireshark/iGK64/7A29.bin: file format binary | |
Disassembly of section .data: | |
00000000 <.data>: | |
0: 48 00 50 20 j 0xa040 | |
4: 48 00 00 30 j 0x64 | |
8: 48 00 00 2e j 0x64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; vim: syn=asm: | |
; | |
; Hello and welcome to my hand-annotated disassembly of my GK64's firmware!! | |
; | |
; Please forgive the formatting and such, this is really just a bunch of my | |
; own notes that I wrote up while trying to RE this thing. I'm not an expert | |
; or an authority, I'm just trying to figure out how this thing works. | |
; | |
; If you have any questions, or better datasheets, or more info about the | |
; keyboard hardware itself (especially if you've got probes small enough |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Make a little tmpdir (and delete it when we're done) | |
tmpdir=$(mktemp -d) && [ -d $tmpdir ] && trap "rm -rf $tmpdir" EXIT | |
tree1=$tmpdir/tree1 | |
tree2=$tmpdir/tree2 | |
# Make an example tree | |
mkdir -p $tree1/etc/pki/rpm-gpg | |
mkdir -p $tree1/etc/pki/ca-trust |
I hereby claim:
- I am wgwoods on github.
- I am willrad (https://keybase.io/willrad) on keybase.
- I have a public key ASAHoKxQuiCHAHN_56XxWyT_6XqBP6mXWffAqVdr4N_EeAo
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
from pathlib import Path | |
# Define an action that you can send into the generator | |
SKIPDIR = 1 | |
# Path walkin' generator coroutine | |
def walk(topdir='.'): | |
for p in Path(topdir).iterdir(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CC=clang | |
CFLAGS=-Os | |
WASI_VERSION=12 | |
WASI_VERSION_FULL=$(WASI_VERSION).0 | |
ifeq ($(OS),Windows_NT) | |
HOST_OS=mingw | |
else | |
UNAME_S := $(shell uname -s) |