-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.py
106 lines (80 loc) · 2.61 KB
/
main.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
100
101
102
103
104
105
106
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# Author: Rvi
##IMP
#This Script Only Will Work with Iran(+98) Phone Numbers Only
## Apis.JSON FORMAT:
# { URL: [ METHOD , PAYLOAD , RETRY , exRESPONSE , HEADER] }
### HEDAER can be null ###
### $PHONE can Be in headers too ###
### $PHONE allways starts with 9 ###
from src.spammer import Spammer
from colorama import Fore, Style
import json
import sys
import time
RETRY = True
def logo():
print(Fore.YELLOW, end="")
print("\n ___ __ __ ___ ____ __ __ __ \n/ __)( \/ )/ __)( _ \ /__\ ( \/ )\n\__ \ ) ( \__ \ )___//(__)\ ) ( \n(___/(_/\/\_)(___/(__) (__)(__)(_/\/\_)", end="")
print(Style.RESET_ALL, end="")
print("\tby RVI", end="")
def status(v):
if v == False:
return "Off"
else: return "On"
def ifTry():
ans = str(input("Do you want to continue?(N, Y) "))
if ans in ("N", "n", "NO"):
print("By :)")
sys.exit()
elif ans == "":
print("No command received")
sys.exit()
def get_number():
phone_number = str(input("Enter your target PhoneNumber: "))
if len(phone_number) <= 1:
print("No number entered. Please try again")
ifTry()
return get_number()
elif len(phone_number) <= 9:
print("The entered number is not correct")
ifTry()
return get_number()
return phone_number
def get_other():
try:
count = int(input("How many time do you want to ReSpam (default is 1): "))
except:
count = 1
delay = 1
if count > 1:
try:
delay = int(input("How Much Delay(sleep) between Spams (default is 180Sec)? ", ))
except:
delay = 180
doLog = str(input("Do You Need Logs For All SMSes?:(Y, N) "))
if doLog in ("", "Y", "y", "yes"): doLog = True
else: doLog = False
return count , delay, doLog
def main():
logo()
urls = json.load(open("src/apis.json"))
print("\n\n")
print(f"{Fore.BLUE}{len(urls)}{Style.RESET_ALL} Urls Loaded from apis.json")
print(f"Request retry is {Fore.BLUE}{status(RETRY)}{Style.RESET_ALL}")
print("\n")
num = get_number()
reSpamCount, reSpamDelay, smsLogger = get_other()
if reSpamCount > 1:
counter = 0
for i in range(reSpamCount):
Spammer(num, logger=smsLogger)
counter+=1
if counter >= reSpamCount:
break
time.sleep(reSpamDelay)
else:
Spammer(num, logger=smsLogger)
if __name__=="__main__":
main()