Skip to content

Instantly share code, notes, and snippets.

View SebDominguez's full-sized avatar
💀
Learning STM32 mumbo jumbo

Sébastien Dominguez SebDominguez

💀
Learning STM32 mumbo jumbo
View GitHub Profile
@SebDominguez
SebDominguez / xiaomi-filter-pwd.py
Last active June 3, 2023 06:40
[Xiaomi Smart Air Purifier Filter PWD calculator] Calculate the password using a given UID #xiaomi #airFilter
import sys
import hashlib
# Usage: pwd.py 04A03CAA1E7080
# credit: https://github.com/Flamingo-tech/xiaomi-air-purifier-reverse-engineering
def getpwd(uid):
uid = bytearray.fromhex(uid)
h = bytearray.fromhex(hashlib.sha1(uid).hexdigest())
pwd = ""
@SebDominguez
SebDominguez / main.c
Last active June 2, 2023 10:47
[Main test] Syntax Highlighting for C files with Lepton #C #helloWorld
#include<stdio.h>
int main(void) {
printf("Hello World\n");
return 0;
}