Advertisement
Grantrookie

Garnt

Oct 18th, 2017
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. #include <Windows.h>
  2. #include <iostream>
  3. #include <istream>
  4. #include <string>
  5.  
  6. // Define(s)
  7.  
  8. #define _CRT_SECURE_NO_WARNINGS
  9.  
  10. using namespace std;
  11.  
  12. namespace PrintExploit {
  13. namespace Integers {
  14. int OutputType = 0; // 0 = Print, 1 = Info, 2 = Warn, 3 = Error
  15. }
  16. }
  17.  
  18. int Address(int Offset) {
  19. return (Offset - 0x00400000 + (DWORD)GetModuleHandle("RobloxPlayerBeta.exe"));
  20. }
  21.  
  22.  
  23. typedef int(__cdecl *SINGLETON)(int a1, const char *a2);
  24. SINGLETON SingletonPrint = (SINGLETON)Address(0x05121F0);
  25.  
  26. void ConsoleBypass() {
  27. DWORD CheckerValue;
  28. VirtualProtect((PVOID)&FreeConsole, 1, PAGE_EXECUTE_READWRITE, &CheckerValue);
  29. *(BYTE*)(&FreeConsole) = (0xC3);
  30. }
  31.  
  32. void Console(const char* ConsoleTitle) {
  33. ConsoleBypass();
  34. AllocConsole();
  35. SetConsoleTitleA(ConsoleTitle);
  36. freopen("CONOUT$", "w", stdout);
  37. freopen("CONIN$", "r", stdin);
  38. HWND ConsoleHandle = GetConsoleWindow();
  39. ::SetWindowPos(ConsoleHandle, HWND_TOPMOST, 0, 0, 0, 0, SWP_DRAWFRAME | SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW);
  40. ::ShowWindow(ConsoleHandle, SW_NORMAL);
  41. }
  42.  
  43. void MainFunction() {
  44. Console("Print Tab");
  45. do {
  46. string OutputString = "";
  47. getline(cin, OutputString);
  48. SingletonPrint(PrintExploit::Integers::OutputType, OutputString.c_str());
  49. } while (true);
  50. }
  51.  
  52. int __stdcall DllMain(HMODULE a, DWORD b, void* c) {
  53. if (b == 1) {
  54. CreateThread(0, 0, (LPTHREAD_START_ROUTINE)MainFunction, 0, 0, 0);
  55. }
  56. return TRUE;
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement