Change lookup intervals, protonmail logins
This commit is contained in:
parent
8f14d6a2db
commit
1d84e02940
3 changed files with 38 additions and 16 deletions
|
@ -60,19 +60,19 @@ DISK=/run/media/flyingscorpio/Backup
|
|||
|
||||
[ccurrency]
|
||||
command=scripts/ccurrency -f USD
|
||||
interval=10
|
||||
interval=1800
|
||||
|
||||
[crypto]
|
||||
command=scripts/crypto BTC
|
||||
interval=10
|
||||
interval=1800
|
||||
|
||||
[crypto]
|
||||
command=scripts/crypto UCA -b EUR -r 5
|
||||
interval=10
|
||||
interval=1800
|
||||
|
||||
[crypto]
|
||||
command=scripts/crypto BAT -r 5
|
||||
interval=10
|
||||
interval=1800
|
||||
|
||||
[protonvpn]
|
||||
interval=5
|
||||
|
|
|
@ -12,15 +12,37 @@ import requests
|
|||
def parse_cli() -> argparse.Namespace:
|
||||
"""Parse credentials from the command line."""
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("username")
|
||||
parser.add_argument("password")
|
||||
|
||||
with requests.Session() as session:
|
||||
req = session.post(
|
||||
"https://mail.protonmail.com/api/auth",
|
||||
data={
|
||||
"Username": "tfranken@protonmail.com",
|
||||
},
|
||||
headers={
|
||||
"x-pm-appversion": "Web_3.16.23",
|
||||
},
|
||||
)
|
||||
print(req.text)
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
def main(args: argparse.Namespace) -> None:
|
||||
"""Connect to ProtonMail."""
|
||||
|
||||
with requests.Session() as session:
|
||||
main_url = "https://mail.protonmail.com"
|
||||
|
||||
req = session.get(main_url)
|
||||
|
||||
print(req.cookies)
|
||||
|
||||
req = session.post(
|
||||
"https://mail.protonmail.com/api/auth",
|
||||
data={
|
||||
"Username": "tfranken@protonmail.com",
|
||||
"ClientEphemeral": "123",
|
||||
"ClientProof": "123",
|
||||
"SRPSession": "123",
|
||||
},
|
||||
headers={
|
||||
"x-pm-appversion": "Web_3.16.23",
|
||||
},
|
||||
)
|
||||
print(req.text)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main(parse_cli())
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
"""Main installer file.
|
||||
|
||||
Shamelessly copied from https://github.com/dmerejkowsky/dotfiles.
|
||||
Shamelessly copied from https://github.com/dmerejkowsky/dotfiles, and modified.
|
||||
"""
|
||||
|
||||
import argparse
|
||||
|
|
Loading…
Add table
Reference in a new issue