-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.py
45 lines (42 loc) · 1.19 KB
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import time
import sys
import random
import zipfile
from prettytable import PrettyTable
def test(total: int = 10, sec: float = 0.2):
idx = 0
index = 0
pointer_list = list("|/-\|")
while index < total:
if idx == len(pointer_list):
idx = 0
pointer = pointer_list[idx]
texts = f"\r[{pointer}] Loading ..."
sys.stdout.write(texts)
time.sleep(sec)
index += 1
idx += 1
tables = PrettyTable(["#", "X", "Y"])
for _ in range(100):
x = random.randint(10, 100)
y = random.randint(10, 300)
tables.add_row([str(_), str(x), str(y)])
print (tables)
# start_time = time.time()
# with open("data/wordlist/test1.txt", "r") as File:
# passwords = File.read().splitlines()
# i = 0
# zipext = zipfile.ZipFile("data/brutezip/test.zip")
# files = zipext.filelist[0]
# filename = files.filename
# for passw in passwords:
# i += 1
# try:
# zipext.read(files, pwd=passw.encode())
# x = zipext.filelist[0]
# print()
# print (x.file_size)
# print (f"Test ok -> {passw} on time {time.time() - start_time}s")
# break
# except:
# print (f"Test {i}/{len(passwords)}", end="\r")