take two
This commit is contained in:
parent
f33ec26dbf
commit
ab63c7a508
2 changed files with 12 additions and 139 deletions
|
@ -22,146 +22,19 @@ def hydroxide(path):
|
||||||
return pword
|
return pword
|
||||||
|
|
||||||
|
|
||||||
class oauth:
|
def get_client_id(account):
|
||||||
def get_client_id(account):
|
|
||||||
cmd = check_output("pass " + account, shell=True)
|
cmd = check_output("pass " + account, shell=True)
|
||||||
|
|
||||||
return re.search(rb"client_id: (.*)", cmd, flags=0).group(1)
|
return re.search(rb"client_id: (.*)", cmd, flags=0).group(1)
|
||||||
|
|
||||||
def get_client_secret(account):
|
|
||||||
|
def get_client_secret(account):
|
||||||
cmd = check_output("pass " + account, shell=True)
|
cmd = check_output("pass " + account, shell=True)
|
||||||
|
|
||||||
return re.search(rb"client_secret: (.*)", cmd, flags=0).group(1)
|
return re.search(rb"client_secret: (.*)", cmd, flags=0).group(1)
|
||||||
|
|
||||||
def get_client_token(account):
|
|
||||||
|
def get_client_token(account):
|
||||||
cmd = check_output("pass " + account, shell=True)
|
cmd = check_output("pass " + account, shell=True)
|
||||||
|
|
||||||
return re.search(rb"client_token: (.*)", cmd, flags=0).group(1)
|
return re.search(rb"client_token: (.*)", cmd, flags=0).group(1)
|
||||||
|
|
||||||
|
|
||||||
#! /usr/bin/env python
|
|
||||||
from subprocess import check_output
|
|
||||||
import re
|
|
||||||
|
|
||||||
|
|
||||||
def get_pass(account):
|
|
||||||
return check_output("pass " + account, shell=True).splitlines()[0]
|
|
||||||
|
|
||||||
|
|
||||||
def get_user(account):
|
|
||||||
usercmd = check_output("pass " + account, shell=True)
|
|
||||||
|
|
||||||
return re.search(rb"login: (.*)", usercmd, flags=0).group(1)
|
|
||||||
|
|
||||||
|
|
||||||
def hydroxide(path):
|
|
||||||
|
|
||||||
file = open(path, "r")
|
|
||||||
|
|
||||||
pword = file.read()
|
|
||||||
|
|
||||||
return pword
|
|
||||||
|
|
||||||
|
|
||||||
class oauth:
|
|
||||||
def get_client_id(account):
|
|
||||||
cmd = check_output("pass " + account, shell=True)
|
|
||||||
|
|
||||||
return re.search(rb"client_id: (.*)", cmd, flags=0).group(1)
|
|
||||||
|
|
||||||
def get_client_secret(account):
|
|
||||||
cmd = check_output("pass " + account, shell=True)
|
|
||||||
|
|
||||||
return re.search(rb"client_secret: (.*)", cmd, flags=0).group(1)
|
|
||||||
|
|
||||||
def get_client_token(account):
|
|
||||||
cmd = check_output("pass " + account, shell=True)
|
|
||||||
|
|
||||||
return re.search(rb"client_token: (.*)", cmd, flags=0).group(1)
|
|
||||||
|
|
||||||
|
|
||||||
#! /usr/bin/env python
|
|
||||||
from subprocess import check_output
|
|
||||||
import re
|
|
||||||
|
|
||||||
|
|
||||||
def get_pass(account):
|
|
||||||
return check_output("pass " + account, shell=True).splitlines()[0]
|
|
||||||
|
|
||||||
|
|
||||||
def get_user(account):
|
|
||||||
usercmd = check_output("pass " + account, shell=True)
|
|
||||||
|
|
||||||
return re.search(rb"login: (.*)", usercmd, flags=0).group(1)
|
|
||||||
|
|
||||||
|
|
||||||
def hydroxide(path):
|
|
||||||
|
|
||||||
file = open(path, "r")
|
|
||||||
|
|
||||||
pword = file.read()
|
|
||||||
|
|
||||||
return pword
|
|
||||||
|
|
||||||
|
|
||||||
class oauth:
|
|
||||||
def get_client_id(account):
|
|
||||||
cmd = check_output("pass " + account, shell=True)
|
|
||||||
|
|
||||||
return re.search(rb"client_id: (.*)", cmd, flags=0).group(1)
|
|
||||||
|
|
||||||
def get_client_secret(account):
|
|
||||||
cmd = check_output("pass " + account, shell=True)
|
|
||||||
|
|
||||||
return re.search(rb"client_secret: (.*)", cmd, flags=0).group(1)
|
|
||||||
|
|
||||||
def get_client_token(account):
|
|
||||||
cmd = check_output("pass " + account, shell=True)
|
|
||||||
|
|
||||||
return re.search(rb"client_token: (.*)", cmd, flags=0).group(1)
|
|
||||||
|
|
||||||
|
|
||||||
#! /usr/bin/env python
|
|
||||||
from subprocess import check_output
|
|
||||||
import re
|
|
||||||
|
|
||||||
|
|
||||||
def get_pass(account):
|
|
||||||
return check_output("pass " + account, shell=True).splitlines()[0]
|
|
||||||
|
|
||||||
|
|
||||||
def get_user(account):
|
|
||||||
usercmd = check_output("pass " + account, shell=True)
|
|
||||||
|
|
||||||
return re.search(rb"login: (.*)", usercmd, flags=0).group(1)
|
|
||||||
|
|
||||||
|
|
||||||
def hydroxide(path):
|
|
||||||
|
|
||||||
file = open(path, "r")
|
|
||||||
|
|
||||||
pword = file.read()
|
|
||||||
|
|
||||||
return pword
|
|
||||||
|
|
||||||
|
|
||||||
class oauth:
|
|
||||||
def get_client_id(account):
|
|
||||||
cmd = check_output("pass " + account, shell=True)
|
|
||||||
|
|
||||||
return re.search(rb"client_id: (.*)", cmd, flags=0).group(1)
|
|
||||||
|
|
||||||
def get_client_secret(account):
|
|
||||||
cmd = check_output("pass " + account, shell=True)
|
|
||||||
|
|
||||||
return re.search(rb"client_secret: (.*)", cmd, flags=0).group(1)
|
|
||||||
|
|
||||||
def get_client_token(account):
|
|
||||||
cmd = check_output("pass " + account, shell=True)
|
|
||||||
|
|
||||||
return re.search(rb"client_token: (.*)", cmd, flags=0).group(1)
|
|
||||||
|
|
||||||
def get_client_refresh_token(account):
|
|
||||||
cmd = check_output("pass " + account, shell=True)
|
|
||||||
|
|
||||||
return re.search(rb"client_refresh_token: (.*)", cmd, flags=0).group(1)
|
|
||||||
|
|
|
@ -36,5 +36,5 @@ auth_mechanisms = XOAUTH2
|
||||||
oauth2_request_url = https://login.microsoftonline.com/common/oauth2/v2.0/token
|
oauth2_request_url = https://login.microsoftonline.com/common/oauth2/v2.0/token
|
||||||
oauth2_client_id = 9e5f94bc-e8a4-4e73-b8be-63364c29d753 # thunderbird's token not mine lol
|
oauth2_client_id = 9e5f94bc-e8a4-4e73-b8be-63364c29d753 # thunderbird's token not mine lol
|
||||||
oauth2_client_secret = "" # no need for this lmao
|
oauth2_client_secret = "" # no need for this lmao
|
||||||
oauth2_refresh_token_eval = oauth.get_client_refresh_token("Microsoft")
|
oauth2_refresh_token_eval = get_client_refresh_token("Microsoft")
|
||||||
oauth2_access_token_eval = oauth.get_client_token("Microsoft")
|
oauth2_access_token_eval = get_client_token("Microsoft")
|
Loading…
Reference in a new issue