{"id":19045439,"url":"https://github.com/marirs/ole-rs","last_synced_at":"2025-04-23T23:46:45.993Z","repository":{"id":49555124,"uuid":"458017893","full_name":"marirs/ole-rs","owner":"marirs","description":"Parser to analyze MS OLE2 files (Structured Storage, Compound File Binary Format) and MS Office documents.","archived":false,"fork":false,"pushed_at":"2022-08-17T05:05:14.000Z","size":3405,"stargazers_count":10,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-18T08:39:36.860Z","etag":null,"topics":["coumpund-document","ole","olefile","oletools","rust","rust-crate","rust-lang","rust-library"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marirs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-Apache","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-02-11T02:24:36.000Z","updated_at":"2025-03-02T11:52:32.000Z","dependencies_parsed_at":"2022-08-19T05:01:57.040Z","dependency_job_id":null,"html_url":"https://github.com/marirs/ole-rs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marirs%2Fole-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marirs%2Fole-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marirs%2Fole-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marirs%2Fole-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marirs","download_url":"https://codeload.github.com/marirs/ole-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250535084,"owners_count":21446504,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["coumpund-document","ole","olefile","oletools","rust","rust-crate","rust-lang","rust-library"],"created_at":"2024-11-08T22:50:12.467Z","updated_at":"2025-04-23T23:46:45.946Z","avatar_url":"https://github.com/marirs.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OLE\n[![Linux Arm7](https://github.com/marirs/ole-rs/actions/workflows/linux_arm.yml/badge.svg)](https://github.com/marirs/ole-rs/actions/workflows/linux_arm.yml)\n[![Linux x86_64](https://github.com/marirs/ole-rs/actions/workflows/linux_x86_64.yml/badge.svg)](https://github.com/marirs/ole-rs/actions/workflows/linux_x86_64.yml)\n[![macOS](https://github.com/marirs/ole-rs/actions/workflows/macos.yml/badge.svg)](https://github.com/marirs/ole-rs/actions/workflows/macos.yml)\n[![Windows](https://github.com/marirs/ole-rs/actions/workflows/windows.yml/badge.svg)](https://github.com/marirs/ole-rs/actions/workflows/windows.yml)\n\nA set of OLE parsers and tools to deal with OLE files.\n\n### Requirements\n\n- Rust 1.56+ (edition: 2021)\n\n### Tools\n- **OleId** : A tool to analyze OLE files such as MS Office documents (e.g. Word,\n  Excel), to detect specific characteristics that could potentially indicate that\n  the file is suspicious or malicious, in terms of security (e.g. malware).\n- **OleObj** : A tool to parse OLE objects and files stored into various MS Office file formats (doc, xls, ppt, docx, xlsx, pptx, etc).\n- **Ole-Common** : A crate that reads and parses OLE files.\n## 1. OleId\nThis is a tool to analyze MS Office documents(eg. Word, Excel) to detect specific characteristics common in malicious files.\n### CLI Usage\n```\noleid [options] \u003cfilename\u003e \n\nOptions\n\n--file: The filepath to the file to process.\n```\n\n### Library Usage\n```rust\nuse oleid::oleid::OleId;\n\npub fn main() {\n  let mut oleid = OleId::new(file_path);\n  let indicators = oleid.check();\n  println!(\"{:#?}\", indicators);\n}\n```\n\n## 2.OleObj\nThis is a tool to parse OLE objects and files stored into various MS Office file formats (doc, xls, ppt, docx, xlsx, pptx, etc).\n### Usage\n```\noleobj [options] \u003cfilename\u003e \n\nOptions\n\n--file: The filepath to the file to process.\n```\n\n## 3. Ole-Common\n### Example Usage\n\n- add dependency (default feature is to use async)\n```toml\n[dependencies]\nole-common = { git = \"https://github.com/marirs/ole-rs.git\", branch = \"master\" }\n```\n- example code\n```rust\nuse ole::OleFile;\n\nfn main() {\n    let file = \"data/oledoc1.doc_\";\n    let res = OleFile::from_file(file).await.expect(\"file not found\");\n    println!(\"{:#?}\", \u0026res);\n    println!(\"entries: {:#?}\", res.list_streams());\n}\n```\n\n- dependency with blocking\n```toml\n[dependencies]\nole-common = { git = \"https://github.com/marirs/ole-rs.git\", branch = \"master\", default-features = false, features = [\"blocking\"] }\n```\n\n- example code\n```rust\nuse ole::OleFile;\n\nfn main() {\n    let file = \"data/oledoc1.doc_\";\n    let res = OleFile::from_file_blocking(file).expect(\"file not found\");\n    println!(\"{:#?}\", \u0026res);\n    println!(\"entries: {:#?}\", res.list_streams());\n}\n```\n\n- Running the Example Code\n```bash\ncargo r --example ole_cli --features=\"blocking\" data/oledoc1.doc_\n```\n\n---\nLicense: MIT or Apache","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarirs%2Fole-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarirs%2Fole-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarirs%2Fole-rs/lists"}