ECMAScript binary decompiler¶
Frontier Smart products with the Venice 8 module store a different directory archive. Most of the files stored there are written in the ECMAScript language and converted to binary files. They are most likely used to create the web interface for the devices.
- esbin.ES_BIN_SUFFIX = '\\.es\\d?\\.bin'¶
This module will accept files with an extension that matches the defined regular expression. The following examples illustrate which file names are included:
>>> esbin.is_valid_ext('foobar.es.bin')
True
>>> esbin.is_valid_ext('foobar.es')
False
>>> esbin.is_valid_ext('foobar.es6.bin')
True
- esbin.ES_BIN_MAGIC = b'\x07\x00\xad\xde'¶
ECMAScript binary files always start with header information and a file
signature, which is DE AD 00 07
(ScriptMonkey v1.8).
- fsapi.ecmascript.esbin.is_valid_ext(name: str) bool ¶
Applies the ES_BIN_SUFFIX pattern on the given string.
- Parameters:
name – usually the file name to test/ validate
- Return type:
bool:
- Returns:
True
if “.es[:number:]?.bin
” was found in the given string;False
otherwise.
- class fsapi.ecmascript.esbin.Decompiler(decompiler_path: str, file_path: str)¶
Wrapper for executable decompilers.
- property code: str¶
Returns the decompiled source code as UTF-8 string.
- Returns:
the decompiled source code
- Return type:
str
- do_final() str ¶
Executes the decompiler binary
- Raises:
ValueError – if the input file is invalid
- Returns:
the decompiled source code
- Return type:
str