Jump to content

Hide Xtea Keys


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
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
Share on other sites

Announcements



×
×
  • 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.