Jump to content

Recommended Posts

My name is ramy, I'm a junior programmer with experience of about two years in (STL , boost .. and soo on ) I live Netherlands since 10 years, but i was born in USA :) Now I'll show you how you can protect your tea-keys against hackers. I love very much c ++ 11 / c ++ 17, so the codes will only work with Visual Studio 2013 or higher.

I saw someone selling it, so I thought to give you something better, I think.

I came to this forum because someone hired me to work on his server and he recommended me to come here if I need help, ever.

Firstly include those two STL headers  intro EterPack.h

#include <cstdint>
#include <array>

EterPack.h

struct TeaKey
{
// Date: 01 . 12 . 2016
// Author: Ramy overflow
	TeaKey(std::array<DWORD, 4>src): data_(src), copy(src) {}

	operator const std::uint8_t *()const
	{
		return reinterpret_cast<const std::uint8_t *>(data_.data());
	}

	operator const DWORD *()const
	{
		return data_.data();
	}

	operator DWORD *()const
	{
		return copy.data();
	}

private:
	std::array<DWORD, 4>data_;
	mutable std::array<DWORD, 4>copy;
};

 

EterPack.cpp

const TeaKey &s_adwEterPackKey()
{
// Date: 01 . 12 . 2016
// Author: Ramy overflow
	static const TeaKey key
	{
		std::array < DWORD, 4 > {{
				45129401UL,
				92367215UL,
				681285731UL,
				1710201UL,
			}
		}
	};
	return key;
}

const TeaKey &s_adwEterPackSecurityKey()
{
// Date: 01 . 12 . 2016
// Author: Ramy overflow
	static const TeaKey key
	{
		std::array < DWORD, 4 > {{
				78952482UL,
				527348324UL,
				1632942UL,
				486274726UL,
			}
		}
	};
	return key;
}

And now search for all  s_adwEterPackKey / s_adwEterPackSecurityKey and replace with  s_adwEterPackKey() / s_adwEterPackSecurityKey() so just add an ()  because it's a function :)

 

Sincerely , Ramy overfow :)

  • Love 3
Link to comment
https://metin2.dev/topic/14339-hide-xtea-keys/
Share on other sites

On 14.12.2016 at 5:22 AM, Fleon said:

So this basically just hide xteas and magic ?
So the scriptkiddie cant easily get them to decrypt right?
Thanks tho for the relase man, really appreciated.

 

Yes , just hide (Not encryption). 

Link to comment
https://metin2.dev/topic/14339-hide-xtea-keys/#findComment-81443
Share on other sites

  • 7 months later...
  • 2 months later...
On 12/14/2016 at 3:25 AM, MORTE said:

 

On 12/13/2016 at 6:56 PM, 127.0.0.1 said:

My name is ramy, I'm a junior programmer with experience of about two years in (STL , boost .. and soo on ) I live Netherlands since 10 years, but i was born in USA :) Now I'll show you how you can protect your tea-keys against hackers. I love very much c ++ 11 / c ++ 17, so the codes will only work with Visual Studio 2013 or higher.

I saw someone selling it, so I thought to give you something better, I think.

I came to this forum because someone hired me to work on his server and he recommended me to come here if I need help, ever.

Firstly include those two STL headers  intro EterPack.h


#include <cstdint>
#include <array>

EterPack.h


struct TeaKey
{
// Date: 01 . 12 . 2016
// Author: Ramy overflow
	TeaKey(std::array<DWORD, 4>src): data_(src), copy(src) {}

	operator const std::uint8_t *()const
	{
		return reinterpret_cast<const std::uint8_t *>(data_.data());
	}

	operator const DWORD *()const
	{
		return data_.data();
	}

	operator DWORD *()const
	{
		return copy.data();
	}

private:
	std::array<DWORD, 4>data_;
	mutable std::array<DWORD, 4>copy;
};

 

EterPack.cpp


const TeaKey &s_adwEterPackKey()
{
// Date: 01 . 12 . 2016
// Author: Ramy overflow
	static const TeaKey key
	{
		std::array < DWORD, 4 > {{
				45129401UL,
				92367215UL,
				681285731UL,
				1710201UL,
			}
		}
	};
	return key;
}

const TeaKey &s_adwEterPackSecurityKey()
{
// Date: 01 . 12 . 2016
// Author: Ramy overflow
	static const TeaKey key
	{
		std::array < DWORD, 4 > {{
				78952482UL,
				527348324UL,
				1632942UL,
				486274726UL,
			}
		}
	};
	return key;
}

And now search for all  s_adwEterPackKey / s_adwEterPackSecurityKey and replace with  s_adwEterPackKey() / s_adwEterPackSecurityKey() so just add an ()  because it's a function :)

 

Sincerely , Ramy overfow :)

so which method is betteR ? or both are shit ? xD

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
https://metin2.dev/topic/14339-hide-xtea-keys/#findComment-94067
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.