-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNetTestCrack.py
More file actions
50 lines (40 loc) · 1.49 KB
/
NetTestCrack.py
File metadata and controls
50 lines (40 loc) · 1.49 KB
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
46
47
48
49
50
print("----- NetTestCrack")
encoded_test = list(open(input("Путь до файла теста (.tst): "), "rb").read())
print("\n----- Декодирование")
test = b""
for i in encoded_test:
test += (i ^ 0xBB).to_bytes()
test = test.split(b"\xb6\xb1")
for i in range(len(test)):
test[i] = test[i].decode("windows-1251").split("|")
print("Успешно")
print("\n----- Тест", end = "")
for i in range(len(test) - 1):
print("\n--- Вопрос №" + str(i + 1))
print("Текст: " + test[i][0])
print("Файл картинки: " + test[i][1])
print("Файл звука: " + test[i][2])
print("Тип: ", end = "")
if test[i][3] == "0":
print("Выбрать один ответ")
if test[i][3] == "1":
print("Выбрать все верные")
if test[i][3] == "2":
print("Число")
if test[i][3] == "3":
print("Строка")
if test[i][3] == "4":
print("Варианты ответов")
if test[i][3] == "5":
print("Соответствие")
print("Количество вариантов ответов: " + test[i][4])
for j in range(int(test[i][4])):
print("- Ответ №" + str(j + 1))
print("Текст: " + test[i][j * 2 + 5])
print("Правильность: ", end = "")
if int(test[i][j * 2 + 6]):
print("Верно")
else:
print("Неверно")
print("\n----- Конец")
input("Enter - выход")