Skip to content

Instantly share code, notes, and snippets.

@edesilets
edesilets / mila_api_scratchpad.py
Created December 26, 2022 15:43 — forked from sanghviharshit/mila_api_scratchpad.py
Scratch pad for working with Milacares API for monitoring and controlling Mila air purifier. Read my blog post for more details - https://blog.sanghviharshit.com/reverse-engineering-private-api-ssl-pinning/
# Scratch pad for working with Milacares API for monitoring and controlling their air purifier devices.
# Based on the code from https://www.stefaanlippens.net/oauth-code-flow-pkce.html for PKCE code verifier and challenge.
import base64
import hashlib
import html
import json
import os
import re
import urllib.parse