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]
|
[ccurrency]
|
||||||
command=scripts/ccurrency -f USD
|
command=scripts/ccurrency -f USD
|
||||||
interval=10
|
interval=1800
|
||||||
|
|
||||||
[crypto]
|
[crypto]
|
||||||
command=scripts/crypto BTC
|
command=scripts/crypto BTC
|
||||||
interval=10
|
interval=1800
|
||||||
|
|
||||||
[crypto]
|
[crypto]
|
||||||
command=scripts/crypto UCA -b EUR -r 5
|
command=scripts/crypto UCA -b EUR -r 5
|
||||||
interval=10
|
interval=1800
|
||||||
|
|
||||||
[crypto]
|
[crypto]
|
||||||
command=scripts/crypto BAT -r 5
|
command=scripts/crypto BAT -r 5
|
||||||
interval=10
|
interval=1800
|
||||||
|
|
||||||
[protonvpn]
|
[protonvpn]
|
||||||
interval=5
|
interval=5
|
||||||
|
|
|
@ -12,15 +12,37 @@ import requests
|
||||||
def parse_cli() -> argparse.Namespace:
|
def parse_cli() -> argparse.Namespace:
|
||||||
"""Parse credentials from the command line."""
|
"""Parse credentials from the command line."""
|
||||||
|
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
parser.add_argument("username")
|
||||||
|
parser.add_argument("password")
|
||||||
|
|
||||||
|
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)
|
||||||
|
|
||||||
with requests.Session() as session:
|
|
||||||
req = session.post(
|
req = session.post(
|
||||||
"https://mail.protonmail.com/api/auth",
|
"https://mail.protonmail.com/api/auth",
|
||||||
data={
|
data={
|
||||||
"Username": "tfranken@protonmail.com",
|
"Username": "tfranken@protonmail.com",
|
||||||
|
"ClientEphemeral": "123",
|
||||||
|
"ClientProof": "123",
|
||||||
|
"SRPSession": "123",
|
||||||
},
|
},
|
||||||
headers={
|
headers={
|
||||||
"x-pm-appversion": "Web_3.16.23",
|
"x-pm-appversion": "Web_3.16.23",
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
print(req.text)
|
print(req.text)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main(parse_cli())
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
"""Main installer file.
|
"""Main installer file.
|
||||||
|
|
||||||
Shamelessly copied from https://github.com/dmerejkowsky/dotfiles.
|
Shamelessly copied from https://github.com/dmerejkowsky/dotfiles, and modified.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
Loading…
Add table
Reference in a new issue