Jump to content

Python file extractor height.raw


Recommended Posts

  • Premium

Hey m2dev,

 

I wanna extract the official patches, but everytime when I try to unpack the metin2_patch_eu3 this error appears:

Could not read 'metin2_map_devilscatacomb/000000/height.raw'

 

So the problem is the file height.raw. If I skip this file the error appears in the next folder e.g.'001000/height.raw'.

In the XML of the patch is height.raw packed with file type 5 but I think this isn't the problem.

 

So, what can I do?

 

Thanks

Link to comment
Share on other sites

  • Premium

Grab it from the ogher one server ex. WoM (they have same keys as global), but in their files this patches are unprotected (i'm preety sure, you'll unpack DC without problems ^^).

 

 

In other way, you can use files from this package.

This is the hidden content, please

 

 

As far as I remember i can't unpack height.raw from DC  too and i used this files from archive which i post up. I don't know wy, but ScriptStealer can't extract height from DC.

Link source: http://www.elitepvpers.com/forum/metin2-pserver-guides-strategies/2063156-release-devils-catacomb-full-entbuggt.html

  • Metin2 Dev 3
  • Good 1
Link to comment
Share on other sites

  • Bronze

So the problem is the file height.raw. If I skip this file the error appears in the next folder e.g.'001000/height.raw'.

In the XML of the patch is height.raw packed with file type 5 but I think this isn't the problem.

enum EEterPackTypes
{
	DBNAME_MAX_LEN = 255,
	FILENAME_MAX_LEN = 160,
	FREE_INDEX_BLOCK_SIZE = 32768,
	FREE_INDEX_MAX_SIZE = 512,
	DATA_BLOCK_SIZE = 256,

	COMPRESSED_TYPE_NONE = 0,
	COMPRESSED_TYPE_COMPRESS = 1,
	COMPRESSED_TYPE_SECURITY = 2,
	COMPRESSED_TYPE_PANAMA = 3,
	COMPRESSED_TYPE_HYBRIDCRYPT = 4,
	COMPRESSED_TYPE_HYBRIDCRYPT_WITHSDB = 5,
	COMPRESSED_TYPE_COUNT = 6,
};

CEterPack::Get -

 

bool CEterPack::Get(CMappedFile& out_file, const char * filename, LPCVOID * data)
{
	TEterPackIndex * index = FindIndex(filename);
	
	if (!index)
	{
		return false;
	}

	//UpdateLastAccessTime();
	//if (!m_bIsDataLoaded)
	//{
	//	if (!m_file.Create(m_stDataFileName.c_str(), (const void**)&m_file_data, 0, 0))
	//		return false;
	//	
	//	m_bIsDataLoaded = true;
	//}
	
	// ±âÁ¸¿¡´Â CEterPack¿¡¼­ epk¸¦ memory map¿¡ ¿Ã·Á³õ°í, ¿äûÀÌ ¿À¸é ±× ºÎºÐÀ» ¸µÅ©Çؼ­ ³Ñ°Ü Áá¾ú´Âµ¥,
	// ÀÌÁ¦´Â ¿äûÀÌ ¿À¸é, ÇÊ¿äÇÑ ºÎºÐ¸¸ memory map¿¡ ¿Ã¸®°í, ¿äûÀÌ ³¡³ª¸é ÇØÁ¦ÇÏ°Ô ÇÔ.
	out_file.Create(m_stDataFileName.c_str(), data, index->data_position, index->data_size);
	
	bool bIsSecurityCheckRequired = ( index->compressed_type == COMPRESSED_TYPE_SECURITY ||
									  index->compressed_type == COMPRESSED_TYPE_PANAMA );

	if( bIsSecurityCheckRequired )
	{
#ifdef CHECKSUM_CHECK_MD5
		MD5_CTX context;
		GenerateMD5Hash( (BYTE*)(*data), index->data_size, context );

		if( memcmp( index->MD5Digest, context.digest, 16 ) != 0 )
		{
			return false;
		}	
#else
		DWORD dwCrc32 = GetCRC32((const char*)(*data), index->data_size);

		if( index->data_crc != dwCrc32 )
		{
			return false;
		}
#endif
	}


	if (COMPRESSED_TYPE_COMPRESS == index->compressed_type)
	{
		CLZObject * zObj = new CLZObject;

		if (!CLZO::Instance().Decompress(*zObj, static_cast<const BYTE *>(*data)))
		{
			TraceError("Failed to decompress : %s", filename);
			delete zObj;
			return false;
		}

		out_file.BindLZObject(zObj);
		*data = zObj->GetBuffer();
	}
	else if (COMPRESSED_TYPE_SECURITY == index->compressed_type)
	{
		CLZObject * zObj = new CLZObject;

		if (!CLZO::Instance().Decompress(*zObj, static_cast<const BYTE *>(*data), s_adwEterPackSecurityKey))
		{
			TraceError("Failed to encrypt : %s", filename);
			delete zObj;
			return false;
		}

		out_file.BindLZObject(zObj);
		*data = zObj->GetBuffer();
	}
	else if (COMPRESSED_TYPE_PANAMA == index->compressed_type)
	{
		CLZObject * zObj = new CLZObject;
		__Decrypt_Panama(filename, static_cast<const BYTE*>(*data), index->data_size, *zObj);
		out_file.BindLZObjectWithBufferedSize(zObj);
		*data = zObj->GetBuffer();
	}
	else if (COMPRESSED_TYPE_HYBRIDCRYPT == index->compressed_type || COMPRESSED_TYPE_HYBRIDCRYPT_WITHSDB == index->compressed_type)
	{
#ifdef __THEMIDA__
		VM_START
#endif
	
		CLZObject * zObj = new CLZObject;

		if( !m_pCSHybridCryptPolicy->DecryptMemory(string(filename), static_cast<const BYTE*>(*data), index->data_size, *zObj) )
		{
			return false;
		}

		out_file.BindLZObjectWithBufferedSize(zObj);
		if( COMPRESSED_TYPE_HYBRIDCRYPT_WITHSDB == index->compressed_type)
		{
			BYTE* pSDBData;
			int   iSDBSize;

			if( !m_pCSHybridCryptPolicy->GetSupplementaryDataBlock(string(filename), pSDBData, iSDBSize) )
			{
				return false;
			}

			*data = out_file.AppendDataBlock( pSDBData, iSDBSize );
		}
		else
		{
			*data = zObj->GetBuffer();
		}
#ifdef __THEMIDA__
		VM_END
#endif
	}
	return true;
}
 

 

I think you are thinking all pack types as normal encryption or something.

 

Kind Regards

Zerelth ~ Ellie

Do not be sorry, be better.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

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.