-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmod1.py
More file actions
62 lines (40 loc) · 960 Bytes
/
mod1.py
File metadata and controls
62 lines (40 loc) · 960 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import random
def otp():
x = ""
for i in range(4):
x += str(random.randint(0,9))
return int(x)
def up():
x = random.randint(65,90)
return chr(x)
def sp():
y = random.randint(33,47)
return chr(y)
def lw():
z = random.randint(97,122)
return chr(z)
def di():
a = random.randint(0,9)
return str((a))
def capt(x = 4):
capt = ""
if x < 4:
x = 4
if x > 4:
i = x - 4
for i in range(i):
m = random.choice(["x","y","z","a"])
if m == "x":
capt += up()
if m == "y":
capt += sp()
if m == "z":
capt += lw()
if m == "a":
capt += di()
capt += sp()+lw()+di()+up()
capt()
otp()
def email(x):
if "@" not in x :
return "invalid"