Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Windows.h>
- #include <iostream>
- #include <istream>
- #include <string>
- #define _CRT_SECURE_NO_WARNINGS
- int main() { return 0; }
- using namespace std;
- namespace PrintExploit {
- namespace Integers {
- int OutputType = 2; // 0 = Print, 1 = Info, 2 = Warn, 3 = Error
- }
- }
- int Address(int Offset) {
- return (Offset - 0x00400000 + (DWORD)GetModuleHandle("RobloxPlayerBeta.exe"));
- }
- typedef int(__cdecl *SINGLETON)(int a1, const char *a2);
- SINGLETON SingletonPrint = (SINGLETON)Address(0x51EB70);
- void ConsoleBypass() {
- DWORD CheckerValue;
- VirtualProtect((PVOID)&FreeConsole, 1, PAGE_EXECUTE_READWRITE, &CheckerValue);
- *(BYTE*)(&FreeConsole) = (0xC3);
- }
- 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);
- }
- void MainFunction() {
- Console("Print Exploit");
- do {
- string OutputString = "Print Test";
- getline(cin, OutputString);
- SingletonPrint(PrintExploit::Integers::OutputType, OutputString.c_str());
- } while (true);
- }
- int __stdcall DllMain(HMODULE DLL, DWORD Reason, void* Useless) {
- if (Reason == 1) {
- CreateThread(0, 0, (LPTHREAD_START_ROUTINE)MainFunction, 0, 0, 0);
- }
- return TRUE;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement