Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- PrintExploit, developed by Powerful. This is a very simple exploit and it just prints directly
- to the ROBLOX Developer Console. It's a useless exploit, but it's a start for the ones who want
- to develop an exploit w/out copying other sources. I'm sure some of you guys will find this useful.
- This exploit doesn't require a Scanner, so there is no need for a scanner. It's just a Simple
- Console-Based Exploit that may have no meaning, but will get you in to exploiting.
- */
- // PrintExploit Includes
- #include <Windows.h>
- #include <iostream>
- #include <istream>
- #include <string>
- // Define(s)
- #define _CRT_SECURE_NO_WARNINGS
- int main() { return 0; }
- // Most exploit developers won't use this, but it's for the sake of a beginner source code.
- using namespace std;
- // Now let's get on with the actual source code.
- namespace PrintExploit {
- namespace Integers {
- int OutputType = 0; // 0 = Print, 1 = Info, 2 = Warn, 3 = Error
- }
- }
- // As you guys call the "Aslr" bypass. It's not really even a bypass, but okay.
- int Address(int Offset) {
- return (Offset - 0x00400000 + (DWORD)GetModuleHandle("RobloxPlayerBeta.exe"));
- }
- // Now let's create the typedef for Singleton->Printf()
- typedef int(__cdecl *SINGLETON)(int a1, const char *a2);
- SINGLETON SingletonPrint = (SINGLETON)Address(0x51EB70);
- // This code is leaked publicly, so I'll just use this. I'm not sure who made it originally though. But credits to whoever you are.
- void ConsoleBypass() {
- DWORD CheckerValue;
- VirtualProtect((PVOID)&FreeConsole, 1, PAGE_EXECUTE_READWRITE, &CheckerValue);
- *(BYTE*)(&FreeConsole) = (0xC3);
- }
- // Now let's create a Console Function. This just makes it easier for me to read my own code for some reason.
- void Console(const char* ConsoleTitle) {
- ConsoleBypass();
- AllocConsole();
- SetConsoleTitleA(ConsoleTitle);
- freopen("CONOUT$", "w", stdout);
- freopen("CONIN$", "r", stdin);
- HWND ConsoleHandle = GetConsoleWindow();
- ::SetWindowPos(ConsoleHandle, HWND_TOPMOST, 0, 0, 0, 0, SWP_DRAWFRAME | SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW);
- ::ShowWindow(ConsoleHandle, SW_NORMAL);
- }
- // Here is the actual start of the program.
- void MainFunction() {
- Console("Print Exploit");
- do {
- string OutputString = "";
- getline(cin, OutputString);
- SingletonPrint(PrintExploit::Integers::OutputType, OutputString.c_str());
- } while (true);
- }
- // Here is the end (dllmain) which creates a thread and executes the code above when injected.
- int __stdcall DllMain(HMODULE a, DWORD b, void* c) {
- if (b == 1) {
- CreateThread(0, 0, (LPTHREAD_START_ROUTINE)MainFunction, 0, 0, 0);
- }
- return TRUE;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement