A binary loader for .moc3
files. It has been tested and is able to load the
following versions of this data format:
- v3.0
- v3.3
- v4.0 (though this version did not seem to be any different than v3.3)
- v4.2
- v5.0
It can correctly identify all sections of these versions, and load all the
relevant data into meaningful data types like ArtMesh
, Part
, Deformer
, etc.
Run the following Cargo command in your project directory (assuming you have cargo-edit installed):
cargo add moc3
Or add the following line to your Cargo.toml
(in the [dependencies]
array):
moc3 = "^ 0.2"
use moc3::Model;
use std::io::Read;
fn main() {
let moc3 = std::fs::read("./path/to/some.moc3").unwrap();
let model = Model::read(moc3).unwrap();
println!("{model:#?}");
}
- Carefully, without using or referencing any code or libraries from the format vendor.
- The ImHex highlighting patterns from the MOC3ingbird Exploit (CVE-2023-27566) was instrumental in understanding this format.
- The discovery process for undocumented binary formats is described here.
moc3
is available under the MIT License. See LICENSE.txt
for the full text.
While the license is short, it's still written in fancy lawyer-speak. If you prefer more down-to-earth language, consider the following: