-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprojx.py
More file actions
34 lines (24 loc) · 1016 Bytes
/
projx.py
File metadata and controls
34 lines (24 loc) · 1016 Bytes
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
#! usr/bin/python3
from random import choice
from string import ascii_letters, digits # printable for more complex passwd
import re
chars = ascii_letters + digits
word = ''.join(choice(chars) for i in range(12))
red = '\033[91m'
yel = '\033[93m'
blu = '\033[34m'
grn = '\033[32m'
end = '\033[97m'
colors = [red, yel, blu, grn]
first_char = '\033[91m'+word[0]
rest_chars = ''.join(choice(colors) + char for char in word[1:])
final_word = str(first_char) + str(rest_chars) + end
answer = ("".join((final_word[i.end()]) for i in re.finditer(re.escape(red), final_word)))
question = input("\nYou can't STOP me without password. If I say " + final_word\
+ " what would you answer?:\n\n")
if question == answer:
print("\nHow can it be? I am Super Artifical Intelligence, and so far nobody \
passed correct password. World is safe ... for this moment ... . .. .\n")
else:
print("\nHow dare you challenge Super Artifical Intelligence? I rule whole world!\n")
# input("\nPress ENTER to close application")