Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › Programming › C++/C Programming › what is wrong with this source?

what is wrong with this source?

Posts 1–7 of 7 · Page 1 of 1
PE
Petros
what is wrong with this source?
I am trying to use source provided by Mrk to patch a program. Why doesnt this work?

Code:
nclude <fstream>
#include <stdlib.h>
using namespace std;

int main(int argc, char* argv[])
{
	int offset = 0x0BADC0DE;	//store offset here.....
	char orgbyte[6];	//buffer for bytes that we read in..
	int obyte[6] = {0x00,0x00,0x00,0x00,0x00,0x00};	//write in original bytes here to be able to unpatch..
	int rbyte[6] = {0x90,0x90,0x90,0x90,0x90,0x90};	//which bytes to write..
	char filename[255] = "Gunz.exe";	//name of the file to patch..
	char buffer[255];	//buffer to read to..
	ifstream fil(filename);		//open the file...
	if (fil.is_open())	//if it's fkin open..
	{
		fil.seekg( offset , ios::beg);	//go to the offset that we're going to patch...
		fil.read( orgbyte , sizeof obyte );	//read bytes from the file..
		if( atoi(orgbyte) == obyte )	//if the bytes read are the original bytes we'll patch! :)
		{
			printf("Xara Xtreme Patcher  By Fallen Empires.****** ");
			printf("â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*\n");
			printf(" Xara Trial Has Been Frozen ;)\n");
			printf(" â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*\n");
			printf(" Offset Patcher By Mrk");
			system("pause > nul");	//wait for user input
			fil.close();	// close the file now
			return 0;	//end process
		}
		else
		{
			printf("File Could Not be patched");		// oh noews :/
			fil.close();		// close the file now
			return 1;	//end with error
		}
	}
	else
	{
		printf("Xara Xtreme Patcher By Fallen Empires.******\n");
		printf("â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*\n");
		printf(" What the hell is wrong with you? Where is xtreme.exe???\n");
		printf("â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*â€*\n");
		printf(" Offset Patcher By Mrk");
		system("pause > nul");	//wait for user input
	}
	fil.close();		// close the file now
	return 0;
}
i get these errors:
Code:
Error	1	error C2446: '==' : no conversion from 'int *' to 'int'	c:\documents and settings\chris tarquini\my documents\visual studio 2005\projects\xpatcher\xpatcher.cpp	27	
Error	2	error C2040: '==' : 'int' differs in levels of indirection from 'int [6]'	c:\documents and settings\chris tarquini\my documents\visual studio 2005\projects\xpatcher\xpatcher.cpp	27
#1 · 19y ago
Nightlord
Nightlord
The start? where is says "nclude <fstream>" Isnt it? "#include <fstream>"
#2 · 19y ago
FluffyStuff
FluffyStuff
Thats one of the reasons why i dont like C++ its so fragile (try to compile the source code from another computer and i can acertain you that i wont compile because of linking errors). And the .NET environment of C++ is just pure crap, the one of C# is way better though being made in the same year.
#3 · 19y ago
MI
Migrashin
Quote Originally Posted by FluffyStuff View Post
Thats one of the reasons why i dont like C++ its so fragile (try to compile the source code from another computer and i can acertain you that i wont compile because of linking errors). And the .NET environment of C++ is just pure crap, the one of C# is way better though being made in the same year.

I love how the code he has given is NOT in C++. That is obviously C

printf is a C command or C# i dunno.

std::cout is a C++ command/function anything you want to call it
#4 · 19y ago
arunforce
[MPGH]arunforce
Quote Originally Posted by Migrashin View Post
I love how the code he has given is NOT in C++. That is obviously C

printf is a C command or C# i dunno.

std::cout is a C++ command/function anything you want to call it
No you idiot, that's C++, and C# is C. I didn't read through the code but it looks like the integers you are calling upon are in an array hence the error, try putting [0] after it on the same line of the error. Haven't coded in C++ in a while, so my brain isn't that fresh on it.
#5 · 19y ago
MI
Migrashin
printf is not a C++ command. std::cout is a C++ command.

C:
printf("Hello World!\n");

C++:
cout << "Hello World!" << endl;

or

std::cout << "Hello World!\n";
#6 · 19y ago
FluffyStuff
FluffyStuff
You retard, i just created a new project in C++ (one with Hello World in it) and this file was auto created:
Code:
// Test2.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"

int main(int argc, char* argv[])
{
	printf("Hello World!\n");
	return 0;
}
And just for your info in C# it would be Console.Write("Hello World!");
Please http://www.justfuckinggooglei*****m before making stupid comments.
#7 · 19y ago
Posts 1–7 of 7 · Page 1 of 1

Post a Reply

Similar Threads

  • what is wrong with this ??By floris12345! in Visual Basic Programming
    5Last post 18y ago
  • What is wrong with this code?By t7ancients in C++/C Programming
    10Last post 16y ago
  • What's wrong with this guy?By Mr.Magicman in General
    15Last post 16y ago
  • What's wrong with this?By fvestrgenrl in Combat Arms Hack Coding / Programming / Source Code
    6Last post 16y ago
  • What's wrong with this?By yup in Visual Basic Programming
    4Last post 18y ago

Tags for this Thread

None