Skip to content

Instantly share code, notes, and snippets.

@amazingfate
amazingfate / gw_flash.py
Created March 30, 2021 09:20 — forked from SciresM/gw_flash.py
utility for interacting with gateway modchip updates
import sys
from struct import pack as pk, unpack as up
def u32(x):
return x & 0xFFFFFFFF
def tea_update_custom_mac(mac, v, k):
v0, v1 = v[0], v[1]
cur_sum = 0xC6EF3720
k0, k1, k2, k3 = k[0], k[1], k[2], k[3]