forked from rbeat/instaspamv2.1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstaspam.py
138 lines (113 loc) · 3.89 KB
/
instaspam.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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# coding=utf-8
#!/usr/bin/env python3
"""
Before changing the program and posting it somewhere, please
Please note that this program is under the GPLv3 license.
More information:
https://www.gnu.org/licenses/quick-guide-gplv3.html
"""
__author__ = "Hichigo TurkHackTeam"
__license__ = "GPLv3"
__version__ = "2.1.0"
__status__ = "WIP"
from time import time, sleep
from random import choice
from multiprocessing import Process
from libs.utils import CheckPublicIP, IsProxyWorking
from libs.utils import PrintStatus, PrintSuccess, PrintError
from libs.utils import PrintBanner, GetInput, PrintFatalError
from libs.utils import LoadUsers, LoadProxies, PrintChoices
from libs.instaclient import InstaClient
USERS = []
PROXIES = []
def MultiThread(username, userid, loginuser, loginpass, proxy, reasonid):
client = None
if (proxy != None):
PrintStatus("[" + loginuser + "]", "Logging in . . .")
client = InstaClient(
loginuser,
loginpass,
proxy["ip"],
proxy["port"]
)
else:
PrintStatus("[" + loginuser + "]", "Logging in w/o proxy . . .")
client = InstaClient(
loginuser,
loginpass,
None,
None
)
client.Connect()
client.Login()
client.Spam(userid, username, reasonid)
print("")
def NoMultiThread():
for user in USERS:
client = None
if (useproxy):
proxy = choice(PROXIES)
PrintStatus("[" + user["user"] + "]", "Logging in . . .")
client = InstaClient(
user["user"],
user["password"],
proxy["ip"],
proxy["port"]
)
else:
proxy = choice(PROXIES)
PrintStatus("[" + user["user"] + "]", "Logging in w/o proxy . . .")
client = InstaClient(
user["user"],
user["password"],
None,
None
)
client.Connect()
client.Login()
client.Spam(userid, username, reasonid)
print("")
if __name__ == "__main__":
PrintBanner()
PrintStatus("Users are being loaded . . .")
USERS = LoadUsers("./kullanicilar.txt")
PrintStatus("Proxies are being loaded . . .")
PROXIES = LoadProxies("./proxyler.txt")
print("")
username = GetInput("Username of the account you want to report:")
userid = GetInput("Account number you want to report:")
useproxy = GetInput("Do you want to use a proxy? [y/n]:")
if (useproxy == "y" || useproxy == "Y"):
useproxy = True
elif (useproxy == "n" || useproxy == "N"):
useproxy = False
else:
PrintFatalError("Please just enter 'y' or 'n'!")
exit(0)
usemultithread = GetInput("Do you want to use multithreading? [y/n] (Don't use this feature if you have a lot of users or your computer is slow!):")
if (usemultithread == "y" || usemultithread == "Y"):
usemultithread = True
elif (usemultithread == "n" || usemultithread == "N"):
usemultithread = False
else:
PrintFatalError("Please just enter 'y' or 'n'!")
exit(0)
PrintChoices()
reasonid = GetInput("Please select one of the above complaint reasons (ex: 1 for spam):")
print("")
PrintStatus("Starting!")
print("")
if (usemultithread == False):
NoMultiThread()
else:
for user in USERS:
p = Process(target=MultiThread,
args=(username,
userid,
user["user"],
user["password"],
None if useproxy == False else choice(PROXIES),
reasonid
)
)
p.start()