Lover712

Veil Reborn UI Code

Jan 13th, 2020
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.41 KB | None | 0 0
  1. #define _CRT_SECURE_NO_WARNINGS //msvc doesn't like freopen
  2. #include <Windows.h>
  3. #include <iostream>
  4. #include <string> //for std::string
  5. #include <vector>
  6. #include <sstream>
  7. #include <iterator>
  8. #include <string.h>
  9. #include <sys/types.h>
  10. #include <stdlib.h>
  11.  
  12. //Veilv3 gui made by PikaMarra
  13.  
  14. using namespace std;
  15.  
  16. void init();
  17. void ShowWindowForm();
  18.  
  19.  
  20.  
  21.  
  22. void Print(HWND hWndEdit, std::string pszText)
  23. {
  24. int nLength = GetWindowTextLength(hWndEdit);
  25. SendMessage(hWndEdit, EM_SETSEL, (WPARAM)nLength, (LPARAM)nLength);
  26. SendMessage(hWndEdit, EM_REPLACESEL, (WPARAM)FALSE, (LPARAM)pszText.c_str());
  27. }
  28.  
  29. #define INPUT_CHAR_LIMIT 500
  30.  
  31. #define ALX_CONSOLE_WINDOW (WM_APP + 500)
  32. #define ALX_INPUT_FIELD (WM_APP + 501)
  33. #define ALX_WAYPOINT_BOX (WM_APP + 502)
  34.  
  35. #define MALX_EXIT (WM_APP + 600)
  36. #define MALX_RESTART (WM_APP + 601)
  37. #define MALX_ABOUT (WM_APP + 602)
  38. #define MALX_CREDITS (WM_APP + 603)
  39. #define MALX_COMMANDS (WM_APP + 604)
  40.  
  41.  
  42.  
  43. HWND ParentWindow = NULL;
  44. HWND MainWindow = NULL;
  45. HMENU WindowMenu = NULL;
  46. HMODULE HInstance = NULL;
  47.  
  48. HWND InputField = NULL;
  49. HWND txtbox = NULL;
  50. HWND WaypointBox = NULL;
  51.  
  52. LRESULT CALLBACK DLLWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
  53. {
  54. switch (message)
  55. {
  56. case WM_CTLCOLORSTATIC:
  57. {
  58. HDC hEdit = (HDC)wParam;
  59. SetTextColor(hEdit, RGB(0, 0, 0));
  60. SetBkColor(hEdit, RGB(255, 255, 255));
  61. return (LRESULT)GetStockObject(WHITE_BRUSH);
  62. }
  63. case WM_COMMAND:
  64. switch (LOWORD(wParam))
  65. {
  66. case MALX_EXIT:
  67. if (MessageBox(hwnd, "Are you sure you want to exit?", "Exit", MB_YESNOCANCEL) == IDYES)
  68. ExitThread(0);
  69. break;
  70. case MALX_CREDITS:
  71. MessageBox(hwnd, "VeilV3 Credits/n/r Script() - Main Coder/n/r PikaMarra - Coder/n/r PikaMarra - Making Veil UI/n/r PikaMarra - Testing and Feedback/n/r Team Veil - everything!!! ", "Credits", MB_OKCANCEL);
  72. break;
  73.  
  74. case MALX_COMMANDS:
  75. // Startt("cmds");
  76. break;
  77. case ALX_INPUT_FIELD:
  78. if (HIWORD(wParam) == EN_MAXTEXT) {
  79. char cText[INPUT_CHAR_LIMIT];
  80. SendMessage((HWND)lParam, WM_GETTEXT, INPUT_CHAR_LIMIT, (LPARAM)cText);
  81.  
  82. if (strcmp(cText, "") == 0)
  83. break;
  84.  
  85. SendMessage((HWND)lParam, WM_SETTEXT, NULL, (LPARAM)"");
  86.  
  87. //std::string command = cText;
  88. //Startt(cText);
  89. }
  90.  
  91. break;
  92. }
  93. break;
  94. case WM_DESTROY:
  95. ExitThread(0);
  96. break;
  97.  
  98. case WM_QUIT:
  99. ExitThread(0);
  100. break;
  101. default:
  102. return DefWindowProc(hwnd, message, wParam, lParam);
  103. }
  104. return 0;
  105. }
  106.  
  107. BOOL RegisterWindowClass(const char* wClassName) {
  108. WNDCLASSEX nClass;
  109.  
  110. nClass.cbSize = sizeof(WNDCLASSEX);
  111. nClass.style = CS_DBLCLKS;
  112. nClass.lpfnWndProc = DLLWindowProc;
  113. nClass.cbClsExtra = 0;
  114. nClass.cbWndExtra = 0;
  115. nClass.hInstance = GetModuleHandle(NULL);
  116. nClass.hIcon = LoadIcon(NULL, IDI_APPLICATION); // TODO: make an icon for alx?
  117. nClass.hIconSm = LoadIcon(NULL, IDI_APPLICATION);
  118. nClass.hCursor = LoadCursor(NULL, IDC_ARROW);
  119. nClass.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
  120. nClass.lpszMenuName = "what";
  121. nClass.lpszClassName = wClassName;
  122.  
  123. if (!RegisterClassEx(&nClass))
  124. return 0;
  125.  
  126. return 1;
  127. }
  128.  
  129. BOOL StartMessageLoop() {
  130. MSG msg;
  131. BOOL bRet;
  132.  
  133. while ((bRet = GetMessage(&msg, NULL, 0, 0)) != 0)
  134. {
  135. if (bRet == 0) {
  136. return 0;
  137. }
  138. else if (bRet == -1)
  139. {
  140. // handle the error and possibly exit
  141. //return msg.wParam;
  142. return 0;
  143. }
  144. else
  145. {
  146. TranslateMessage(&msg);
  147. DispatchMessage(&msg);
  148. }
  149. }
  150. }
  151.  
  152. BOOL CreateSubwindows() {
  153. //HINSTANCE hInstance = GetModuleHandle(NULL);
  154. txtbox = CreateWindowEx(NULL, "EDIT", "", WS_CHILD | WS_BORDER | WS_VSCROLL | ES_MULTILINE | WS_VISIBLE | ES_READONLY | ES_AUTOVSCROLL, 1, 20, 450, 234, MainWindow, (HMENU)ALX_CONSOLE_WINDOW, HInstance, 0);
  155. //HWND consoleFieldLabel = CreateWindowEx(NULL, "STATIC", "", WS_CHILD | WS_VISIBLE, 10, 0, 100, 20, MainWindow, NULL, HInstance, NULL);
  156. InputField = CreateWindowEx(NULL, "EDIT", "", WS_CHILD | WS_BORDER | ES_MULTILINE | WS_VISIBLE, 1, 284, 420, 100, MainWindow, (HMENU)ALX_INPUT_FIELD, HInstance, 0);
  157. HWND execute = CreateWindowEx(NULL, "button", "Execute", WS_CHILD | WS_VISIBLE | WS_BORDER, 1, 253, 100, 32, MainWindow, NULL, NULL, NULL);
  158. HWND openfile = CreateWindowEx(NULL, "button", "Open file", WS_CHILD | WS_VISIBLE | WS_BORDER, 100, 253, 220, 32, MainWindow, NULL, NULL, NULL);
  159. HWND clear = CreateWindowEx(NULL, "button", "Clear", WS_CHILD | WS_VISIBLE | WS_BORDER, 320, 253, 100, 32, MainWindow, NULL, NULL, NULL);
  160.  
  161.  
  162.  
  163.  
  164. //HWND inputFieldLabel = CreateWindowEx(NULL, "STATIC", "", WS_CHILD | WS_VISIBLE, 10, 230, 100, 20, MainWindow, NULL, HInstance, NULL);
  165. //SendMessage(inputFieldLabel, WM_SETTEXT, NULL, (LPARAM)"Input");
  166. //SendMessage(consoleFieldLabel, WM_SETTEXT, NULL, (LPARAM)"Console");
  167. SendMessage(InputField, EM_SETLIMITTEXT, INPUT_CHAR_LIMIT, NULL);
  168.  
  169. //WaypointBox = CreateWindowEx(NULL, "LISTBOX", "", WS_CHILD | WS_BORDER | WS_VSCROLL | WS_VISIBLE, 10, 280, 520, 100, MainWindow, (HMENU)ALX_WAYPOINT_BOX, HInstance, 0);
  170. //SendMessage(WaypointBox, LVM_SETITEMTEXT, )
  171.  
  172. HFONT textFont = CreateFont(18, 0, 0, 0, FW_LIGHT, FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_OUTLINE_PRECIS, CLIP_DEFAULT_PRECIS, CLEARTYPE_QUALITY, VARIABLE_PITCH, TEXT("Segoe UI"));
  173.  
  174. //SendMessage(inputFieldLabel, WM_SETFONT, (WPARAM)textFont, MAKELPARAM(TRUE, 0));
  175. //SendMessage(consoleFieldLabel, WM_SETFONT, (WPARAM)textFont, MAKELPARAM(TRUE, 0));
  176. SendMessage(txtbox, WM_SETFONT, (WPARAM)textFont, MAKELPARAM(TRUE, 0));
  177. SendMessage(InputField, WM_SETFONT, (WPARAM)textFont, MAKELPARAM(TRUE, 0));
  178.  
  179. UpdateWindow(MainWindow);
  180.  
  181. return 1;
  182. }
  183.  
  184. BOOL CreateWindowMenu() {
  185. WindowMenu = CreateMenu();
  186. if (!WindowMenu)
  187. return 0;
  188.  
  189. HMENU mainDropdown = CreatePopupMenu();
  190. AppendMenu(mainDropdown, MF_STRING, MALX_EXIT, "Exit");
  191.  
  192.  
  193. AppendMenu(WindowMenu, MF_POPUP, (UINT_PTR)mainDropdown, "Veilv3");
  194.  
  195.  
  196.  
  197. HMENU aboutDropdown = CreatePopupMenu();
  198. AppendMenu(aboutDropdown, MF_STRING, MALX_CREDITS, "Credits");
  199. AppendMenu(aboutDropdown, MF_STRING, MALX_ABOUT, "Large script window");
  200.  
  201. AppendMenu(WindowMenu, MF_POPUP, (UINT_PTR)aboutDropdown, "View");
  202.  
  203. return 1;
  204. }
  205.  
  206. BOOL InitiateWindow() {
  207. HInstance = GetModuleHandle(NULL);
  208.  
  209. UnregisterClass("ALX_WINDOW", HInstance);
  210. RegisterWindowClass("ALX_WINDOW");
  211.  
  212. char alxName[50];
  213.  
  214. _snprintf_s(alxName, 50, "Veil v3");
  215.  
  216. //ParentWindow = FindWindow(NULL, "ROBLOX");
  217. if (!CreateWindowMenu())
  218. return 0;
  219.  
  220. if (!(MainWindow = CreateWindowEx(
  221. NULL,
  222. "ALX_WINDOW",
  223. alxName,
  224. WS_EX_PALETTEWINDOW, CW_USEDEFAULT, CW_USEDEFAULT,
  225. 425,
  226. 434,
  227. NULL, //ParentWindow,
  228. WindowMenu,
  229. HInstance,
  230. NULL))) return 0;
  231.  
  232. //ScrollWindowEx(MainWindow, 0, 560, NULL, NULL, NULL, NULL, SW_SCROLLCHILDREN | SW_SMOOTHSCROLL);
  233. //EnableScrollBar(MainWindow, SB_VERT, ESB_ENABLE_BOTH);
  234.  
  235. CreateSubwindows();
  236. UpdateWindow(MainWindow);
  237.  
  238. ShowWindow(MainWindow, SW_SHOWNORMAL);
  239. init();
  240.  
  241. return StartMessageLoop();
  242. }
  243.  
  244. bool SERVER(int n) {
  245. bool SERVER(true);
  246. Print(txtbox, "Loading serverside beta1\r\n");
  247. Print(txtbox, "Checking server\r\n");
  248. for (int i(80); i<n; i++){ //didnt add any dots 443 port main server
  249. if (n%i == 80) SERVER = false;
  250. Print(txtbox, "Serverside failed\r\n");
  251.  
  252. //break; why the fuck should i break i should close
  253. //use break; close wont work
  254. }
  255. return SERVER;
  256. }
  257.  
  258.  
  259. void ShowWindowForm() {
  260. InitiateWindow();
  261. }
  262.  
  263. void init() {
  264. Print(txtbox, "Veil Reborn Level 6 Exploit ");
  265. Print(txtbox, "Loading Primary Address... OK! \r\n");
  266. Print(txtbox, "Authenticating... OK! \r\n");
  267. Print(txtbox, "Initializing... OK! \r\n");
  268.  
  269.  
  270. Print(txtbox, "Filtering is Disabled/Enabled \r\n");
  271. Print(txtbox, "Welcome, (plr name lolz)\r\n");
  272. //Working on the serverside failed think since
  273.  
  274. WriteProcessMemory(SERVER, (PBYTE)PAGE_READWRITE, "\x5D\x3E\x98\x00", 2, 0);
  275.  
  276. //Whitelist
  277. }
  278.  
  279.  
  280. void Console(char* title) {
  281. AllocConsole();
  282. SetConsoleTitleA(title);
  283. freopen("CONOUT$", "w", stdout);
  284. freopen("CONIN$", "r", stdin);
  285. HWND ConsoleHandle = GetConsoleWindow();
  286. ::SetWindowPos(ConsoleHandle, HWND_TOPMOST, 0, 0, 0, 0, SWP_DRAWFRAME | SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW);
  287. ::ShowWindow(ConsoleHandle, SW_NORMAL);
  288. }
  289.  
  290.  
  291.  
  292. BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
  293. {
  294. if (fdwReason == DLL_PROCESS_ATTACH)
  295. {
  296. DisableThreadLibraryCalls(hinstDLL);
  297. CreateThread(0, 0, (LPTHREAD_START_ROUTINE)ShowWindowForm, 0, 0, 0); //lets go
  298. }
  299. return 1;
  300. }
Add Comment
Please, Sign In to add comment