import discord # Discord'u import ediyoruz. from discord.ext import commands # Discord komut eklentisini import ediyoruz. import os TOKEN = "MTA4Mzg3MDEwODI3NzAxODcwNQ.G_bNOd.F9ON-F7Zv6R_KY0yYDUTIMHGk7G3z6fnKTowhc" gif = "https://1.bp.blogspot.com/-9IRQUi8CntU/XdPTGdVLJsI/AAAAAAAADf8/GSMBHPw5EyE27kMFADD5c0day7k2yb3gQCLcBGAsYHQ/s1600/demo.gif" intents = discord.Intents.all() client = discord.Client(intents=intents) @client.event async def onready(): activity = discord.Activity(type=discord.ActivityType.playing, name="discord:philosopher*#1000") await client.change_presence(activity=activity) print('Sql açıklarını emmeye hazırım!') @client.event async def on_message(message): if message.author == client.user: return if str(message.content).startswith('*sqlmap') == True: sqlmap_default = message.content sqlmap_orj = sqlmap_default.replace("*sqlmap","") embed=discord.Embed(title="SqlMap @philosopher*#1000", description=(f'`sqlmap {sqlmap_orj} --batch --answers="question=y"` kodunu çalıştırıyorum...```'), color=0x001eff) embed.set_thumbnail(url=gif) embedim = await message.channel.send(embed=embed) if 'u' in sqlmap_orj: output = os.popen(f'sqlmap {sqlmap_orj} --batch --answers="question=y"').read() else: output = os.popen(f'sqlmap -u {sqlmap_orj} --batch --answers="question=y"').read() await embedim.delete() embed2 = discord.Embed(title="SqlMap @philosopher*#1000", description=(f"**Komut çalıştırıldı**:"), color=0x001eff) embed2.set_thumbnail(url="https://i.stack.imgur.com/cOxBL.gif") await message.channel.send(embed=embed2) if len(output) <= 2000: await message.channel.send(f'```{output}```') await message.channel.send(f'Sonuçlar ulaştırıldı lütfen buraya bakınız!\n{message.author.mention}') else: myfile = open("garel-sqlmap.txt", "w") myfile.write(output) myfile.close() file_to_send = discord.File(f"garel-sqlmap.txt") await message.channel.send(file=file_to_send) elif message.content == '*help': await message.channel.send(f"Kullanımım normal 'sqlmap' toolundan hiçbir farkı yok \ntek yapman gereken beni çalıştırırken ```*sqlmap``` diye başlatman.\nhttps://gelecegiyazanlar.turkcell.com.tr/blog/sqlmap-nedir-nasil-kullanilir\nhttps://www.netsparker.com.tr/blog/web-guvenligi/ileri-seviye-sqlmap-kullanimi/\n{message.author.mention}") else: await message.channel.send(f"Geçerli komut yazınız!\nYardım için ' *help ' yazınız.\n{message.author.mention}") client.run("MTA4Mzg3MDEwODI3NzAxODcwNQ.G_bNOd.F9ON-F7Zv6R_KY0yYDUTIMHGk7G3z6fnKTowhc")