{"id":24601117,"url":"https://github.com/iseki0/executables","last_synced_at":"2026-01-16T20:00:54.143Z","repository":{"id":271124339,"uuid":"905863506","full_name":"iseki0/Executables","owner":"iseki0","description":"Library for executable/object files parsing(include PE version info, virtual memory), in Kotlin multiplatform.","archived":false,"fork":false,"pushed_at":"2026-01-12T19:48:37.000Z","size":41692,"stargazers_count":16,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-13T00:06:29.943Z","etag":null,"topics":["exe","fileformat","kotlin","kotlin-multiplatform","pe","pefile"],"latest_commit_sha":null,"homepage":"https://iseki0.github.io/Executables/","language":"Kotlin","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/iseki0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-12-19T17:11:25.000Z","updated_at":"2026-01-12T19:45:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"6fcbd04d-434e-4884-a565-476c7654b684","html_url":"https://github.com/iseki0/Executables","commit_stats":null,"previous_names":["iseki0/executables"],"tags_count":33,"template":false,"template_full_name":null,"purl":"pkg:github/iseki0/Executables","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iseki0%2FExecutables","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iseki0%2FExecutables/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iseki0%2FExecutables/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iseki0%2FExecutables/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iseki0","download_url":"https://codeload.github.com/iseki0/Executables/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iseki0%2FExecutables/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28482212,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["exe","fileformat","kotlin","kotlin-multiplatform","pe","pefile"],"created_at":"2025-01-24T14:39:30.289Z","updated_at":"2026-01-16T20:00:54.110Z","avatar_url":"https://github.com/iseki0.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Executables\n\n![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/iseki0/Executables/build.yml)\n[![Maven Central Version](https://img.shields.io/maven-central/v/space.iseki.executables/executables-files)](https://central.sonatype.com/artifact/space.iseki.executables/executables-files)\n![License](https://img.shields.io/github/license/iseki0/Executables)\n\nAn executable file parsing library, written in Kotlin Multiplatform.\n\nCurrently, this library can:\n\n|                            | PE | ELF | Mach-O |\n|----------------------------|----|-----|--------|\n| Read headers               | ✅  | ✅   | ✅      |\n| Read import/export symbols | ✅  | ✅   | 🚧     |\n| Read sections              | ✅  | ✅   | ✅      |\n| Read resources             | ✅  | N/A | N/A    |\n| Reading in VA              | ✅  | ✅   | ✅      |\n\n- [x] Kotlin/Native: File access\n- [x] SBOM: Go\n- [ ] SBOM: GraalVM Native Image\n\n\u003e This project is currently in the early stages of development. This means it is still evolving and may undergo frequent\n\u003e updates and changes.\n\u003e\n\u003e Due to the current status of Kotlin/Multiplatform, it can be expected that for a period of time following the stable\n\u003e release, binary compatibility guarantees will only be provided for Kotlin/JVM.\n\n## Kotlin targets\n\nAll targets supported.\n\n### Quick start\n\n\u003e For someone who doesn't want to read the documentation\n\n```kotlin\nimport space.iseki.executables.common.FileFormat\n\nfun main(vararg args: String) {\n    FileFormat.open(args[0])?.use { file -\u003e\n        println(file)\n        // do what you want to do\n    }\n}\n```\n\n## Getting Started\n\n### Add dependency\n\nThis project contains ~~several~~ modules on Maven Central:\n\n- [space.iseki.executables:executables-files] contains the code shared by pe, elf, and macho\n\n#### Gradle\n\n```kotlin\ndependencies {\n    implementation(\"space.iseki.executables:executables-files:0.1.11\")\n}\n```\n\n#### Maven\n\nSince the project is in Kotlin Multiplatform, for Maven user you have to specify the platform explicitly.\n(The `-jvm` suffix)\n\n```xml\n\n\u003cdependency\u003e\n    \u003cgroupId\u003espace.iseki.executables\u003c/groupId\u003e\n    \u003cartifactId\u003eexecutables-files-jvm\u003c/artifactId\u003e\n    \u003cversion\u003e0.1.11\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### Samples\n\n#### Print information of a PE file\n\n```kotlin\nimport java.nio.file.Path\nimport kotlinx.serialization.json.Json\nimport space.iseki.executables.pe.PEFile\n\nfun main() {\n    val file = Path.of(\"C:\\\\System32\\\\notepad.exe\")\n    PEFile.open(file).use { peFile: PEFile -\u003e\n        println(peFile.coffHeader)\n        println(peFile.summary)\n        println(Json.encodeToString(peFile.summary))\n        println(peFile.versionInfo)\n    }\n}\n```\n\n#### Detect the type of file\n\n```kotlin\nimport java.nio.file.Path\nimport space.iseki.executables.common.FileFormat\n\nfun main() {\n    val file = Path.of(\"C:\\\\System32\\\\notepad.exe\")\n    println(FileFormat.detect(file))\n}\n```\n\n#### Read PE file import symbols\n\n\u003e This API also works for ELF files.\n\n```kotlin\nimport java.nio.file.Path\nimport space.iseki.executables.pe.PEFile\n\nfun main() {\n    val file = Path.of(\"C:\\\\System32\\\\notepad.exe\")\n    PEFile.open(file).use { peFile -\u003e\n        // Get all imported DLLs and functions\n        peFile.importSymbols.forEach { symbol -\u003e\n            println(\"Imported: ${symbol.file}::${symbol.name}\")\n            if (symbol.isOrdinal) {\n                println(\"  - Ordinal: ${symbol.ordinal}\")\n            }\n        }\n    }\n}\n```\n\n#### Read PE file export symbols\n\n\u003e This API also works for ELF files.\n\n```kotlin\nimport java.nio.file.Path\nimport space.iseki.executables.pe.PEFile\n\nfun main() {\n    val file = Path.of(\"C:\\\\System32\\\\kernel32.dll\")\n    PEFile.open(file).use { peFile -\u003e\n        // Get all exported functions\n        val exportSymbols = peFile.exportSymbols\n        println(\"Number of exported functions: ${exportSymbols.size}\")\n\n        // Print the first 10 exported functions\n        exportSymbols.take(10).forEach { symbol -\u003e\n            println(\"  - ${symbol.name}, Ordinal: ${symbol.ordinal}\")\n            if (symbol.isForwarder) {\n                println(\"    Forwards to: ${symbol.forwarderString}\")\n            }\n        }\n    }\n}\n```\n\n#### Read ELF symbol tables\n\n\u003e Since PE splits the symbol table into import/export, this API is ELF specified.\n\n```kotlin\nimport java.nio.file.Path\nimport space.iseki.executables.elf.ELFFile\n\nfun main() {\n    val file = Path.of(\"/bin/ls\")  // ELF file on Linux system\n    ELFFile.open(file).use { elfFile -\u003e\n        // Get all symbols\n        elfFile.symbols.forEach { symbol -\u003e\n            val name = symbol.name ?: \"\u003cunnamed\u003e\"\n            println(\"  - $name: Name=${symbol.name}, Binding=${symbol.binding}\")\n        }\n    }\n}\n```\n\n## References\n\n- PE Format: https://docs.microsoft.com/en-us/windows/win32/debug/pe-format\n- PE VS_VERSIONINFO: https://learn.microsoft.com/en-us/windows/win32/menurc/vs-versioninfo\n- ELF Format: https://refspecs.linuxfoundation.org/elf/elf.pdf\n- Macho Format: https://github.com/apple/darwin-xnu/blob/main/EXTERNAL_HEADERS/mach-o/loader.h\n\n[VS_VERSIONINFO]: https://learn.microsoft.com/en-us/windows/win32/menurc/vs-versioninfo\n\n[space.iseki.executables:executables-files]: https://central.sonatype.com/artifact/space.iseki.executables/executables-files\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiseki0%2Fexecutables","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiseki0%2Fexecutables","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiseki0%2Fexecutables/lists"}