TalkingRelease CF_ShArKs Conosole Menu Source !

Posts 1–15 of 35 · Page 1 of 3
Release CF_ShArKs Conosole Menu Source !
Hello guys,
As many of us may know i made a console menu for a dll hack so here its source. It gives send error report on the login screen, sometime gives send error if it stays opened for 11 seconds, sometime gives send error if it stays opened for 4 seconds. I dont need it is silly to keep such a beast in private...

if you havent seen it there is it in action:


here is the source + exaplanation...
Credits: @kmanev073
Special Thanks to: @giniyat101



First of all we need the headers so add them:
Code:
#include <windows.h>
#include <string.h>
#include <string>
#include <stdio.h>
#include <iostream>
#include <fstream>
#include <shlwapi.h>
#include <shlobj.h>
#include <io.h>
#include <fcntl.h>
using namespace std;
After that we need the whole definitions that will help us with the menu...
Basicly my menu algorithm is made of arrays and we swap there elements data...
So define the arrays:
Code:
string arrS[25] ={"-> ","   ","   ","   ","   ","   ","   ","   ","   ","   ","   ","   ","   ","   ","   ","   ","   ","   ","   ","   ","   ","   ","   ","   ","   "},
arrC1[25] ={"-> ","   ","   ","   ","   ","   ","   ","   ","   ","   ","   ","   ","   ","   ","   ","   ","   ","   ","   ","   ","   ","   ","   ","   ","   "},
arrF[25] =
{
	"1. No Weapon Weight          ",
	"2. Fast Walk in Scope-BETA   ",
	"3. No Grenade Damage         ",
	"4. Fast Knife                ",
	"5. Knife 360 Degrees         ",
	"6. No Fall Damage            ",
	"7. Max Range                 ",
	"8. No Knockback              ",
	"9. No Bug Damage             ",
	"10. See Ghosts               ",
	"11. Knife OHK                ",
	"12. Bigger Knife Range       ",
	"13. Fast C4 Plant            ",
	"14. Fast C4 Defuse           ",
	"15. Max Defuse Distance-BETA ",
	"16. Ghost Speed Hack-BETA    ",
	"17. Small Crosshair          ",
	"18. Crouch Speed-BETA        ",
	"19. Repeat Fire Pistols      ",
	"20. No Shotgun Spread        ",
	"21. No Scope                 ",
	"22. White Walls              ",
	"23. No Sky                   ",
	"24. Light Map                ",
	"25. Panic Key (HOME)         "
},
arrM[25][2] =		
{
	{"OFF","ON"},
	{"OFF","ON"},
	{"OFF","ON"},
	{"OFF","ON"},
	{"OFF","ON"},
	{"OFF","ON"},
	{"OFF","ON"},
	{"OFF","ON"},
	{"OFF","ON"},
	{"OFF","ON"},
	{"OFF","ON"},
	{"OFF","ON"},
	{"OFF","ON"},
	{"OFF","ON"},
	{"OFF","ON"},
	{"OFF","ON"},
	{"OFF","ON"},
	{"OFF","ON"},
	{"OFF","ON"},
	{"OFF","ON"},
	{"OFF","ON"},
	{"OFF","ON"},
	{"OFF","ON"},
	{"OFF","ON"},
	{"OFF","ON"}
},
	arrC2[25][2] =
{
	{"OFF","ON"},
	{"OFF","ON"},
	{"OFF","ON"},
	{"OFF","ON"},
	{"OFF","ON"},
	{"OFF","ON"},
	{"OFF","ON"},
	{"OFF","ON"},
	{"OFF","ON"},
	{"OFF","ON"},
	{"OFF","ON"},
	{"OFF","ON"},
	{"OFF","ON"},
	{"OFF","ON"},
	{"OFF","ON"},
	{"OFF","ON"},
	{"OFF","ON"},
	{"OFF","ON"},
	{"OFF","ON"},
	{"OFF","ON"},
	{"OFF","ON"},
	{"OFF","ON"},
	{"OFF","ON"},
	{"OFF","ON"},
	{"OFF","ON"}
};
the arrays with C in there names are the arrays used to check is there any action preformed so we reprint menu and prvent from falshing...

after that we need some functions that are the main menu...
Code:
void DrawMenu()
{
	for (int i=0;i<25;i++)
	{
		cout<<arrS[i]<<arrF[i]<<arrM[i][0]<<endl;
	}
}

void reprintMenu()
{
	system("cls");
	HWND console = GetConsoleWindow();
	RECT r;
	GetWindowRect(console, &r);
	MoveWindow(console, r.left, r.top, 320, 380, TRUE);
	DrawMenu();
}


