simplex 1.2.24__py3-none-any.whl → 1.2.26__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.
Potentially problematic release.
This version of simplex might be problematic. Click here for more details.
- simplex/cli.py +7 -11
- simplex/simplex.py +4 -3
- {simplex-1.2.24.dist-info → simplex-1.2.26.dist-info}/METADATA +1 -1
- simplex-1.2.26.dist-info/RECORD +11 -0
- simplex-1.2.24.dist-info/RECORD +0 -11
- {simplex-1.2.24.dist-info → simplex-1.2.26.dist-info}/LICENSE +0 -0
- {simplex-1.2.24.dist-info → simplex-1.2.26.dist-info}/WHEEL +0 -0
- {simplex-1.2.24.dist-info → simplex-1.2.26.dist-info}/entry_points.txt +0 -0
- {simplex-1.2.24.dist-info → simplex-1.2.26.dist-info}/top_level.txt +0 -0
simplex/cli.py
CHANGED
|
@@ -47,7 +47,8 @@ def run(directory):
|
|
|
47
47
|
|
|
48
48
|
@cli.command()
|
|
49
49
|
@click.argument('website')
|
|
50
|
-
|
|
50
|
+
@click.option('--proxies', type=bool, default=True, help='Enable proxy support (default: True)')
|
|
51
|
+
def login(website, proxies):
|
|
51
52
|
"""Capture login session for a website"""
|
|
52
53
|
try:
|
|
53
54
|
# Initialize Simplex with API key from environment
|
|
@@ -62,18 +63,13 @@ def login(website):
|
|
|
62
63
|
website = 'https://' + website
|
|
63
64
|
|
|
64
65
|
animated_print(f"[SIMPLEX] Creating login session for {website}")
|
|
65
|
-
|
|
66
|
+
login_session_url = simplex.create_login_session(website, proxies=proxies)
|
|
66
67
|
|
|
67
|
-
if
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
if login_url:
|
|
71
|
-
animated_print("[SIMPLEX] Opening login page in your browser")
|
|
72
|
-
webbrowser.open_new_tab(login_url)
|
|
73
|
-
else:
|
|
74
|
-
print(f"{Fore.YELLOW}[SIMPLEX] Warning: No login URL returned from the server{Style.RESET_ALL}")
|
|
68
|
+
if login_session_url:
|
|
69
|
+
animated_print("[SIMPLEX] Opening login page in your browser")
|
|
70
|
+
webbrowser.open_new_tab(login_session_url)
|
|
75
71
|
else:
|
|
76
|
-
print(f"{Fore.
|
|
72
|
+
print(f"{Fore.YELLOW}[SIMPLEX] Warning: No login URL returned from the server{Style.RESET_ALL}")
|
|
77
73
|
except Exception as e:
|
|
78
74
|
raise click.ClickException(str(e))
|
|
79
75
|
finally:
|
simplex/simplex.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import requests
|
|
2
2
|
import atexit
|
|
3
|
-
|
|
3
|
+
from typing import Optional
|
|
4
4
|
BASE_URL = "https://api.simplex.sh"
|
|
5
5
|
|
|
6
6
|
import json
|
|
@@ -22,6 +22,7 @@ class Simplex:
|
|
|
22
22
|
data={'session_id': self.session_id}
|
|
23
23
|
)
|
|
24
24
|
self.session_id = None
|
|
25
|
+
|
|
25
26
|
if response.json()["succeeded"]:
|
|
26
27
|
return
|
|
27
28
|
else:
|
|
@@ -261,13 +262,13 @@ class Simplex:
|
|
|
261
262
|
else:
|
|
262
263
|
raise ValueError(f"Failed to wait: {response.json()['error']}")
|
|
263
264
|
|
|
264
|
-
def create_login_session(self, url: str):
|
|
265
|
+
def create_login_session(self, url: str, proxies: Optional[bool] = True):
|
|
265
266
|
response = requests.post(
|
|
266
267
|
f"{BASE_URL}/create_login_session",
|
|
267
268
|
headers={
|
|
268
269
|
'x-api-key': self.api_key
|
|
269
270
|
},
|
|
270
|
-
data={'url': url}
|
|
271
|
+
data={'url': url, 'proxies': proxies}
|
|
271
272
|
)
|
|
272
273
|
if response.json()["succeeded"]:
|
|
273
274
|
return response.json()["login_session_url"]
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
simplex/__init__.py,sha256=L_5i__xt_ZDkr6e-Wx9cr84t9sXpioOT7j01NJYJCTE,75
|
|
2
|
+
simplex/cli.py,sha256=zRf59YFwDg3mrPeAuYh6pvOidRLiKkQ_NdYVP2XAXTY,2481
|
|
3
|
+
simplex/simplex.py,sha256=V41daEs5y0LwNosl_xw8gMrhssn420C5e-9HZ_s6Euk,12378
|
|
4
|
+
simplex/deploy/__init__.py,sha256=_JQ81F_Nu7hSAfMA691gzs6a4-8oZ-buJ9h3Au12BKw,96
|
|
5
|
+
simplex/deploy/push.py,sha256=hRAbtFZaECKnBljaOLQ5nzJ6hk7tZgc1c7QdgxKQFoY,6123
|
|
6
|
+
simplex-1.2.26.dist-info/LICENSE,sha256=Xh0SJjYZfNI71pCNMB40aKlBLLuOB0blx5xkTtufFNQ,1075
|
|
7
|
+
simplex-1.2.26.dist-info/METADATA,sha256=Yvcs_Ewct37BnfWQhzRkdwJD2-2nT-okg6K77faGCPY,938
|
|
8
|
+
simplex-1.2.26.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
9
|
+
simplex-1.2.26.dist-info/entry_points.txt,sha256=3veL2w3c5vxb3dm8I_M8Fs-370n1ZnvD8uu1nSsL7z8,45
|
|
10
|
+
simplex-1.2.26.dist-info/top_level.txt,sha256=cbMH1bYpN0A3gP-ecibPRHasHoqB-01T_2BUFS8p0CE,8
|
|
11
|
+
simplex-1.2.26.dist-info/RECORD,,
|
simplex-1.2.24.dist-info/RECORD
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
simplex/__init__.py,sha256=L_5i__xt_ZDkr6e-Wx9cr84t9sXpioOT7j01NJYJCTE,75
|
|
2
|
-
simplex/cli.py,sha256=qzhrD9vMOZUImjWG9rF7NIkEtugEW959esQDdscNKZk,2642
|
|
3
|
-
simplex/simplex.py,sha256=qY5CpYZvZfbyIgtjBUrDl_sUfv2Ez4w2slqvNDMeSv0,12298
|
|
4
|
-
simplex/deploy/__init__.py,sha256=_JQ81F_Nu7hSAfMA691gzs6a4-8oZ-buJ9h3Au12BKw,96
|
|
5
|
-
simplex/deploy/push.py,sha256=hRAbtFZaECKnBljaOLQ5nzJ6hk7tZgc1c7QdgxKQFoY,6123
|
|
6
|
-
simplex-1.2.24.dist-info/LICENSE,sha256=Xh0SJjYZfNI71pCNMB40aKlBLLuOB0blx5xkTtufFNQ,1075
|
|
7
|
-
simplex-1.2.24.dist-info/METADATA,sha256=PGeHxHrtRlyK1HrDRWTVntU_wrrs4xUcbmsizGyamTA,938
|
|
8
|
-
simplex-1.2.24.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
9
|
-
simplex-1.2.24.dist-info/entry_points.txt,sha256=3veL2w3c5vxb3dm8I_M8Fs-370n1ZnvD8uu1nSsL7z8,45
|
|
10
|
-
simplex-1.2.24.dist-info/top_level.txt,sha256=cbMH1bYpN0A3gP-ecibPRHasHoqB-01T_2BUFS8p0CE,8
|
|
11
|
-
simplex-1.2.24.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|