Open ShellCode33 opened 2 years ago
You provide Python code, talk about APIs, but you don't give a single API endpoint ? Is this repo for internal tooling purposes or do you plan to document the API at some point ?
This is a just a fancy http module to save you time in reverse engineering. I have provided a starting point incase anyone from google comes here. You can get the endpoints simply by looking at the traffic.
from proton_python_client import proton
from proton_python_client.proton.api import Session
from proton_python_client.proton.exceptions import ProtonError
import os
import pprint
cwd = os.getcwd()
__allow_alternative_routing__= True
proton_session = Session(
'https://api.protonmail.ch',
os.path.join(cwd, "logs"),
os.path.join(cwd, "cache"),
tls_pinning=False,
)
proton_session.enable_alternative_routing = False
proton_session.authenticate(username= "admin", password ="🧑🎨🎨")
def getMails():
info_response = proton_session.api_request("/mail/v4/conversations")
for conversation in info_response['Conversations']:
get_email_id = conversation['ID']
get_email_content= proton_session.api_request("/mail/v4/conversations/" + get_email_id)
pprint.pprint(get_email_content)
there is no ProtonDrive implementation right? thanks
Why is this example not in the readme?
This worked for me, thank you!
Do you know how I can decode the email body properly?
decoded_body = base64.b64decode(body).decode('utf-8')
Returns garbage.
I had to make this change:
from proton.api import Session
from proton.exceptions import ProtonError
from proton_python_client import proton from proton_python_client.proton.api import Session from proton_python_client.proton.exceptions import ProtonError
@Nllii has the closest to a working example I've found - but does anyone else have a working endpoint for the session start? I'm not sure what the updated url should be. This guess doesn't seem to be working:
proton_session = Session(
'https://mail.proton.me',
os.path.join(cwd, "logs"),
os.path.join(cwd, "cache"),
tls_pinning=False,
)
Hey, thanks for this Python module, but I'm not sure I get it...
You provide Python code, talk about APIs, but you don't give a single API endpoint ? Is this repo for internal tooling purposes or do you plan to document the API at some point ?