void ShowMenu()
{
	HANDLE lStdHandle;
	DWORD hConHandle;
	FILE *fp;

	AllocConsole();
	SetConsoleTitleA("CF_ShArKs Blazer");
	// redirect unbuffered STDOUT to the console
	lStdHandle = GetStdHandle(STD_OUTPUT_HANDLE);
	hConHandle = _open_osfhandle(PtrToUlong(lStdHandle), _O_TEXT);
	fp = _fdopen(hConHandle, "w");
	*stdout = *fp;
	setvbuf(stdout, NULL, _IONBF, 0);
	// redirect unbuffered STDIN to the console
	lStdHandle = GetStdHandle(STD_INPUT_HANDLE);
	hConHandle = _open_osfhandle(PtrToUlong(lStdHandle), _O_TEXT);
	fp = _fdopen(hConHandle, "r");
	*stdin = *fp;
	setvbuf(stdin, NULL, _IONBF, 0);
	HWND console = GetConsoleWindow();
	RECT r;
	GetWindowRect(console, &r);
	MoveWindow(console, r.left, r.top, 320, 380, TRUE);
	isShown = true;
	DrawMenu();
}
draw menu is the function that prints the arrays on the sceen...
reprint menu is the function that calls the drawmenu function if there is any change
ShowMenu function is the first time console showing it sets its size and title...

so finally we need a base with a any kind of repeatin in it (usually the bases which support wallhack and hotkeys...) but here it is only the menu LOGIC
Code:
if(GetAsyncKeyState(VK_INSERT))
	{
		console = true;	
		Sleep(50);
	}

	if (console) 	
	{
		if (isShown == false)
		{
			ShowMenu();
		}
		else
		{
			if (GetAsyncKeyState(VK_LEFT)) 
			{
				swap(arrM[x][0],arrM[x][1]);
				Sleep(50);
			}
			if (GetAsyncKeyState(VK_RIGHT))
			{
				swap(arrM[x][1],arrM[x][0]);
				Sleep(50);
			}
			if (GetAsyncKeyState(VK_DOWN))
			{
				x++;
				if (x > 24)
				{
					x=0;
					swap(arrS[24],arrS[0]);
				}
				else
				{
					swap(arrS[x],arrS[x-1]);
				}			
					Sleep(50);
			}
			if (GetAsyncKeyState(VK_UP))
			{
				x--;
				if (x < 0)
				{
					x=24;
					swap(arrS[24],arrS[0]);
				}
				else
				{
					swap(arrS[x],arrS[x+1]);
				}
				Sleep(50);
			}
			if(GetAsyncKeyState(VK_INSERT)) 
			{
				FreeConsole();
				console = false;
				isShown = false;
			}	
			for (int i=0;i<25;i++)
			{
				if (arrS[i] != arrC1[i] || arrM[i][0] != arrC2[i][0])
				{
					for (int y=0;y<25;y++) arrC1[y] = arrS[y];
					for (int y=0;y<25;y++) arrC2[y][0] = arrM[y][0];
					for (int y=0;y<25;y++) arrC2[y][1] = arrM[y][1];
					reprintMenu();
					Sleep(50);
					break;
				}
				else continue;
			}
		}
	}
so you start from the zero elelent in the array and if there is key press it is modding the X variable which you have to define :P
after that it swaps the places of the x and x-1, checks if there is a change apply changes to the C array and reprint...
while the on/off just swaps the [x][0] and [x][1] of the state array and again there is a check like the first one...

NOTE we allways print the same part of the arrays...

so the menu is wokring but no action in the features...
so got the place of the no weapon weight... it is the first of arrM
so bcs we are printing only the column 0 we check only the 0 column and it become like that
Code:
if (arrm[0][0]=="ON") noWepChangeDelay = true;
else noWepChangeDelay = false;



that' s all give credits to me and giniyat if you use !
also dont forget press thanks if you like it

@Jigsaw, @Austin, @Hero, @Royku, @DaRk, @BACKD00R
as for you minnons i think this is the fist menu of this type... i think that this post is very usifull for begginers in hacking and c++ bcs, it includes APIs, threading function, basic console functions and it can help the begginers to become prfessional... so please give it a sicky and make people happy !
nice tutorial
thanks
nice tutorial ( u are a pro coder )
Good Job! Someone will come here and ask: how I use this?
Are you able to make a video how to make it etc.
@BACKD00R ^Thats pretty much what you said will happen ..
Kmanev , awesome release man. Really like this kind of menu
iam 101 if you didnt notice ^^
Quote Originally Posted by giniyat101 View Post
iam 101 if you didnt notice ^^
oops but once there was 202 ok gonna change if i can
Quote Originally Posted by kmanev073 View Post
oops but once there was 202 ok gonna change if i can
the 202 was perma banned due to posting externel links
nice pretty good
nice tut sir ...
Quote Originally Posted by BACKD00R View Post
Good Job! Someone will come here and ask: how I use this
i'm the #one :P
not bad, but i prefer DirectX to draw my stuff on the screen
@giniyat101 @kmanev073
the menu work and the feature work. but after 2 or 3 second crossfire auto close
Quote Originally Posted by DOOP View Post
@giniyat101 @kmanev073
the menu work and the feature work. but after 2 or 3 second crossfire auto close
i said that it gives error most of the time... strange dude i had 25 fetures and gived error every time now they are 33 and no error
Posts 1–15 of 35 · Page 1 of 3

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?