├── LICENSE ├── README.md └── instaboom.py /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 TheFamilyTeam 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | **WARNING: Instagram started to ban fake-bot-accounts, due to this, Instaboom may not work correctly.** 2 | 3 | --------------------------------------------------------------- 4 | # Instaboom 5 | Instagram follower/like bot, creates a new account everytime and follows/likes. 6 | 7 | # Dependencies 8 | * requests 9 | * argparse 10 | * random 11 | * sys 12 | 13 | # Usage 14 | `python instaboom.py -m -u -pi -p -a 15 | ` 16 | 17 | note: you must use the username if you want to bot followers, use the post id instead if you want to bot likes. 18 | 19 | # Modes 20 | * follow 21 | * like 22 | * comment (_not available yet_) 23 | 24 | # Extra 25 | What the hell is a post id? 26 | 27 | 28 | ![post id](https://i.imgur.com/45ly7Kb.png) 29 | 30 | this. 31 | -------------------------------------------------------------------------------- /instaboom.py: -------------------------------------------------------------------------------- 1 | import threading 2 | import argparse 3 | import requests 4 | import random 5 | import time 6 | import sys 7 | 8 | class Instaboom: 9 | s = requests.session() 10 | def __init__(self, proxy): 11 | self.s.headers = { 12 | 'accept-encoding': 'gzip, deflate, br', 13 | 'accept-language': 'en-US,en;q=0.9', 14 | 'Referer': 'https://www.instagram.com', 15 | 'Origin': 'https://www.instagram.com', 16 | 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0_1 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A402 Safari/604.1', 17 | 'Accept': '*/*', 18 | 'x-requested-with': 'XMLHttpRequest', 19 | } 20 | self.s.cookies['ig_cb'] = '1' 21 | if proxy is not None: 22 | proxy = proxy.rstrip().lstrip() 23 | self.s.proxies = {"http": "http://" + proxy, "https":"https://" + proxy, "ftp":"ftp://" + proxy} 24 | f = self.s.get('https://www.instagram.com/web/__mid/') 25 | 26 | def randomInfo(self): 27 | nomi = [ 28 | 'Francesco', 'Leonardo', 'Alessandro', 29 | 'Lorenzo', 'Mattia', 'Andrea', 30 | 'Gabriele', 'Riccardo', 'Matteo', 31 | 'Tommaso', 'Edoardo', 'Federico', 32 | 'Giuseppe', 'Antonio', 'Diego', 'Nicolo\'', 33 | 'Giovanni', 'Samuele', 'Pietro', 34 | 'Marco', 'Filippo', 'Luca', 35 | 'Michele', 'Simone', 'Alessio', 36 | 'Gabriel', 'Emanuele', 'Giulio', 37 | 'Salvatore', 'Vincenzo', 'Jacopo', 38 | 'Manuel', 'Giacomo', 'Gioele', 39 | 'Thomas', 'Daniele', 'Cristian', 40 | 'Elia', 'Samuel', 'Giorgio', 41 | 'Enea', 'Luigi', 'Daniel', 42 | 'Nicola', 'Stefano', 'Domenico', 43 | 'Raffaele', 'Kevin', 'Sofia', 44 | 'Giulia', 'Aurora', 'Alice', 45 | 'Ginevra', 'Emma', 'Giorgia', 46 | 'Greta', 'Martina', 'Beatrice', 47 | 'Anna', 'Chiara', 'Sara', 48 | 'Nicole', 'Ludovica', 'Gaia', 49 | 'Matilde', 'Vittoria', 'Noemi', 50 | 'Francesca', 'Alessia', 'Camilla', 51 | 'Bianca', 'Arianna', 'Rebecca', 52 | 'Elena', 'Viola', 'Mia', 53 | 'Elisa', 'Giada', 'Adele', 54 | 'Marta', 'Isabel', 'Melissa', 55 | 'Carlotta', 'Eleonora', 'Miriam', 56 | 'Emily', 'Irene', 'Margherita', 57 | 'Anita', 'Benedetta','Caterina', 58 | 'Azzurra', 'Eva', 'Rachele', 'Cecilia' 59 | ] 60 | 61 | cognomi = [ 62 | 'Rossi', 'Russo', 'Ferrari', 63 | 'Esposito', 'Bianchi', 'Romano', 64 | 'Colombo', 'Ricci', 'Marino', 65 | 'Greco', 'Bruno', 'Gallo', 66 | 'Conti', 'DeLuca', 'Mancini', 67 | 'Costa', 'Giordano', 'Rizzo', 68 | 'Lombardi', 'Moretti', 'Barbieri', 69 | 'Fontana', 'Santoro', 'Mariani', 70 | 'Rinaldi', 'Caruso', 'Ferrara', 71 | 'Galli', 'Martini', 'Leone', 72 | 'Longo', 'Gentile', 'Martinelli', 73 | 'Vitale', 'Lombardo', 'Serra', 74 | 'Coppola', 'DeSantis', 'Dangelo', 75 | 'Marchetti', 'Parisi', 'Villa', 76 | 'Conte', 'Ferraro', 'Ferri', 77 | 'Fabbri', 'Bianco', 'Marini', 78 | 'Grasso', 'Valentini', 'Messina', 79 | 'Sala', 'DeAngelis', 'Gatti', 80 | 'Pellegrini', 'Palumbo', 'Sanna', 81 | 'Farina', 'Rizzi', 'Monti', 82 | 'Cattaneo', 'Morelli', 'Amato', 83 | 'Silvestri', 'Mazza', 'Testa', 84 | 'Grassi', 'Pellegrino', 'Carbone', 85 | 'Giuliani', 'Benedetti', 'Barone', 86 | 'Rossetti', 'Caputo', 'Montanari', 87 | 'Guerra', 'Palmieri', 'Bernardi', 88 | 'Martino', 'Fiore', 'DeRosa', 89 | 'Ferretti', 'Bellini', 'Basile', 90 | 'Riva', 'Donati', 'Piras', 91 | 'Vitali', 'Battaglia', 'Sartori', 92 | 'Neri', 'Costantini', 'Milani', 93 | 'Pagano', 'Ruggiero', 'Sorrentino', 94 | 'Damico', 'Orlando', 'Damico', 'Negri' 95 | ] 96 | 97 | formati = ['._%s', '.%s', '_%s', '__%s', '._.%s', '_.%s'] 98 | domini = ['gmail.com', 'libero.it', 'alice.it', 'tim.it', 'tiscali.it'] 99 | anni = [str(x) for x in range(2000, 2006)] 100 | nome = random.choice(nomi) 101 | anno = random.choice(anni) 102 | cognome = random.choice(cognomi) 103 | formato = random.choice(formati) 104 | username = '%s%s%s%s' % (nome.lower(), cognome.lower(), str(random.randint(0, 1000)), formato % anno) 105 | email = '%s%s%s@%s' % (nome.lower(), cognome.lower(), str(random.randint(0, 1000)), random.choice(domini)) 106 | password = '%s%s_%s' % (nome, anno[2:], str(random.randint(0, 1000))) 107 | return {"nome": nome, "cognome": cognome, "anno": anno, "username": username, "email": email, "password": password, "nc": "%s %s" % (nome, cognome)} 108 | 109 | def login(self, username, password): 110 | self.s.headers['x-instagram-ajax'] = 'f4c28142cf13' 111 | self.s.headers['x-ig-app-id'] = '936619743392459' 112 | self.s.headers['x-csrftoken'] = self.s.cookies['csrftoken'] 113 | self.s.headers['referer'] = 'https://www.instagram.com/accounts/login/?source=auth_switcher' 114 | self.s.headers['content-type'] = 'application/x-www-form-urlencoded' 115 | data = { 116 | 'username': username, 117 | 'password': password, 118 | 'queryParams': '{"source":"auth_switcher"}', 119 | 'optIntoOneTap': 'true' 120 | } 121 | return self.s.post('https://www.instagram.com/accounts/login/ajax/', data=data).json() 122 | 123 | def register(self, email, username, password, first_name): 124 | self.s.headers['x-instagram-ajax'] = 'f4c28142cf13' 125 | self.s.headers['x-ig-app-id'] = '936619743392459' 126 | self.s.headers['x-csrftoken'] = self.s.cookies['csrftoken'] 127 | self.s.headers['referer'] = 'https://www.instagram.com/accounts/login/?source=auth_switcher' 128 | self.s.headers['content-type'] = 'application/x-www-form-urlencoded' 129 | data = { 130 | 'email': email, 131 | 'password': password, 132 | 'username': username, 133 | 'first_name': first_name, 134 | 'client_id': self.s.cookies['mid'], 135 | 'seamless_login_enabled': '1', 136 | 'gdpr_s': '[0,2,0,null]', 137 | 'tos_version': 'eu', 138 | 'opt_into_one_tap': 'false' 139 | } 140 | return self.s.post('https://www.instagram.com/accounts/web_create_ajax/', data=data).json() 141 | 142 | def follow(self, username): 143 | self.s.headers['x-instagram-ajax'] = 'f4c28142cf13' 144 | self.s.headers['x-ig-app-id'] = '936619743392459' 145 | self.s.headers['x-csrftoken'] = self.s.cookies['csrftoken'] 146 | self.s.headers['referer'] = 'https://www.instagram.com/' + username 147 | self.s.headers['content-type'] = 'application/x-www-form-urlencoded' 148 | r = requests.get('https://instagram.com/' + username).text 149 | userId = r.split('profilePage_')[1].split('"')[0] 150 | flw = self.s.post('https://www.instagram.com/web/friendships/%s/follow/' % userId) 151 | return flw.json() 152 | 153 | def like(self, postId): 154 | self.s.headers['x-instagram-ajax'] = 'f4c28142cf13' 155 | self.s.headers['x-ig-app-id'] = '936619743392459' 156 | self.s.headers['x-csrftoken'] = self.s.cookies['csrftoken'] 157 | self.s.headers['referer'] = 'https://www.instagram.com/p/' + postId 158 | self.s.headers['content-type'] = 'application/x-www-form-urlencoded' 159 | r = requests.get('https://instagram.com/p/' + postId).text 160 | id = r.split(' -u -pi -p -a " % (r, " ".join(sys.argv))) 166 | 167 | def lFollow(acc, i): 168 | d = acc.rstrip().lstrip().split(':') 169 | email = d[0] 170 | password = d[1] 171 | print('[***] Logging in %s...' % acc) 172 | a = i.login(email, password) 173 | if 'authenticated' in a: 174 | if a['authenticated']: 175 | print('[***] Following %s...\n' % args.user) 176 | i.follow(args.user) 177 | elif a['message'] == 'checkpoint_required': 178 | print('[***] Instagram blocked the login, reason: locked account.\n') 179 | elif['showAccountRecoveryModal']: 180 | print('[***] Instagram blocked the login, reason: recovery mode.\n') 181 | else: 182 | print('[***] Instagram blocked the login, reason: wrong email/password.\n') 183 | 184 | def followThread(args): 185 | if args.user: 186 | if not args.acclist: 187 | while True: 188 | if args.proxies: 189 | proxy = random.choice(open(args.proxies, 'r').read().split('\n')) 190 | else: 191 | proxy = None 192 | i = Instaboom(proxy) 193 | data = i.randomInfo() 194 | print('[***] Registering %s (%s)...' % (data['username'], data['nc'])) 195 | a = i.register(data['email'], data['username'], data['password'], data['nc']) 196 | if a['account_created']: 197 | print('[***] Following %s...\n' % args.user) 198 | i.follow(args.user) 199 | else: 200 | print('[***] Instagram blocked the registration, reason: %s.\n' % ', '.join(a['errors'].keys())) 201 | else: 202 | accs = open(args.acclist, 'r').read().splitlines() 203 | for acc in accs: 204 | if args.proxies: 205 | proxy = random.choice(open(args.proxies, 'r').read().split('\n')) 206 | else: 207 | proxy = None 208 | i = Instaboom(proxy) 209 | threading.Thread(target=lFollow, args=(acc, i,),).start() 210 | time.sleep(0.25) 211 | else: 212 | usage("No user was specified") 213 | 214 | def lLike(acc, i): 215 | d = acc.rstrip().lstrip().split(':') 216 | email = d[0] 217 | password = d[1] 218 | print('[***] Logging in %s...' % acc) 219 | a = i.login(email, password) 220 | if 'authenticated' in a: 221 | if a['authenticated']: 222 | print('[***] Liking %s...\n' % args.post) 223 | i.like(args.post) 224 | elif a['message'] == 'checkpoint_required': 225 | print('[***] Instagram blocked the login, reason: locked account.\n') 226 | elif['showAccountRecoveryModal']: 227 | print('[***] Instagram blocked the login, reason: recovery mode.\n') 228 | else: 229 | print('[***] Instagram blocked the login, reason: wrong email/password.\n') 230 | 231 | def likeThread(args): 232 | if args.post: 233 | if not args.acclist: 234 | while True: 235 | if args.proxies: 236 | proxy = random.choice(open(args.proxies, 'r').read().split('\n')) 237 | else: 238 | proxy = None 239 | i = Instaboom(proxy) 240 | data = i.randomInfo() 241 | print('[***] Registering %s (%s)...' % (data['username'], data['nc'])) 242 | a = i.register(data['email'], data['username'], data['password'], data['nc']) 243 | if a['account_created']: 244 | print('[***] Liking %s...\n' % args.post) 245 | i.like(args.post) 246 | else: 247 | print('[***] Instagram blocked the registration, reason: %s.\n' % ', '.join(a['errors'].keys())) 248 | else: 249 | accs = open(args.acclist, 'r').read().splitlines() 250 | for acc in accs: 251 | if args.proxies: 252 | proxy = random.choice(open(args.proxies, 'r').read().split('\n')) 253 | else: 254 | proxy = None 255 | i = Instaboom(proxy) 256 | threading.Thread(target=lLike, args=(acc, i,),).start() 257 | time.sleep(0.25) 258 | else: 259 | usage("No post ID was specified") 260 | 261 | if __name__ == '__main__': 262 | parser = argparse.ArgumentParser(description='Instaboom - Instagram follow bot') 263 | parser.add_argument('-mode', '-m', help='bot mode', action='store') 264 | parser.add_argument('-user', '-u', help='user to follow', action='store') 265 | parser.add_argument('-post', '-pi', help='post id to like', action='store') 266 | parser.add_argument('-proxies', '-p', help='proxy list file', action='store') 267 | parser.add_argument('-acclist', '-a', help='account list fle', action='store') 268 | args = parser.parse_args() 269 | 270 | print(""" 271 | =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 272 | _____ _ _ 273 | |_ _| | | | | 274 | | | _ __ ___| |_ __ _| |__ ___ ___ _ __ ___ 275 | | | | '_ \/ __| __/ _` | '_ \ / _ \ / _ \| '_ ` _ \ 276 | _| |_| | | \__ \ || (_| | |_) | (_) | (_) | | | | | | 277 | |_____|_| |_|___/\__\__,_|_.__/ \___/ \___/|_| |_| |_| 3.0 278 | 279 | =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=""") 280 | print("[i] Created by Neon and TheFamilyTeam") 281 | print("[-] https://github.com/TheFamilyTeam") 282 | print("[-] https://github.com/prefisso") 283 | print("=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=") 284 | 285 | try: 286 | if args.mode is None: 287 | usage("No mode was specified") 288 | elif args.mode == 'follow': 289 | threading.Thread(target=followThread, args=(args,),).start() 290 | elif args.mode == 'like': 291 | threading.Thread(target=likeThread, args=(args,),).start() 292 | else: 293 | usage("Invalid mode") 294 | except Exception as e: 295 | print('[!] Something went wrong: %s.' % e) 296 | 297 | --------------------------------------------------------------------------------