Skip to content

Instantly share code, notes, and snippets.

@Tatsujin
Tatsujin / bitlbee-fb-login-2fa.py
Last active March 26, 2022 09:42
Bitlbee Facebook MQTT 2FA Token Generation
#!/usr/bin/python3
# Portions of this script directly from https://gist.github.com/jaymzh/3ed8817cf8c20222ca09ce33a544b695
# and: https://github.com/akhepcat/Miscellaneous/
# Before running this script, add a facebook account in bitlbee and activate to login and logout. Accept the 2FA challenge.
# Save your bitlbee config afterward to update the bitlbee config
import sys
import cgi
from urllib.parse import urlencode, quote_plus
import hashlib
### Keybase proof
I hereby claim:
* I am tatsujin on github.
* I am tatsujin (https://keybase.io/tatsujin) on keybase.
* I have a public key whose fingerprint is 087D 7EC5 6879 8C87 98F4 0D44 EB05 A0F1 EB9C 5B8F
To claim this, I am signing this object: