Parsing input file

Doubts, help and support about QuickBMS and other game research tools
BySc
Posts: 4
Joined: Sun Jun 23, 2019 2:06 pm

Parsing input file

Post by BySc »

Hello everyone i have file contain strings i want to use this file for parsing and using for program output format, let me explain this

My string file format looks like this

Code: Select all

{
 "000caea980dae9d0101de16ed0f10be4" : "Office_Scientist.png",
   "002ab62ac4f3ba0a32efe2a05e0a0cf3" : "RAFuncNewbieStepHandler_130_Self.lua",
   "003602f7dc69e1039b608266e46d82bf" : "TestProText2_0.png",
   "003cbe36113bfba471af2550c9d0be19" : "Army_YuriWall_Action.plist",
}


And my bms script doing this, I am giving input file like "000caea980dae9d0101de16ed0f10be4" this one

Code: Select all

goto 4
get size long
savepos offset
encryption rc4 KEY
#math SIZE - OFFSET
get NAME basename
string NAME += ".png"
log NAME offset size


But all files not png format so how can I parse all formats and seperate for output file format.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Parsing input file

Post by aluigi »

Code: Select all

for
    get TMP line
    string ELEMENTS S TMP NAME1 DIV NAME2
    if ELEMENTS >= 3
        open FDSE NAME1 1

        get size long 1
        encryption rc4 KEY
        log NAME2 4 size 1

    endif
next