8000 GitHub - svecol/kaitai_struct_webide: A version of Kaitai IDE for better file format reverse engineering
[go: up one dir, main page]

Skip to content

A version of Kaitai IDE for better file format reverse engineering

License

Notifications You must be signed in to change notification settings

svecol/kaitai_struct_webide

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

a version of Kaitai Struct WebIDE

Online editor / visualizer for Kaitai Struct .ksy files

Hack for better reverse engineering of file formats

Normally when you get an error while parsing a file with your .ksy, you can't really see how exactly it failed - you get some error message in the error window and the object tree window shows the last successful parsing. This version has a hack that lets you actually see the best attempt at parsing your file till the place where the parsing is no longer possible. This includes EOF and discrepancies between the content of file and "magic constants" defined in the .ksy file.

When the parsing failed you will see no error message, but there will be an f-word key in the object tree. How failed parsing appears in the object tree Corresponding HEX The way it works is that in the debug version of js parser the body of the read function of the root class gets enveloped with try-catch construction, which prevents getting error.

This is obviously a hack - the IDE should not be parsing the code of the js-parser. So I don't propose the change to the source repository.

Notes on usage

Repeat

Due to the way repeats are implemented, if parsing fails, in the object tree you will only get the successfully parsed repeated substructures, and there will be no failed one. And if the substructure is not simple, finding the source of the error will be hard. In such cases I recommend to change the number of repeats to the number of successfully parsed substructures, and then add another one with no repeat key.

- id: kek
  type: kek
  repeat: expr
  repeat-expr: 15

Only got 10 in the parsing tree.

- id: kek
  type: kek
  repeat: expr
  repeat-expr: 10
- id: kek1
  type: kek

compile and run locally

  • git clone --recursive https://github.com/svecol/kaitai_struct_webide
  • npm install
  • node serve.js --compile
  • Go to http://127.0.0.1:8000/ the rest is from the original file

features

See the Features wiki page

community

Visit us on Gitter

screenshots

Example screenshot of a .zip file Example screenshot of a .png file

For more screenshots visit the Features wiki page

About

A version of Kaitai IDE for better file format reverse engineering

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 64.8%
  • JavaScript 21.3%
  • HTML 10.2%
  • CSS 1.9%
  • Python 1.3%
  • Kaitai Struct 0.4%
  • Shell 0.1%
0