M
M
Master Ruby2021-08-19 16:48:56
Python
Master Ruby, 2021-08-19 16:48:56

How to decode .fsb format file to UTF-8?

There is a site that, when requested to this resource, issues a .fsb (FMOD Sample Bank Format file) file ,
this format is usually used in games and stores speech and music. But, the developers of the site store data in it (the name of events and coefficients, a kind of protection, probably store data in this format),
which I'm trying to parse.

To get the data, I use the trace. the code

with open('SOCCER.fsb', 'rb') as f:
    fsb = f.read()

# print(codecs.decode(fsb, "Windows-1251")) выдаёт ошибку
print(fsb.decode('Windows-1251', errors='ignore'))


And I get in response:
ѓ¦catRef¦SOCCERЈ__s‰¤__s0Їcategory|status¤__s1Іid|name|ref|subcat¤__s2Ъ 2countryCode|countryName|event|featured|id|name|ref¤__s7Ъ -bookId|bookType|current|decimal|fractional|id¤__s8Ъ !method|returnCode|timestamp|value¤__s3Ъ rcode|displayed|esport|featured|id|market|marketCnt|name|providerRef|scheduledStart|sourceKey|state|version|virtual¤__s4Ъ ™active|betBoostAvailable|book|cashOutAvailable|displayed|featured|handicap|id|inRunning|isFeatured|name|selection|sequence|state|typeName|typeRef|version¤__s5Ъ cantePost|bogAvailable|bookType|createdOn|id|open|placeTerms|rule4Applicable|rule4Deduction|sequence¤__s6Ъ @active|displayed|id|name|nonRunner|ordinal|price|typeRef|versionЁresponse“¤__s0‘•¤__s1ЁFootball¦SOCCERЬ !¤__s2ўBR¦Brazil“џ¤__s3Ґ29178ГВВО В_Є—Ь ¤__s4ГВ‘›¤__s5ВВҐPRICEП  {[·О	ыВ¬ГВВЛ         ГГВЛ?а      Б1ГВјTotal Goals - Over/Under 0.5’љ¤__s6ГГО0µцMЇUnder 0.5 goalsВ ‘—¤__s7О	ыВ¬ҐPRICEГЛ@!      ¤15/2П   %пЅҐUNDER љ¤__s6ГГО0µцN®Over 0.5 goalsВ‘—¤__s7О	ыВ¬ҐPRICEГЛ?рМММММН¤1/20П   %р/C¤OVER  ¤OPENЄOver/UnderўOU Ь ¤__s4ГВ‘›¤__s5ВВҐPRICEП  {[·О	ыВЇГВВЛ         ГГВЛ@      Б4ГВјTotal Goals - Over/Under 3.5’љ¤__s6ГГО0µцSЇUnder 3.5 goalsВ ‘—¤__s7О	ыВЇҐPRICEГЛ?хU2a|ЪЈ1/3П   %п"ҐUNDER љ¤__s6ГГО0µцT®Over 3.5 goalsВ‘—¤__s7О	ыВЇҐPRICEГЛ      Ј2/1П   %пбЬ¤OVER  ¤OPENЄOver/UnderўOU Ь ¤__s4ГВ‘›¤__s5ВВҐPRICEП  {[·$О	ыВІГВВЛ         ГГВЛ@      Б7ГВјTotal Goals - Over/Under 6.5’љ¤__s6ГГО0µцYЇUnder 6.5 goalsВ ‘—¤__s7О	ыВІҐPRICEГЛ?рbMТсЄҐ1/250П   %пбЭҐUNDER љ¤__s6ГГО0µцZ®Over 6.5 goalsВ‘—¤__s7О	ыВІҐPRICEГЛ@(      ¤11/1П   %О9~¤OVER  ¤OPENЄOver/UnderўOU Ь ¤__s4ГВ‘›¤__s5ВВҐPRICEП  {[·!О	ыВ±ГВВЛ         ГГВЛ@      Б6ГВјTotal Goals - Over/Under 5.5’љ¤__s6ГГО0µцWЇUnder 5.5 goalsВ ‘—¤__s7О	ыВ±ҐPRICEГЛ?р|ЪQО¤1/33П   %О9{ҐUNDER љ¤__s6ГГО0µцX®Over 5.5 goalsВ‘—¤__s7О	ыВ±ҐPRICEГЛ@"      Ј8/1П   %р/I¤OVER  ¤OPENЄOver/UnderўOU Ь ¤__s4ГВ‘›¤__s5ВВҐPRICEП  {[·О	ыВ°ГВВЛ         ГГВЛ@      Б5ГВјTotal Goals - Over/Under 4.5’љ¤__s6ГГО0µцUЇUnder 4.5 goalsВ ‘—¤__s7О	ыВ°ҐPRICEГЛ?т      Ј1/8П   %пЅ#ҐUNDER љ¤__s6ГГО0µцV®Over 4.5 goalsВ‘—¤__s7О	ыВ°ҐPRICEГЛ@      ¤17/4П   %р/H¤OVER  ¤OPENЄOver/UnderўOU Ь ¤__s4ГВ‘›¤__s5ВВҐPRICEП  {[·О	ыВ®ГВВЛ         ГГВЛ@      Б3ГВјTotal Goals - Over/Under 2.5’љ¤__s6ГГО0µцQЇUnder 2.5 goalsВ ‘—¤__s7О	ыВ®ҐPRICEГЛ?э™™™™™љҐ17/20П   %пЅ ҐUNDER љ¤__s6ГГО0µцR®Over 2.5 goalsВ‘—¤__s7О	ыВ®ҐPRICEГЛ?эU2a|ЪЈ5/6П   %р/E¤OVER  ¤OPENЄOver/UnderўOU Ь ¤__s4ГВ‘›¤__s5ВВҐPRICEП  {[·О	ыВ­ГВВЛ         ГГВЛ?ш      Б2ГВјTotal Goals - Over/Under 1.5’љ¤__s6ГГО0µцOЇUnder 1.5 goalsВ ‘—¤__s7О	ыВ­ҐPRICEГЛ@333333¤12/5П   %р/DҐUNDER љ¤__s6ГГО0µцP®Over 1.5 goalsВ‘—¤__s7О	ыВ­ҐPRICEГЛ?ф’:)Зy§Ј2/7П   %пЅ¤OVER  ¤OPENЄOver/UnderўOU јFortaleza U20 U23 v Avai U23¦TXODDSП  {_‘Э ©S_2230489©SCHEDULEDВџ¤__s3Ґ29176ГВВО В_Ё—Ь ¤__s4ГВ‘›¤__s5ВВҐPRICEП  {[‘О	ыВ•ГВВЛ         ГГВЛ@      БГВјTotal Goals - Over/Under 5.5’љ¤__s6ГГО0µх§ЇUnder 5.5 goalsВ ‘—¤__s7О	ыВ•ҐPRICEГЛ?рQл…ёR¤1/50П   %О7јҐUNDER љ¤__s6ГГО0µхЁ®Over 5.5 goalsВ‘—¤__s7О	ыВ•ҐPRICEГЛ@$      Ј9/1П   %О7Ѕ¤OVER  ¤OPENЄOver/UnderўOU Ь ¤__s4ГВ‘›¤__s5ВВҐPRICEП  {[‘О	ыВ’ГВВЛ         ГГВЛ@      БГВјTotal Goals - Over/Under 2.5’љ¤__s6ГГО0µхЎЇUnder 2.5 goalsВ ‘—¤__s7О	ыВ’ҐPRICEГЛ?ь      Ј3/4П   %О7¶ҐUNDER љ¤__s6ГГО0µхў®Over 2.5 goalsВ‘—¤__s7О	ыВ’ҐPRICEГЛ?я333333Ґ19/20П   %О7·¤OVER  ¤OPENЄOver/UnderўOU Ь ¤__s4ГВ‘›¤__s5ВВҐPRICEП  {[‘О	ыВ“ГВВЛ         ГГВЛ@      БГВјTotal Goals - Over/Under 3.5’љ¤__s6ГГО0µхЈЇUnder 3.5 goalsВ ‘—¤__s7О	ыВ“ҐPRICEГЛ?фМММММН¤3/10П   %О7ёҐUNDER љ¤__s6ГГО0µх¤®Over 3.5 goalsВ‘—¤__s7О	ыВ“ҐPRICEГЛ@
ҐPRICEГЛ@(      ¤11/1П   %л™B¤OVER  ¤OPENЄOver/UnderўOU Ь ¤__s4ГВ‘›¤__s5ВВҐPRICEП  {NТТtО	с‰вГВВЛ         ГГВЛ?ш      СФГВјTotal Goals - Over/Under 1.5’љ¤__s6ГГО0‹№¬ЇUnder 1.5 goalsВ ‘—¤__s7О	с‰вҐPRICEГЛ@	™™™™™љ¤11/5П   %ф†„ҐUNDER љ¤__s6ГГО0‹№­®Over 1.5 goalsВ‘—¤__s7О	с‰вҐPRICEГЛ?фМММММН¤3/10П   %л™;¤OVER  ¤OPENЄOver/UnderўOU Ь ¤__s4ГВ‘›¤__s5ВВҐPRICEП  {NТТ~О	с‰жГВВЛ         ГГВЛ@      СШГВјTotal Goals - Over/Under 5.5’љ¤__s6ГГО0‹№ґЇUnder 5.5 goalsВ ‘—¤__s7О	с‰жҐPRICEГЛ?р|ЪQО¤1

Accordingly, reading is not particularly successful. Perhaps someone has an idea how to get a readable output?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
soremix, 2021-08-19
@Dunaevlad

Your file has nothing to do with FMOD Sample Bank. That's what we're talking about,

this format is commonly used in games and stores speech and music

This is a format for sounds, but not for text data. The site just used the same file extension.
This is just a piece from https://fsbtech.com/
Well, accordingly, the site has its own parser of this format

A
alexbprofit, 2021-08-19
@alexbprofit

the library you need

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question