Skip to content

Instantly share code, notes, and snippets.

View HexF's full-sized avatar
🍉
Not Socializing

Thomas Hobson HexF

🍉
Not Socializing
View GitHub Profile
import time
last_time = 0
led_state = True #Put these lines with the imports
if wait_for_user_trigger:
input_state = GPIO.input(18)
if input_state == True:
@HexF
HexF / config.meta
Created May 26, 2019 00:16
BlockhuntStats Mod Info
LATESTVERSION: 1.0.0a
LATESTDOWNLOAD: none
USERPOLLURL: http://hexf.me/bhs.php?adduser&user=%USERNAME%
-USERRULES
#Users are put in as a sha256 of the users UUID without dashes - sha256(uuidND)
ALLOWUSER: 9115458bbc5dbcc573f20ac2435b7fad706870753e4ff11c7bcf21ec6ad5d117
ALLOWUSER: 4b1bfccf315fc75de3c45473931f0aba883c3e3d949d7c467422c23bde6faa8b

Keybase proof

I hereby claim:

  • I am hexf on github.
  • I am hexf (https://keybase.io/hexf) on keybase.
  • I have a public key ASCPK4eGy415xue3AJUR99k_KflPcdpKBgqYUbw9Zw64qwo

To claim this, I am signing this object:

@HexF
HexF / README.MD
Created April 5, 2021 14:23
EMKC Contest Test Bench Tool

EMKC Contest Test Bench Tool

I will probably make a repo for this one day, but for now this will do.

What this does:

  • Queries emkc.org for contest info
  • Queries piston with your code and args, exactly as it would be when being tested by EMKC.
  • Compares actual output against real, indicating failed and passed tests.

Complain about code quality in comments.

@HexF
HexF / README.MD
Created July 18, 2021 15:26
Logitech G105 Macro Keys on Linux

Logitech G105 Macro Keys on Linux

Through experimentation, and browsing the code of sidewinderd, I come to a conclustion as to how the keyboard communicates to the system.

Put simply, the keyboard uses HID Feature Reports, which we can manipulate with ioctl in c, or the python module hidapi.

Attached is example code, but this serves as documentation on the values of feature reports.

Macro Keys

@HexF
HexF / dec.py
Created October 16, 2023 10:57
DLink HDR4 Decryptor
# awful code for decrypting DLink TCLinux firmware files
# requires pycryptodome
import struct
import binascii
from Crypto.Cipher import AES
KEY = bytes.fromhex("11223344556677889900aabbccddeeff")
IV = bytes.fromhex("a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5")