-
Notifications
You must be signed in to change notification settings - Fork 47
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.
- Install EditThisCookie extension from the chrome web store.
- Navigate to https://mbasic.facebook.com or https://facebook.com. Make sure that you are logged into you account.
- Open the EditThisCookie extension and click on the "Export" symbol.
- Create the
json_to_go_cookie.py
file and paste the exported cookies from the clipboard.
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.