Created
July 24, 2019 15:58
-
-
Save Matoking/e2dfe281386ff4eac9022eb0f02d80cd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import vdf | |
# Extracted from appinfo.vdf | |
data = b"""\x00appinfo\x00\x02appid\x00\xeeC\x00\x00\x00common\x00\x01name\x00Spore\x00\x01metacritic_url\x00pc/spore\x00\x01logo\x0075a96828a453586042ec4231e617070bc2f35625\x00\x01logo_small\x0075a96828a453586042ec4231e617070bc2f35625_thumb\x00\x01icon\x0000e6b5f1f7173e5a2db9978de34df03abb886430\x00\x01clienttga\x000cc129c6dad9c13e38a2cf1bc89eabe2bc4efbef\x00\x01clienticon\x009e1d443f10b72e92b855467cb1b08837126648f6\x00\x00eulas\x00\x000\x00\x01id\x0017390_eula_1\x00\x01name\x00Spore EULA 1\x00\x01url\x00http://store.steampowered.com//eula/17390_eula_1\x00\x08\x08\x01oslist\x00windows\x00\x01osarch\x00\x00\x01type\x00game\x00\x01metacritic_name\x00Spore\x00\x00small_capsule\x00\x01english\x00capsule_231x87.jpg\x00\x08\x00header_image\x00\x01english\x00header.jpg\x00\x08\x00library_assets\x00\x01library_capsule\x00en\x00\x01library_hero\x00en\x00\x01library_logo\x00en\x00\x00logo_position\x00\x01pinned_position\x00BottomCenter\x00\x02width_pct\x00*\x00\x00\x00\x02height_pct\x00\x15\x00\x00\x00\x08\x08\x02store_asset_mtime\x00\xdc4uT\x00associations\x00\x000\x00\x01type\x00developer\x00\x01name\x00Maxis\xe2\x84\xa2\x00\x08\x001\x00\x01type\x00publisher\x00\x01name\x00Electronic Arts\x00\x08\x08\x02primary_genre\x00\x1c\x00\x00\x00\x00genres\x00\x020\x00\x1c\x00\x00\x00\x08\x00category\x00\x02category_2\x00\x01\x00\x00\x00\x08\x00supported_languages\x00\x00english\x00\x01supported\x00true\x00\x08\x00czech\x00\x01supported\x00true\x00\x08\x00danish\x00\x01supported\x00true\x00\x08\x00german\x00\x01supported\x00true\x00\x08\x00spanish\x00\x01supported\x00true\x00\x08\x00finnish\x00\x01supported\x00true\x00\x08\x00french\x00\x01supported\x00true\x00\x08\x00italian\x00\x01supported\x00true\x00\x08\x00hungarian\x00\x01supported\x00true\x00\x08\x00dutch\x00\x01supported\x00true\x00\x08\x00norwegian\x00\x01supported\x00true\x00\x08\x00polish\x00\x01supported\x00true\x00\x08\x00russian\x00\x01supported\x00true\x00\x08\x00swedish\x00\x01supported\x00true\x00\x08\x00portuguese\x00\x01supported\x00true\x00\x08\x08\x02steam_release_date\x00\x80TKI\x02metacritic_score\x00T\x00\x00\x00\x01metacritic_fullurl\x00https://www.metacritic.com/game/pc/spore?ftag=MCD-06-10aaa1f\x00\x02community_visible_stats\x00\x01\x00\x00\x00\x02community_hub_visible\x00\x01\x00\x00\x00\x02gameid\x00\xeeC\x00\x00\x00store_tags\x00\x020\x00W\x02\x00\x00\x021\x00\xe2\x0e\x00\x00\x022\x00\x9f\x06\x00\x00\x023\x00\xfa\x0e\x00\x00\x024\x00\xdb\x06\x00\x00\x025\x00\x15\x00\x00\x00\x026\x00\xb4\x14\x00\x00\x027\x00V\x10\x00\x00\x028\x00\x89\x06\x00\x00\x029\x00\t\x00\x00\x00\x0210\x00f\x0f\x00\x00\x0211\x00(\x10\x00\x00\x0212\x00\xa2\x16\x00\x00\x0213\x00\xe6\x14\x00\x00\x0214\x00\x13\x0f\x00\x00\x0215\x00\x13\x00\x00\x00\x0216\x00z\x00\x00\x00\x0217\x00U\x02\x00\x00\x0218\x00\xb7\x06\x00\x00\x0219\x00\x8c\x06\x00\x00\x08\x08\x00extended\x00\x01developer\x00Maxis\xe2\x84\xa2\x00\x01gamedir\x00Spore\x00\x01homepage\x00http://www.spore.com/\x00\x01icon\x00\x00\x01installscript\x00InstallScript.vdf\x00\x01languages\x00english,german,french,spanish,russian,czech,danish,finnish,hungarian,italian,dutch,norwegian,polish,swedish,portuguese\x00\x01launcheula\x00http://storefront.steampowered.com/eula_testapp17390\x00\x01legacykeyregistrationmethod\x00registry\x00\x01legacykeyregistrylocation\x00HKEY_CURRENT_USER\\Software\\Valve\\TestApp17390\\SteamKey\x00\x02noservers\x00\x01\x00\x00\x00\x02order\x00\x01\x00\x00\x00\x02primarycache\x00\xefC\x00\x00\x01serverbrowsername\x00\x00\x02showcdkeyinmenu\x00\x01\x00\x00\x00\x01state\x00eStateAvailable\x00\x01publisher\x00Electronic Arts\x00\x01gamemanualurl\x00https://store.steampowered.com/manual/17390/\x00\x08\x00config\x00\x02contenttype\x00\x03\x00\x00\x00\x01installdir\x00Spore\x00\x00launch\x00\x000\x00\x01executable\x00SporeBin\\SporeApp.exe\x00\x08\x001\x00\x01description\x00View Support Information\x00\x01executable\x00Support\\EA Help\\Electronic_Arts_Technical_Support.htm\x00\x08\x08\x02installscriptoverride\x00\x01\x00\x00\x00\x01installscriptsignature\x0062e8c1898258d71af7805bd5810174a549aa23cdd542e9a1e7f3c709a0cff7806226260b718038c937bc0bc08f2706ec2ea86fe75141a252bf81e3685673044c126148d32a2d20aa528c328ab639f516bcd738fb7d60b268cd85d1c1d505ca67309d5b1aadb78fd5d3ebc93093203cb6bb24492657c2ecb8caf76a8e9d631cdf\x00\x08\x00install\x00\x00registry\x00\x00hkey_local_machine\\software\\electronic arts\\ea games\\spore(tm)\\ergc\x00\x00string\x00\x01(default)\x00%CDKEY%\x00\x08\x08\x00hkey_local_machine\\software\\electronic arts\\spore\x00\x00dword\x00\x02reindexyesorno\x00\x00\x00\x00\x00\x02installcompleted\x00\x01\x00\x00\x00\x08\x00string\x00\x01appdir\x00Spore\x00\x01installloc\x00%INSTALLDIR%\x00\x01datadir\x00%INSTALLDIR%\\Data\x00\x00czech\x00\x01locale\x00cs-cz\x00\x01playerdir\x00Moje Spore v\xfdtvory\x00\x08\x00danish\x00\x01locale\x00da-dk\x00\x01playerdir\x00Mine Spore-kreationer\x00\x08\x00german\x00\x01locale\x00de-de\x00\x01playerdir\x00MeinSpore-Kreationen\x00\x08\x00english\x00\x01locale\x00en-us\x00\x01playerdir\x00My Spore Creations\x00\x08\x00spanish\x00\x01locale\x00es-es\x00\x01playerdir\x00Mis Creaciones Spore\x00\x08\x00finnish\x00\x01locale\x00fi-fi\x00\x01playerdir\x00Omat Spore-luomukset\x00\x08\x00french\x00\x01locale\x00fr-fr\x00\x01playerdir\x00Mes Cr\xe9ations\x00\x08\x00hungarian\x00\x01locale\x00hu-hu\x00\x01playerdir\x00Sp\xf3ralkot\xe1sok\x00\x08\x00italian\x00\x01locale\x00it-it\x00\x01playerdir\x00Creazioni Spore\x00\x08\x00dutch\x00\x01locale\x00nl-nl\x00\x01playerdir\x00Mijn Spore-creaties\x00\x08\x00norwegian\x00\x01locale\x00no-no\x00\x01playerdir\x00Mine Spore-skapninger\x00\x08\x00portuguese\x00\x01locale\x00pt-pt\x00\x01playerdir\x00As Minhas Cria\xe7\xf5es Spore\x00\x08\x00polish\x00\x01locale\x00pl-pl\x00\x01playerdir\x00Moje dziela SPORE\x00\x08\x00russian\x00\x01locale\x00ru-ru\x00\x01playerdir\x00My Spore Creations\x00\x08\x00swedish\x00\x01locale\x00sv-se\x00\x01playerdir\x00Mina Sporeskapelser\x00\x08\x08\x08\x08\x00run process\x00\x00dxsetup\x00\x01hasrunkey\x00HKEY_CURRENT_USER\\Software\\Valve\\Steam\\Apps\\17390\x00\x01process 1\x00%INSTALLDIR%\\installers\\DX9Redist\\DXSETUP.exe\x00\x01command 1\x00/silent\x00\x02nocleanup\x00\x01\x00\x00\x00\x08\x08\x08\x00depots\x00\x0017441\x00\x01name\x00Spore Creepy and Cute Parts Content\x00\x02optional\x00\x01\x00\x00\x00\x02systemdefined\x00\x01\x00\x00\x00\x00manifests\x00\x01public\x00617554868852897783\x00\x08\x02maxsize\x00_%M\x03\x08\x0017391\x00\x01name\x00Spore Depot\x00\x02systemdefined\x00\x01\x00\x00\x00\x00manifests\x00\x01public\x006504940830698406585\x00\x08\x01maxsize\x004170315696\x00\x08\x00355\x00\x01name\x00Spore runme content\x00\x02systemdefined\x00\x01\x00\x00\x00\x00manifests\x00\x01public\x005583537944574530091\x00\x08\x02maxsize\x00\x17\xa0\x00\x00\x08\x02overridescddb\x00\x01\x00\x00\x00\x01baselanguages\x00english,german,french,italian,spanish,russian,portuguese,polish,danish,dutch,finnish,norwegian,swedish,hungarian,czech\x00\x00branches\x00\x00public\x00\x02buildid\x00\x0e\x96\x19\x00\x02timeupdated\x00D\n\xd0X\x08\x00beta\x00\x02buildid\x00\x0e\x96\x19\x00\x01description\x00\x00\x02pwdrequired\x00\x01\x00\x00\x00\x02timeupdated\x00\xd3[\xbfX\x08\x08\x08\x08\x08""" | |
# This will fail due to an UnicodeDecodeError when trying to decode | |
# a field with this byte string to UTF-8: b'Moje Spore v\xfdtvory' | |
result = vdf.binary_loads(data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment