-
Notifications
You must be signed in to change notification settings - Fork 0
/
recharge.py
100 lines (91 loc) · 3.69 KB
/
recharge.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# Library
import random as rd
from time import sleep as sp
from os import system as UI
# Welcome Message
UI("clear")
print("\n\n\n\n")
before_starting = input("\033[;31;mThis tool was developed for protection only\nI am not responsible for anyone misusing it\nand it is open source\033[;37;m ")
UI("clear")
print("\n\n\n\n")
num_banner = rd.randint(1,10)
UI(f"cat banner/banner{num_banner}.txt")
# The user enters the slide type
print(f"\n\n\n\033[;32;mChoose the type of chip\naccording to the number corresponding to it")
print(f"\n\033[;31;m[\033[;37;m1\033[;31;m] \033[;35;mZain Iraq")
print(f"\n\033[;31;m[\033[;37;m2\033[;31;m] \033[;31;mAsiacell")
print(f"\n\033[;31;m[\033[;37;m3\033[;31;m] \033[;34;mKorek Telecom")
print(f"\n\033[;31;m[\033[;37;m99\033[;31;m] \033[;31;m HELP")
print(f"\n\033[;31;m[\033[;37;m00\033[;31;m] \033[;37;m EXIT")
enter = True
name_card = ""
while enter:
try:
name_card = float(input("\033[;32;m|\n|\n---->\033[;35;m"))
enter = False
except ValueError:
print("Invalid entry (Enter a valid number)!!")
enter = True
if name_card == 1:
enter = False
elif name_card == 2:
enter = False
elif name_card == 3:
enter = False
elif name_card == 00:
exit()
elif name_card == 99:
print("\033[;37;m")
UI("cat README.md")
enter = True
else:
enter = True
if enter == True and name_card == 99:
print("")
elif enter == True:
print("\033[;31;mInvalid entry!!!\033[;37;m")
else:
print("saved")
# The user enters the number of tokens required
print("\033[;32;mEnter the number of codes \033[;31;m[ex:100]")
enter = True
cods = ""
while enter:
try:
cods = float(input("\033[;31m|\n---->\033[;35;m"))
enter = False
except ValueError:
print("Invalid entry (Enter a valid number)!!")
enter = True
if cods == 0:
print("\033[;31;mYou cannot enter a zero here")
enter = True
else:
print("")
start = 1
# Random generation phase
if name_card == 1: # Export Zain Iraq codes
enter = input("\033[;35;mA zain Iraq\033[;33;m will be generated press Enter to continue ")
while start <= cods:
cod = rd.randint(1000000000000000,9999999999999999) # 16 numbers
print(f"\033[;31;m[{start}] ---> \033[;33;m *101#{cod}# \033[;32;m Try this !!!")
start = start + 1 # Add the number "1" each time until the required limit is reached
sp(1)
elif name_card == 2: # Export Asiacell codes
enter = input("\033[;31;mA Asiacell \033[;33;mwill be generated press Enter to continue ")
while start <= cods:
cod = rd.randint(10000000000000,99999999999999) # number generation code
print(f"\033[;31;m[{start}] ---> \033[;33;m*133*{cod}# \033[;32;m Try this !!!") # Pre-selected code display message
start = start + 1 # Add the number "1" each time until the required limit is reached
sp(1) # Take a little break to get the text out elegantly
elif name_card == 3: # Export Korek Telecom codes
enter = input("\033[;34;mA Korek Telecom \033[;33;m will be generated press Enter to continue ")
while start <= cods:
cod = rd.randint(10000000000000,99999999999999) # number generation code
print(f"\033[;31;m[{start}] --->\033[;33;m *221*{cod}# \033[;32;m Try this !!!") # Pre-selected c>
start = start + 1 # Add the number "1" each time until the required limit i>
sp(1) # Take a little break to get the text out elegantly
else:
print("An error occurred in one of your inputs, restart the tool\nmake sure that the correct entries are made")
# Farewell message
print(f"\033[;32;mdone !!!\033[;37;m") # Here the farewell message appears