-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathinstagram-reporter.py
152 lines (121 loc) · 4.38 KB
/
instagram-reporter.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
140
141
142
143
144
145
146
147
148
149
150
151
152
# coding=utf-8
#!/usr/bin/env python3
from libs.check_modules import check_modules
from sys import exit
from os import _exit
check_modules()
from os import path
from libs.logo import print_logo
from libs.utils import print_success
from libs.utils import print_error
from libs.utils import ask_question
from libs.utils import print_status
from libs.utils import parse_proxy_file
from libs.proxy_harvester import find_proxies
from libs.attack import report_profile_attack
from libs.attack import report_video_attack
from multiprocessing import Process
from colorama import Fore, Back, Style
def chunks(lst, n):
"""Yield successive n-sized chunks from lst."""
for i in range(0, len(lst), n):
yield lst[i:i + n]
def profile_attack_process(username, proxy_list):
if (len(proxy_list) == 0):
for _ in range(10):
report_profile_attack(username, None)
return
for proxy in proxy_list:
report_profile_attack(username, proxy)
def video_attack_process(video_url, proxy_list):
if (len(proxy_list) == 0):
for _ in range(10):
report_video_attack(video_url, None)
return
for proxy in proxy_list:
report_video_attack(video_url, proxy)
def video_attack(proxies):
video_url = ask_question("Enter the link of the video you want to report")
print(Style.RESET_ALL)
if (len(proxies) == 0):
for k in range(5):
p = Process(target=video_attack_process, args=(video_url, [],))
p.start()
print_status(str(k + 1) + ". Transaction Opened!")
if (k == 5): print()
return
chunk = list(chunks(proxies, 10))
print("")
print_status("Video complaint attack is starting!\n")
i = 1
for proxy_list in chunk:
p = Process(target=video_attack_process, args=(video_url, proxy_list,))
p.start()
print_status(str(i) + ". Transaction Opened!")
if (k == 5): print()
i = i + 1
def profile_attack(proxies):
username = ask_question("Enter the username of the person you want to report")
print(Style.RESET_ALL)
if (len(proxies) == 0):
for k in range(5):
p = Process(target=profile_attack_process, args=(username, [],))
p.start()
print_status(str(k + 1) + ". Transaction Opened!")
return
chunk = list(chunks(proxies, 10))
print("")
print_status("Profile complaint attack is starting!\n")
i = 1
for proxy_list in chunk:
p = Process(target=profile_attack_process, args=(username, proxy_list,))
p.start()
print_status(str(i) + ". Transaction Opened!")
if (k == 5): print()
i = i + 1
def main():
print_success("Modules loaded!\n")
ret = ask_question("Would you like to use a proxy? [Y/N]")
proxies = []
if (ret == "Y" or ret == "y"):
ret = ask_question("Would you like to collect your proxies from the internet? [Y/N]")
if (ret == "Y" or ret == "y"):
print_status("Gathering proxy from the Internet! This may take a while.\n")
proxies = find_proxies()
elif (ret == "N" or ret == "n"):
print_status("Please have a maximum of 50 proxies in a file!")
file_path = ask_question("Enter the path to your proxy list")
proxies = parse_proxy_file(file_path)
else:
print_error("Answer not understood, exiting!")
exit()
print_success(str(len(proxies)) + " Number of proxies found!\n")
elif (ret == "N" or ret == "n"):
pass
else:
print_error("Answer not understood, exiting!")
exit()
print("")
print_status("1 - Report the profile.")
print_status("2 - Report a video.")
report_choice = ask_question("Please select the complaint method")
print("")
if (report_choice.isdigit() == False):
print_error("The answer is not understood.")
exit(0)
if (int(report_choice) > 2 or int(report_choice) == 0):
print_error("The answer is not understood..")
exit(0)
if (int(report_choice) == 1):
profile_attack(proxies)
elif (int(report_choice) == 2):
video_attack(proxies)
if __name__ == "__main__":
print_logo()
try:
main()
print(Style.RESET_ALL)
except KeyboardInterrupt:
print("\n\n" + Fore.RED + "[ * ] The program is closing!")
print(Style.RESET_ALL)
_exit(0)