bcpkgfox 0.17.7__py3-none-any.whl → 0.17.9__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 bcpkgfox might be problematic. Click here for more details.
- bcpkgfox/invoke_api.py +29 -3
- {bcpkgfox-0.17.7.dist-info → bcpkgfox-0.17.9.dist-info}/METADATA +1 -1
- {bcpkgfox-0.17.7.dist-info → bcpkgfox-0.17.9.dist-info}/RECORD +6 -6
- {bcpkgfox-0.17.7.dist-info → bcpkgfox-0.17.9.dist-info}/WHEEL +0 -0
- {bcpkgfox-0.17.7.dist-info → bcpkgfox-0.17.9.dist-info}/entry_points.txt +0 -0
- {bcpkgfox-0.17.7.dist-info → bcpkgfox-0.17.9.dist-info}/top_level.txt +0 -0
bcpkgfox/invoke_api.py
CHANGED
|
@@ -149,7 +149,8 @@ def invoke_api_proc(link: str, payload_vars: dict, token: str, method: str, prin
|
|
|
149
149
|
time.sleep(5)
|
|
150
150
|
continue
|
|
151
151
|
|
|
152
|
-
else:
|
|
152
|
+
else:
|
|
153
|
+
raise ValueError("Api proc final falhou")
|
|
153
154
|
|
|
154
155
|
def invoke_api_proc_log(link, id_robo, token):
|
|
155
156
|
import requests
|
|
@@ -253,7 +254,8 @@ def login_2fac(driver, certificate, system, token, code_timeout=60):
|
|
|
253
254
|
time.sleep(5)
|
|
254
255
|
continue
|
|
255
256
|
else:
|
|
256
|
-
|
|
257
|
+
self.driver.quit()
|
|
258
|
+
raise('Todas as tentativas falharam!')
|
|
257
259
|
|
|
258
260
|
def invoke_update_status(self, id):
|
|
259
261
|
|
|
@@ -277,6 +279,7 @@ def login_2fac(driver, certificate, system, token, code_timeout=60):
|
|
|
277
279
|
time.sleep(5)
|
|
278
280
|
continue
|
|
279
281
|
else:
|
|
282
|
+
self.driver.quit()
|
|
280
283
|
raise('Todas as tentativas falharam!')
|
|
281
284
|
|
|
282
285
|
class whoom_codes(login_2fac):
|
|
@@ -322,8 +325,16 @@ def login_2fac(driver, certificate, system, token, code_timeout=60):
|
|
|
322
325
|
|
|
323
326
|
self.driver.get("https://chromewebstore.google.com/detail/whom-gerenciador-de-certi/lnidijeaekolpfeckelhkomndglcglhh")
|
|
324
327
|
|
|
328
|
+
try:
|
|
329
|
+
tools.find_element_with_wait(By.XPATH, "//span[contains(text(), 'no Chrome') or contains(text(), 'Usar') or contains(text(), 'Add to Chrome')]").click()
|
|
330
|
+
|
|
331
|
+
except:
|
|
332
|
+
tools.find_element_with_wait(By.XPATH, "//span[contains(text(), 'do Chrome') or contains(text(), 'Usar') or contains(text(), 'Add to Chrome')]").click()
|
|
333
|
+
pyautogui.press('enter')
|
|
334
|
+
time.sleep(1)
|
|
335
|
+
tools.find_element_with_wait(By.XPATH, "//span[contains(text(), 'no Chrome') or contains(text(), 'Usar') or contains(text(), 'Add to Chrome')]").click()
|
|
336
|
+
|
|
325
337
|
|
|
326
|
-
tools.find_element_with_wait(By.XPATH, "//span[contains(text(), 'no Chrome') or contains(text(), 'Usar') or contains(text(), 'Add to Chrome')]").click()
|
|
327
338
|
time.sleep(5)
|
|
328
339
|
import pygetwindow as gw
|
|
329
340
|
windows = gw.getAllTitles()
|
|
@@ -435,6 +446,7 @@ def login_2fac(driver, certificate, system, token, code_timeout=60):
|
|
|
435
446
|
break
|
|
436
447
|
|
|
437
448
|
if not(code_insertion):
|
|
449
|
+
self.driver.quit()
|
|
438
450
|
raise TimeoutError('Código WHOOM não chegou dentro do timeout estabelecido')
|
|
439
451
|
|
|
440
452
|
def select_system(self):
|
|
@@ -444,6 +456,7 @@ def login_2fac(driver, certificate, system, token, code_timeout=60):
|
|
|
444
456
|
timeout=1).click()
|
|
445
457
|
time.sleep(1)
|
|
446
458
|
self.codes_2_fac()
|
|
459
|
+
self.select_system()
|
|
447
460
|
return
|
|
448
461
|
except:
|
|
449
462
|
pass
|
|
@@ -476,6 +489,7 @@ def login_2fac(driver, certificate, system, token, code_timeout=60):
|
|
|
476
489
|
|
|
477
490
|
if not div_list:
|
|
478
491
|
mostrar_mensagem('Não conseguiu achar o sistema no certificado')
|
|
492
|
+
self.driver.quit()
|
|
479
493
|
raise ValueError('Não conseguiu achar o sistema no certificado')
|
|
480
494
|
|
|
481
495
|
if len(div_list) == 1:
|
|
@@ -491,10 +505,22 @@ def login_2fac(driver, certificate, system, token, code_timeout=60):
|
|
|
491
505
|
|
|
492
506
|
if len(div_list) == 1:
|
|
493
507
|
div_list[0].click()
|
|
508
|
+
elif len(div_list) == 2:
|
|
509
|
+
div_list[0].click()
|
|
494
510
|
else:
|
|
495
511
|
mostrar_mensagem('Mais de um sistema encontrado, verifique o nome do sistema no WHOOM e coloque um nome único na função')
|
|
512
|
+
self.driver.quit()
|
|
496
513
|
raise ValueError('Mais de um sistema encontrado, verifique o nome')
|
|
497
514
|
|
|
515
|
+
try:
|
|
516
|
+
tools.find_element_with_wait(By.XPATH, '//input[@placeholder="Insira aqui o seu email"]',
|
|
517
|
+
timeout=1).click()
|
|
518
|
+
time.sleep(1)
|
|
519
|
+
self.codes_2_fac()
|
|
520
|
+
self.select_system()
|
|
521
|
+
return
|
|
522
|
+
except:
|
|
523
|
+
pass
|
|
498
524
|
|
|
499
525
|
# Verifies if the system was opened
|
|
500
526
|
for _ in range(30):
|
|
@@ -3,10 +3,10 @@ bcpkgfox/clean.py,sha256=80pJDTGmKmPiq73uL1IWopuxqVJF_bj_RVv-njkpl-A,8946
|
|
|
3
3
|
bcpkgfox/cli.py,sha256=E1Yahd8jIjUwxM6EMHveDDne5-fh8QeAvAhyATNatEo,33541
|
|
4
4
|
bcpkgfox/find_elements.py,sha256=oeB-73LqMLoKchozPXuxRkThBju9IgUKqbgU-2AAq0s,23027
|
|
5
5
|
bcpkgfox/get_driver.py,sha256=ohimk9E2hL6T35IXv0XX0uvWDGCUZvZDlPMnuRjV1R0,30490
|
|
6
|
-
bcpkgfox/invoke_api.py,sha256=
|
|
6
|
+
bcpkgfox/invoke_api.py,sha256=2lUVCqPWGAufO5m3HS7_LPvyq7AbmNyaanABxM0licA,21296
|
|
7
7
|
bcpkgfox/system.py,sha256=3lyOWx893T6KiAI-jDv7zAo3oKPf0Q5CLgZ8TeFd0Do,7901
|
|
8
|
-
bcpkgfox-0.17.
|
|
9
|
-
bcpkgfox-0.17.
|
|
10
|
-
bcpkgfox-0.17.
|
|
11
|
-
bcpkgfox-0.17.
|
|
12
|
-
bcpkgfox-0.17.
|
|
8
|
+
bcpkgfox-0.17.9.dist-info/METADATA,sha256=5w-k7X8TKIBRZh_9c6bvcaiAqC2HTG6iFeu8krAkFhw,1893
|
|
9
|
+
bcpkgfox-0.17.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
10
|
+
bcpkgfox-0.17.9.dist-info/entry_points.txt,sha256=qmaEg6K7Y0HOeaFo-G6lf44InGkeVI4I6hqobcY_nns,653
|
|
11
|
+
bcpkgfox-0.17.9.dist-info/top_level.txt,sha256=h01SqyYBEfS72vkRFOlEDZBUSu9pzU0bdX4m9hWNNmw,9
|
|
12
|
+
bcpkgfox-0.17.9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|