GiveYouAMail 1.0.1__py3-none-any.whl → 1.0.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {giveyouamail-1.0.1.dist-info → giveyouamail-1.0.2.dist-info}/METADATA +1 -1
- giveyouamail-1.0.2.dist-info/RECORD +9 -0
- gyam/__init__.py +1 -1
- gyam/main_script.py +6 -111
- giveyouamail-1.0.1.dist-info/RECORD +0 -9
- {giveyouamail-1.0.1.dist-info → giveyouamail-1.0.2.dist-info}/WHEEL +0 -0
- {giveyouamail-1.0.1.dist-info → giveyouamail-1.0.2.dist-info}/entry_points.txt +0 -0
- {giveyouamail-1.0.1.dist-info → giveyouamail-1.0.2.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
gyam/30MMCLI.py,sha256=GCHPcFx3z7NuwCO0TjG6-3WZEYFNVX2SImMtCcLUw4k,4004
|
|
2
|
+
gyam/__init__.py,sha256=zsEGqfxUbO3JSTtrGADNALjgM-afZpUQ8KQ1P7HJTl0,30
|
|
3
|
+
gyam/gyam.py,sha256=eZhvEjEdDa2Z6kos6pFNF2psQDxLXOEtSr-Hb1oBc_4,4334
|
|
4
|
+
gyam/main_script.py,sha256=wII19ig1U6l8AiBvbBm1wnOrebspFymMTetVb2dnDB8,193
|
|
5
|
+
giveyouamail-1.0.2.dist-info/METADATA,sha256=f5bzAqp4ZxBsWSYdKujY47vr3STsk8fWYufCFcyIJfo,206
|
|
6
|
+
giveyouamail-1.0.2.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
7
|
+
giveyouamail-1.0.2.dist-info/entry_points.txt,sha256=uOLs7uymvTrRJz1O8e6eyWdKVujKNH5ITzRajEpZE9k,47
|
|
8
|
+
giveyouamail-1.0.2.dist-info/top_level.txt,sha256=FtRwkE3gNQ7_pMjYVSxZBSmUpjt1eOwE7An9fdQJ3Es,5
|
|
9
|
+
giveyouamail-1.0.2.dist-info/RECORD,,
|
gyam/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
from .
|
|
1
|
+
from .main_script import main
|
gyam/main_script.py
CHANGED
|
@@ -1,111 +1,6 @@
|
|
|
1
|
-
#!/usr/bin/
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
headers = {"Authorization": f"Bearer {token}"}
|
|
8
|
-
res = requests.get(f"{API}/messages/{msg_id}", headers=headers).json()
|
|
9
|
-
body = res.get('text', res.get('intro', 'Sem conteúdo'))
|
|
10
|
-
|
|
11
|
-
while True:
|
|
12
|
-
stdscr.clear()
|
|
13
|
-
h, w = stdscr.getmaxyx()
|
|
14
|
-
stdscr.attron(curses.color_pair(1))
|
|
15
|
-
stdscr.addstr(1, 2, "╔" + "═"*(w-6) + "╗")
|
|
16
|
-
stdscr.addstr(2, 2, f"║ CONTEÚDO DA MENSAGEM {' '*(w-29)}║")
|
|
17
|
-
stdscr.addstr(3, 2, "╚" + "═"*(w-6) + "╝")
|
|
18
|
-
stdscr.attroff(curses.color_pair(1))
|
|
19
|
-
|
|
20
|
-
# Exibe o corpo do e-mail (quebra linha simples)
|
|
21
|
-
lines = body.split('\n')
|
|
22
|
-
for i, line in enumerate(lines[:h-10]):
|
|
23
|
-
stdscr.addstr(5+i, 4, line[:w-8])
|
|
24
|
-
|
|
25
|
-
stdscr.attron(curses.color_pair(3))
|
|
26
|
-
stdscr.addstr(h-2, 2, " [ESC/B] VOLTAR ", curses.A_REVERSE)
|
|
27
|
-
stdscr.attroff(curses.color_pair(3))
|
|
28
|
-
|
|
29
|
-
stdscr.refresh()
|
|
30
|
-
k = stdscr.getch()
|
|
31
|
-
if k in [27, ord('b'), ord('B')]: break
|
|
32
|
-
|
|
33
|
-
def tui_original(stdscr, token, email):
|
|
34
|
-
curses.start_color()
|
|
35
|
-
curses.init_pair(1, curses.COLOR_CYAN, curses.COLOR_BLACK)
|
|
36
|
-
curses.init_pair(2, curses.COLOR_WHITE, curses.COLOR_BLUE)
|
|
37
|
-
curses.init_pair(3, curses.COLOR_GREEN, curses.COLOR_BLACK)
|
|
38
|
-
curses.curs_set(0)
|
|
39
|
-
idx = 0
|
|
40
|
-
|
|
41
|
-
while True:
|
|
42
|
-
stdscr.clear()
|
|
43
|
-
h, w = stdscr.getmaxyx()
|
|
44
|
-
|
|
45
|
-
stdscr.attron(curses.color_pair(1) | curses.A_BOLD)
|
|
46
|
-
stdscr.addstr(1, 2, "╔" + "═"*(w-6) + "╗")
|
|
47
|
-
stdscr.addstr(2, 2, f"║ GiveYouAMail CLI {' '*(w-25)}║")
|
|
48
|
-
stdscr.addstr(3, 2, f"║ User: {email.ljust(w-16)} ║")
|
|
49
|
-
stdscr.addstr(4, 2, "╚" + "═"*(w-6) + "╝")
|
|
50
|
-
stdscr.attroff(curses.color_pair(1) | curses.A_BOLD)
|
|
51
|
-
|
|
52
|
-
headers = {"Authorization": f"Bearer {token}"}
|
|
53
|
-
try:
|
|
54
|
-
r = requests.get(f"{API}/messages", headers=headers, timeout=5)
|
|
55
|
-
items = r.json().get('hydra:member', [])
|
|
56
|
-
except: items = []
|
|
57
|
-
|
|
58
|
-
if not items:
|
|
59
|
-
stdscr.addstr(h//2, w//2-9, ">> NO INCOMING <<", curses.A_BOLD)
|
|
60
|
-
else:
|
|
61
|
-
for i, m in enumerate(items[:h-10]):
|
|
62
|
-
style = curses.color_pair(2) if i == idx else curses.A_NORMAL
|
|
63
|
-
sender = m['from']['address'][:20].ljust(22)
|
|
64
|
-
subj = m['subject'][:w-40].ljust(w-40)
|
|
65
|
-
stdscr.addstr(6+i, 4, f" {sender} | {subj} ", style)
|
|
66
|
-
|
|
67
|
-
stdscr.attron(curses.color_pair(3))
|
|
68
|
-
stdscr.addstr(h-2, 2, " [Q] QUIT [R] REFRESH [ENTER] OPEN ", curses.A_REVERSE)
|
|
69
|
-
stdscr.attroff(curses.color_pair(3))
|
|
70
|
-
|
|
71
|
-
stdscr.refresh()
|
|
72
|
-
k = stdscr.getch()
|
|
73
|
-
|
|
74
|
-
if k in [ord('q'), ord('Q'), 27]: break
|
|
75
|
-
elif k == curses.KEY_UP and idx > 0: idx -= 1
|
|
76
|
-
elif k == curses.KEY_DOWN and idx < len(items)-1: idx += 1
|
|
77
|
-
elif k in [10, 13]: # ENTER
|
|
78
|
-
if items:
|
|
79
|
-
read_msg(stdscr, token, items[idx]['id'])
|
|
80
|
-
elif k in [ord('r'), ord('R')]: idx = 0
|
|
81
|
-
|
|
82
|
-
def main():
|
|
83
|
-
raw = " ".join(sys.argv)
|
|
84
|
-
m_mail = re.search(r'M:[\s"]*([^\s"]+)', raw)
|
|
85
|
-
m_pswd = re.search(r'pswd:[\s"]*([^\s"]+)', raw)
|
|
86
|
-
|
|
87
|
-
if "-Login" in raw:
|
|
88
|
-
if not m_pswd: return
|
|
89
|
-
try:
|
|
90
|
-
doms = requests.get(f"{API}/domains").json()['hydra:member']
|
|
91
|
-
target_dom = doms[0]['domain']
|
|
92
|
-
except: target_dom = "moakt.cc"
|
|
93
|
-
email = m_mail.group(1) if m_mail else f"user_{os.urandom(2).hex()}@{target_dom}"
|
|
94
|
-
pswd = m_pswd.group(1)
|
|
95
|
-
res = requests.post(f"{API}/accounts", json={"address": email, "password": pswd})
|
|
96
|
-
if res.status_code in [201, 200, 422]:
|
|
97
|
-
with open("session.json", "w") as f:
|
|
98
|
-
json.dump({"email": email, "password": pswd}, f)
|
|
99
|
-
print(f"Sessão Criada: {email}")
|
|
100
|
-
return
|
|
101
|
-
|
|
102
|
-
if "-oauth" in raw:
|
|
103
|
-
if not os.path.exists("session.json"): return
|
|
104
|
-
with open("session.json", "r") as f:
|
|
105
|
-
s = json.load(f); email, pswd = s['email'], s['password']
|
|
106
|
-
res = requests.post(f"{API}/token", json={"address": email, "password": pswd})
|
|
107
|
-
if res.status_code == 200:
|
|
108
|
-
curses.wrapper(tui_original, res.json()['token'], email)
|
|
109
|
-
|
|
110
|
-
if __name__ == "__main__":
|
|
111
|
-
main()
|
|
1
|
+
#!/data/data/com.termux/files/usr/bin/python3.12
|
|
2
|
+
import sys
|
|
3
|
+
from gyam.main_script import main
|
|
4
|
+
if __name__ == '__main__':
|
|
5
|
+
sys.argv[0] = sys.argv[0].removesuffix('.exe')
|
|
6
|
+
sys.exit(main())
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
gyam/30MMCLI.py,sha256=GCHPcFx3z7NuwCO0TjG6-3WZEYFNVX2SImMtCcLUw4k,4004
|
|
2
|
-
gyam/__init__.py,sha256=9ci1ihou4EF-iRfYJxTHM4IFmXdtXiDLmh62Af1p1bk,26
|
|
3
|
-
gyam/gyam.py,sha256=eZhvEjEdDa2Z6kos6pFNF2psQDxLXOEtSr-Hb1oBc_4,4334
|
|
4
|
-
gyam/main_script.py,sha256=eZhvEjEdDa2Z6kos6pFNF2psQDxLXOEtSr-Hb1oBc_4,4334
|
|
5
|
-
giveyouamail-1.0.1.dist-info/METADATA,sha256=uvJ_--2tibBJzFk09_gf1LmuP7NkXX5h4m078RYNDC0,206
|
|
6
|
-
giveyouamail-1.0.1.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
7
|
-
giveyouamail-1.0.1.dist-info/entry_points.txt,sha256=uOLs7uymvTrRJz1O8e6eyWdKVujKNH5ITzRajEpZE9k,47
|
|
8
|
-
giveyouamail-1.0.1.dist-info/top_level.txt,sha256=FtRwkE3gNQ7_pMjYVSxZBSmUpjt1eOwE7An9fdQJ3Es,5
|
|
9
|
-
giveyouamail-1.0.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|