Skip to content

Instantly share code, notes, and snippets.

View Tatuck's full-sized avatar
💠
:D

Tatuck

💠
:D
View GitHub Profile
@Tatuck
Tatuck / requestsDoSAttack.py
Created May 15, 2021 14:24
DoS Attack for testing a lot of requests on your OWN server or on a server which you have permission to test this on. PLEASE be careful and don't use this on a server other than your own, look at the laws of your country to see in which cases this may be legal. I am not resposible on the use of this program. This is only for testing propouses.
#Coded By Tatuck :D
from urllib import request
import threading
import sys
import urllib
import random
threadsQuantity = 100
@Tatuck
Tatuck / keys2value.py
Last active February 14, 2021 20:33
Swap the keys of your json file with the values.
# Coded by Tatuck :D
# USAGE: python keys2value.py yourJSON.json yourJSONOUT.json
import json
import sys
jsonFile = open(sys.argv[1],"r")
jsonLoad = json.loads(jsonFile.read())
jsonInverted = {value:key for key, value in jsonLoad.items()}
# Con este código puedes usar el comando !escribir "buenos días" para que el bot escriba "buenos días" en el canal donde haya sido usado
# Librerías
import discord
from discord.ext import commands
client = commands.Bot(command_prefix="!") # Define el cliente de Discord, llamándole cuando se encuentre un mensaje en el que alguien ha escrito "!" delante de él. Como un comando, ejemplo !help
@client.command() # Le dice a la librería de Discord que trate la siguiente línea (una función) como un comando por ejemplo, le manda el contexto.
async def escribir(ctx, texto="VALOR PREDETERMINADO"): # Crea la función (un comando) con una entrada de usuario, en este caso un texto, si no se escibe nada en ese campo, escribe "VALOR PREDETERMINADO"
await ctx.send(texto) # CTX = Contexto de cuándo ha sido usado el comando