Advertisement
Guest User

Untitled

a guest
Jul 24th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.53 KB | None | 0 0
  1. #pragma once
  2. //#include "stdafx.h"
  3. #include <Windows.h>
  4. #include <iostream>
  5. #include <sstream>
  6. #include <vector>
  7. #include <stdio.h>
  8. #include <string>
  9. #include <typeinfo>
  10. #include <string>
  11. #include <iterator>
  12. #include <mmsystem.h>
  13.  
  14. #define _CRT_SECURE_NO_WARNINGS // VS does not like freopen
  15.  
  16. using namespace std;
  17.  
  18. vector<std::string> split(std::string s) { // Split and check input
  19. vector<std::string> elems;
  20. stringstream ss(s);
  21. istream_iterator<std::string> begin(ss);
  22. istream_iterator<std::string> end;
  23. vector<std::string> vstrings(begin, end);
  24. return vstrings;
  25. }
  26.  
  27. string Input() { // Input
  28. string ass;
  29. getline(cin, ass);
  30. return ass;
  31. }
  32.  
  33. #pragma warning (disable : 4996) // Remove common errors
  34.  
  35. void create_Console(const char *name) // Bypass robloxes console check
  36. {
  37. DWORD old_Prot;
  38. VirtualProtect(&FreeConsole, 1, PAGE_EXECUTE_READWRITE, &old_Prot);
  39. *(BYTE*)&FreeConsole = 0xC3;
  40. VirtualProtect(&FreeConsole, 1, old_Prot, &old_Prot);
  41.  
  42. AllocConsole();
  43. SetConsoleTitleA(name);
  44.  
  45. freopen("CONOUT$", "w", stdout);
  46. freopen("CONIN$", "r", stdin);
  47. freopen("CONOUT$", "w", stderr);
  48. }
  49.  
  50. void commands()
  51. {
  52. cout << "exit - Exits the program/Also closes roblox" << endl;
  53. cout << "credits - Displays the creators" << endl;
  54. }
  55.  
  56. void credits()
  57. {
  58. cout << "Owner/Lead Coder: Mortality" << endl;
  59. cout << "Backup Coder + Beta Tester: ManiakOfDirt" << endl;
  60. }
  61.  
  62. void exit() // Activate exit command
  63. {
  64. cout << "Closing... ";
  65. exit(1);
  66. cout << "OK"; // Useless just felt like it
  67. }
  68.  
  69. void Type() // Insert input
  70. {
  71. cout << ">"; // output ">"
  72. vector<string> In = split(Input()); // ask for an input
  73. if (In.at(0) == "cmds") { //if input = cmds then
  74. commands(); // Sends to the command list
  75. Type();
  76. }
  77. else {
  78. if (In.at(0) == "exit") { //if input = exit then
  79. exit();
  80. Type();
  81. }
  82. else { // If something random is typed
  83. if (In.at(0) == "credits") { //if input = credits then
  84. credits(); // Sends to void credits
  85. Type();
  86. }
  87. else { // If something random is typed
  88. Type();
  89. }
  90. }
  91. }
  92. }
  93.  
  94. void main(void) // Start here
  95. {
  96. create_Console("G-Zus v1.0");
  97. cout << "Initiating... "; // Making sure cout works
  98. Sleep(1000);
  99. cout << "OK" << endl; // Making sure it can return to last used cout
  100. int id = 0x01E40E48; // Whitelist addy
  101. cout << "Authenticating... ";
  102. Sleep(500);
  103. if (*(int*)(id) == 97507390) {
  104. cout << "OK" << endl;
  105. cout << "Welcome, ManiakOfDirt" << endl;
  106. cout << "Your rank: Co-Owner" << endl;
  107. cout << "Type cmds for a list of commands" << endl;
  108. Type();
  109. }
  110. if (*(int*)(id) == 30307942) {
  111. cout << "OK" << endl;
  112. cout << "Welcome, ninjarobogabe" << endl;
  113. cout << "Your rank: user" << endl;
  114. cout << "Type cmds for a list of commands" << endl;
  115. Type();
  116. }
  117. if (*(int*)(id) == 37226175) {
  118. cout << "OK" << endl;
  119. cout << "Welcome, iiOPfreshii" << endl;
  120. cout << "Your rank: Owner" << endl;
  121. cout << "Type cmds for a list of commands" << endl;
  122. Type();
  123. }
  124. if (*(int*)(id) == 30782279) {
  125. cout << "OK" << endl;
  126. cout << "Welcome, AyeexJaedyn" << endl;
  127. cout << "Your rank: Co-Owner" << endl;
  128. cout << "Type cmds for a list of commands" << endl;
  129. Type();
  130. }
  131. else { // If not whitelisted
  132. cout << "ERROR" << endl;
  133. exit(5);
  134. }
  135. }
  136.  
  137. BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) // start at main
  138. {
  139. if (fdwReason == DLL_PROCESS_ATTACH)
  140. {
  141. DisableThreadLibraryCalls(hinstDLL);
  142. CreateThread(0, 0, (LPTHREAD_START_ROUTINE)main, 0, 0, 0);
  143. }
  144. return 1;
  145. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement