-
Notifications
You must be signed in to change notification settings - Fork 201
/
bot.py
139 lines (114 loc) · 3.9 KB
/
bot.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
139
# coding=utf-8
#!/usr/bin/env python3
"""
Before changing the program and publishing it somewhere, please
Please note that this program is under GPLv3 license.
More information:
https://tr.wikipedia.org/wiki/gnu_genel_kamu_lisans%c4%b1
https://www.gnu.org/licenses/quick-guide-gplv3.html
"""
__author__ = "Marwan 007 : @mrwn.007"
__license__ = "GPLv3"
__version__ = "0.1"
__status__ = "being developed"
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 into the Account!")
client = InstaClient(
loginuser,
loginpass,
proxy["ip"],
proxy["port"]
)
else:
PrintStatus("[" + loginuser + "]", "Logging into the Account!")
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 into the Account!")
client = InstaClient(
user["user"],
user["password"],
proxy["ip"],
proxy["port"]
)
else:
proxy = choice(PROXIES)
PrintStatus("[" + user["user"] + "]", "Logging into the Account!")
client = InstaClient(
user["user"],
user["password"],
None,
None
)
client.Connect()
client.Login()
client.Spam(userid, username, reasonid)
print("")
if __name__ == "__main__":
PrintBanner()
PrintStatus("Loading users!")
USERS = LoadUsers("./users.txt")
PrintStatus("Loading Proxes!")
PROXIES = LoadProxies("./proxy.txt")
print("")
username = GetInput("The account username you want to complain about:")
userid = GetInput("The account number you want to complain about:")
useproxy = GetInput("Do you want to use proxy? [Yes No]:")
if (useproxy == "Yes"):
useproxy = True
elif (useproxy == "No"):
useproxy = False
else:
PrintFatalError("Please just enter 'Yes' or 'No'!")
exit(0)
usemultithread = GetInput("Do you want to use multithreading? [Yes / No] (Do not use this feature if you have too many users or if your computer is slow!):")
if (usemultithread == "Yes"):
usemultithread = True
elif (usemultithread == "No"):
usemultithread = False
else:
PrintFatalError("Please just enter 'Yes' or 'No'!")
exit(0)
PrintChoices()
reasonid = GetInput("Please select one of the reasons for the above complaint (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()