-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathenough.py
More file actions
130 lines (126 loc) · 5.13 KB
/
Copy pathenough.py
File metadata and controls
130 lines (126 loc) · 5.13 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
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
from colorama import Fore, Style
from time import sleep
from os import system
from sms import SendSms
servisler_sms = []
for attribute in dir(SendSms):
attribute_value = getattr(SendSms, attribute)
if callable(attribute_value):
if attribute.startswith('__') == False:
servisler_sms.append(attribute)
while 1:
system("cls||clear")
print("""{}
______ _
| ____| | |
| |__ _ __ ___ _ _ __ _| |__
| __| | '_ \ / _ \| | | |/ _` | '_ \
| |____| | | | (_) | |_| | (_| | | | |
|______|_| |_|\___/ \__,_|\__, |_| |_|
__/ |
|___/
Sms: {} {}by {}@tingirifistik\n
""".format(Fore.LIGHTCYAN_EX, len(servisler_sms), Style.RESET_ALL, Fore.LIGHTRED_EX))
try:
menu = (input(Fore.LIGHTMAGENTA_EX + " 1- SMS Gönder\n\n 2- Çıkış\n\n" + Fore.LIGHTYELLOW_EX + " Seçim: "))
if menu == "":
continue
menu = int(menu)
except ValueError:
system("cls||clear")
print(Fore.LIGHTRED_EX + "Hatalı giriş yaptın. Tekrar deneyiniz.")
sleep(3)
continue
if menu == 1:
system("cls||clear")
print(Fore.LIGHTYELLOW_EX + "Telefon numarasını başında '+90' olmadan yazınız (Birden çoksa 'enter' tuşuna basınız): "+ Fore.LIGHTGREEN_EX, end="")
tel_no = input()
tel_liste = []
if tel_no == "":
system("cls||clear")
print(Fore.LIGHTYELLOW_EX + "Telefon numaralarının kayıtlı olduğu dosyanın dizinini yazınız: "+ Fore.LIGHTGREEN_EX, end="")
dizin = input()
try:
with open(dizin, "r", encoding="utf-8") as f:
for i in f.read().strip().split("\n"):
if len(i) == 10:
tel_liste.append(i)
sonsuz = ""
except FileNotFoundError:
system("cls||clear")
print(Fore.LIGHTRED_EX + "Hatalı dosya dizini. Tekrar deneyiniz.")
sleep(3)
continue
else:
try:
int(tel_no)
if len(tel_no) != 10:
raise ValueError
tel_liste.append(tel_no)
sonsuz = "(Sonsuz ise 'enter' tuşuna basınız)"
except ValueError:
system("cls||clear")
print(Fore.LIGHTRED_EX + "Hatalı telefon numarası. Tekrar deneyiniz.")
sleep(3)
continue
system("cls||clear")
try:
print(Fore.LIGHTYELLOW_EX + "Mail adresi (Bilmiyorsanız 'enter' tuşuna basın): "+ Fore.LIGHTGREEN_EX, end="")
mail = input()
if ("@" not in mail or ".com" not in mail) and mail != "":
raise
except:
system("cls||clear")
print(Fore.LIGHTRED_EX + "Hatalı mail adresi. Tekrar deneyiniz.")
sleep(3)
continue
system("cls||clear")
try:
print(Fore.LIGHTYELLOW_EX + f"Kaç adet SMS göndermek istiyorsun {sonsuz}: "+ Fore.LIGHTGREEN_EX, end="")
kere = input()
if kere:
kere = int(kere)
else:
kere = None
except ValueError:
system("cls||clear")
print(Fore.LIGHTRED_EX + "Hatalı giriş yaptın. Tekrar deneyiniz.")
sleep(3)
continue
system("cls||clear")
try:
print(Fore.LIGHTYELLOW_EX + "Kaç saniye aralıkla göndermek istiyorsun: "+ Fore.LIGHTGREEN_EX, end="")
aralik = int(input())
except ValueError:
system("cls||clear")
print(Fore.LIGHTRED_EX + "Hatalı giriş yaptın. Tekrar deneyiniz.")
sleep(3)
continue
system("cls||clear")
if kere is None:
sms = SendSms(tel_no, mail)
while True:
for attribute in dir(SendSms):
attribute_value = getattr(SendSms, attribute)
if callable(attribute_value):
if attribute.startswith('__') == False:
exec("sms."+attribute+"()")
sleep(aralik)
for i in tel_liste:
sms = SendSms(i, mail)
if isinstance(kere, int):
while sms.adet < kere:
for attribute in dir(SendSms):
attribute_value = getattr(SendSms, attribute)
if callable(attribute_value):
if attribute.startswith('__') == False:
if sms.adet == kere:
break
exec("sms."+attribute+"()")
sleep(aralik)
print(Fore.LIGHTRED_EX + "\nMenüye dönmek için 'enter' tuşuna basınız..")
input()
elif menu == 2:
system("cls||clear")
print(Fore.LIGHTRED_EX + "Çıkış yapılıyor...")
break