Skip to content

Instantly share code, notes, and snippets.

@andrewpisula
Created April 23, 2020 16:10
Show Gist options
  • Save andrewpisula/3693d70cca24991f650653bd4bb33f84 to your computer and use it in GitHub Desktop.
Save andrewpisula/3693d70cca24991f650653bd4bb33f84 to your computer and use it in GitHub Desktop.
A simple exploit that prints to the developer console in ROBLOX, written in C++.
// dllmain.cpp : Defines the entry point for the DLL application.
#define _CRT_SECURE_NO_WARNINGS
#include <Windows.h>
#include <string>
#include <iostream>
#define aslr(address) address - 0x400000 + (DWORD)GetModuleHandle(NULL)
#define print_msg 0
#define error_msg 3
#define warn_msg 2
#define info_msg 1
typedef int(__cdecl* aprint)(int a1, const char* a2);
aprint print = (aprint)(aslr(0x5ED570));// how to find: https://gyazo.com/3cfb75d9b0017f57fa8edf61586a0313
void main() {
// create the console \/
DWORD protection;
VirtualProtect(FreeConsole, 1, PAGE_EXECUTE_READWRITE, &protection);
*(BYTE*)(&FreeConsole) = 0xC3;
AllocConsole();
freopen("CONIN$", "r", stdin);
freopen("CONOUT$", "w", stdout);
SetWindowPos(GetConsoleWindow(), HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_DRAWFRAME);
SetConsoleTitleA("Print Exploit");
// create the console ^
while (true) {
printf("Text you would like to print: ");
std::string input;
std::getline(std::cin, input);
print(print_msg, input.c_str());
//print(error_msg, input.c_str()); red
//print(warn_msg, input.c_str()); orange
//print(info_msg, input.c_str()); blue
}
}
BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
CreateThread(0, 0, (LPTHREAD_START_ROUTINE)main, 0, 0, 0);
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
@joaofofo0112
Copy link

João Miguel Melo Mendonça

@joaofofo0112
Copy link

Quero ser hack

@joaofofo0112
Copy link

Muito robux

@ruyan383
Copy link

ruyan383 commented Jan 4, 2023

Goo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment