Skip to content

Login with browser cookie

Marcel Jankrift edited this page Nov 15, 2021 · 1 revision

This is a workaround for the login process which you can also use if your account has two-factor authentication enabled.

json_to_go_cookie.py

json_string = """
PASTE_JSON_COOKIE_HERE
"""
import json

json_object = json.loads(json_string)
out_json = []
for elem in json_object:
    out_elem = {}
    for key, value in elem.items():
        out_elem[key[0].upper() + key[1:]] = value
    out_elem["Persistent"] = True
    out_elem["CanonicalHost"] = "mbasic.facebook.com"
    out_elem["Domain"] = "facebook.com"
    out_elem["Expires"] = "2099-01-30T00:00:00.000000+00:00"
    out_json.append(out_elem)
print(json.dumps(out_json).replace(' ', ''))
  • Run the python script go generate the ~/.go-cookies file.
$ python3 json_to_go_cookie.py > ~/.go-cookies
  • Now you can use the activity deletion program and should already be logged in.
Clone this wiki locally