forked from Gumbraise/instagram-bomber
-
Notifications
You must be signed in to change notification settings - Fork 1
/
bomber.py
97 lines (88 loc) · 5.06 KB
/
bomber.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
"""
▄████ █ ██ ███▄ ▄███▓ ▄▄▄▄ ██▀███ ▄▄▄ ██▓ ██████ ▓█████
██▒ ▀█▒ ██ ▓██▒▓██▒▀█▀ ██▒▓█████▄ ▓██ ▒ ██▒▒████▄ ▓██▒▒██ ▒ ▓█ ▀
▒██░▄▄▄░▓██ ▒██░▓██ ▓██░▒██▒ ▄██▓██ ░▄█ ▒▒██ ▀█▄ ▒██▒░ ▓██▄ ▒███
░▓█ ██▓▓▓█ ░██░▒██ ▒██ ▒██░█▀ ▒██▀▀█▄ ░██▄▄▄▄██ ░██░ ▒ ██▒▒▓█ ▄
░▒▓███▀▒▒▒█████▓ ▒██▒ ░██▒░▓█ ▀█▓░██▓ ▒██▒ ▓█ ▓██▒░██░▒██████▒▒░▒████▒
░▒ ▒ ░▒▓▒ ▒ ▒ ░ ▒░ ░ ░░▒▓███▀▒░ ▒▓ ░▒▓░ ▒▒ ▓▒█░░▓ ▒ ▒▓▒ ▒ ░░░ ▒░ ░
░ ░ ░░▒░ ░ ░ ░ ░ ░▒░▒ ░ ░▒ ░ ▒░ ▒ ▒▒ ░ ▒ ░░ ░▒ ░ ░ ░ ░ ░
░ ░ ░ ░░░ ░ ░ ░ ░ ░ ░ ░░ ░ ░ ▒ ▒ ░░ ░ ░ ░
░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░
░
"""
try:
from InstagramAPI import InstagramAPI
import requests
import json
import random
import sys
import getpass
while True:
nostop = 0
while True:
accounts = input("Put your Instagram accounts list here (if there is no file just press ENTER): ")
if not accounts:
username = input("Put your IG Username then press ENTER: ")
try:
password = getpass.getpass(prompt="Put your IG Password then press ENTER: ")
except Exception as error:
print("Error:", error)
else:
print("Got Password. Attempting to login.")
api = InstagramAPI(username, password)
api.login()
break
else:
try:
line = random.choice(open(accounts).readlines())
username, password = line.split(':')
print("Username found: ", username)
print("Password found: ", password)
api = InstagramAPI(username, password)
api.login()
break
except:
print("Wrong file")
while True:
print("Would you prefer enter the user ID or the username (bêta)")
if input("UserID = i, Username = o: ") == "o":
user = input("Enter the victim's IG Username: ")
try:
response = requests.get("https://www.instagram.com/" + user + "/?__a=1")
respJSON = response.json()
user_id = str(respJSON['graphql'].get("user").get("id"))
except:
print("Unknown victim's username")
print("Either Instagram API is not corrected or you entered a false username")
exit(0)
else:
while True:
user_id = input("Enter the victim's IG UserID (or press i to get more info about UserID): ")
if isinstance(int(user_id), int) == True:
break
elif user_id == 'i':
print("""To found a IG UserID you have to search https://www.instagram.com/{USERNAME}/?__a=1' and to go to graphql=>user=>id.
The correct id is named id, not fbid.""")
input("Press enter to continue")
else:
print("This IG UserID is unknown.")
while True:
nostop = 0
message = input("Put the message you want the software send and press ENTER: ")
while True:
try:
times = int(input("How many messages do you want to send? "))
break
except:
print("Wrong number")
proxylist = input("Proxy list (TXT): (If you don't have proxy list press ENTER): ")
if accounts:
proxy = random.choice(open(proxylist).readlines())
api.setProxy(proxy)
while times > nostop:
nostop = nostop + 1
api.sendMessage(user_id, message)
print(nostop, ">> Sent to", user_id, ": ", message)
except:
sys.exit(
'\nA critical error happened. Please make sure that you executed all commands properly and relaunch the program.')