Register for your free account! | Forgot your password?

You last visited: Today at 15:30

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Hack Fixes

Discussion on Hack Fixes within the Flyff PServer Guides & Releases forum part of the Flyff Private Server category.

Reply
 
Old   #1
 
elite*gold: 50
Join Date: Jun 2015
Posts: 100
Received Thanks: 210
Hack Fixes

I don't really like hackers aiming for destroying every single server with little security issues, hence I'm going to release every single dupe/stack fix I find during the development of Memories of Madrigal.

Here are 3 to begin with, I'm going to update this thread accordingly.


Housing Crash:

In the function CHousing::IsSetupAble add

Code:
	if(housingInfo.bSetup)
	{
		if(pItemPropReq->dwItemKind3 != IK3_WALLPAPER && pItemPropReq->dwItemKind3 != IK3_CARPET)
		{
			if(!pWorld->VecInWorld(housingInfo.vPos))
			{
				return FALSE;
			}
		}
	}
below

Code:
	ItemProp* pItemPropReq = prj.GetItemProp( housingInfo.dwItemId );
	if( !pItemPropReq )
		return FALSE;
Bug type: Delayed crash
Issue: Trying to delete not spawned object
Further prevention: Check all AddObj calls return value for true and invalidate the object if false is returned.



BuyItem Dupe:

In the function CDPSrvr::OnBuyItem add

Code:
		long long lEntireCost = nNum * nCost;
		if(lEntireCost > INT_MAX)
		{
			return;
		}
below

Code:
#if __VER >= 11 // __MA_VER11_02
		if( pItemElem->m_dwItemId == II_SYS_SYS_SCR_PERIN )
			nCost = PERIN_VALUE;
#endif //__MA_VER11_02
		if( nCost < 1 )
			nCost = 1;
Bug type: Buy more items for less money
Issue: Int overflow

Consignment Stat Stack (WurstbrotQT Consignment):

In the function CConsignmentMng::AddItem add

Code:
	if(pVendor->m_Inventory.IsEquip(dwItemId))
	{
		return
	}
below

Code:
	if( nCount <= 0 || nCount > pItemElem->m_nItemNum )
		return false;
Bug type: Stat stack
Issue: Removing an equipped item
ディオニュソス is offline  
Thanks
28 Users
Old 07/16/2015, 15:06   #2
 
xTwiLightx's Avatar
 
elite*gold: 0
Join Date: Jan 2009
Posts: 1,741
Received Thanks: 1,674
Its nice to see that there are still people who are sharing fixes like these, not only the fix itself but also some short description what is causing the bug/crash and how to fix it.

I appreciate that a lot!
xTwiLightx is offline  
Thanks
3 Users
Old 07/16/2015, 15:53   #3
 
elite*gold: 0
Join Date: Oct 2014
Posts: 57
Received Thanks: 68
I think there is something wrong:
Quote:
if(pItemPropReq->dwItemKind3 != IK3_WALLPAPER && pItemProp->dwItemKind3 != IK3_CARPET)
{
if(!pWorld->VecInWorld(housingInfo.vPos))
{
return FALSE;
}
}
Change the pItemProp to pItemPropReq ^^
Xylenu is offline  
Thanks
1 User
Old 07/16/2015, 15:57   #4
 
elite*gold: 50
Join Date: Jun 2015
Posts: 100
Received Thanks: 210
Quote:
Originally Posted by Xylenu View Post
I think there is something wrong:
Change the pItemProp to pItemPropReq ^^
Yeah, I've already fixed that, sorry, the thread's been written with the phone and some information may or may not be lost.

I've also added a check to the housing crash to only check if the item is to be added.

Some further input about integer overflow:
Rather than let them happen I personally check whether an arithmetic operation is possible without an overflow since unsigned integer overflows result in undefined behaviour (C99 3.4.3/1).

I'm using the following utility functions to check whether the operation will overflow or not:
Code:
	class CUtils{
	public:
		template<class T>
		static bool CanAdd(const T & value, const T & toadd)
		{
			const T max = pow(static_cast<T>(2), static_cast<T>(sizeof(T) * 8 - 1)) - 1;

			ASSERT(value >= 0);
			ASSERT(toadd >= 0);

			if (value == 0 || toadd == 0)
				return true;

			return (max - toadd) >= value;
		}

		template<class T>
		static bool CanMul(const T & value, const T & factor)
		{
			// assuming signed T
			const T max = pow(static_cast<T>(2), static_cast<T>(sizeof(T) * 8 - 1)) - 1;

			ASSERT(value >= 0);
			ASSERT(factor >= 0);

			// divide by zero/fast exit
			if (factor == 0 || value == 0)
				return true;

			return (value <= max / factor);
		}

	private:
		template<class T>
#if _MSC_VER > 1800
		constexpr static T pow(const T base, unsigned const exponent)
#else
		static T pow(const T base, unsigned const exponent)
#endif
		{
			return (exponent == 0) ? 1 : (base * pow(base, exponent - 1));
		}
	};
ディオニュソス is offline  
Thanks
3 Users
Reply


Similar Threads Similar Threads
Fixes for GhostLoL - Fixes (UPDATING)
12/05/2014 - League of Legends Hacks, Bots, Cheats & Exploits - 2 Replies
Hello, this thread is about GhostLoL issues and how to fix them. Known issues: 1. PROBLEM - No internet connection when trying to reach lol download page (or another page..) ANSWER - Open ie (internet explorer) and then search for tools>Internet Options>Advanced>Now scroll down untill you see TLS something (example: tls 1.0), and check them all (make them with V). In expample, I had tls 1.0, tls 2.0 and tls 3.0, then I checked them all and now it works. CREDIT - murat65
[Selling] [SOURCE] Hack/Exploit Fixes & More!
05/03/2014 - Flyff Trading - 0 Replies
I've been on the Private Server scene for a long time now and i know nearly every Bug/Exploit from the past 8 years! And I see there are so many servers that got so many bugs and exploits which havent been fixed yet. So Im here to help you out! Im selling some of the major bug/exploit fixes to you for a very fair price! And of course i will implement them into your Source for free! Every of these fixes are test many times and they work 100% guaranteed, otherwise you will get your money...
MW2 Multi Hack {NHVH} 4.0 RE-POSTED WITH FIXES
04/27/2013 - Call of Duty Hacks, Bots, Cheats & Exploits - 77 Replies
MW2 Multi Hack {NHVH} 4.0 RE-POSTED WITH FIXES VAC STATUS: USE AT OWN RISK! What is this Hack?: This is a Mutli Hack for Mw2 the full name of this hack is "Night Hawk Vision Hack".
Hack Fixes(Including Dupe Hack)
08/01/2012 - Flyff PServer Guides & Releases - 0 Replies
Some guy from AscensionFlyff thought he would go around trying to start server wars or something. Used a dupe exploit in the Flyff source(wasn't too hard to find). Here's the fix for it since he lied to me about the exploit being in my code. Dupe Fix: I'll update this if he uses any more exploits on my server. Update - Dupe explanation I posted on another forum:
Enchant / Fixes hack?
08/09/2011 - Ace Online / AirRivals - 3 Replies
If any1 got a hack to find the fix i want on my weapons or enchant %% i would pay u 3$ or something like that >.< Post link pl0x



All times are GMT +1. The time now is 15:30.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.