{"id":16011221,"url":"https://github.com/damieng/binarycpu","last_synced_at":"2025-07-22T16:06:34.454Z","repository":{"id":57141032,"uuid":"72564573","full_name":"damieng/binarycpu","owner":"damieng","description":"Identify the processor architecture of binary files","archived":false,"fork":false,"pushed_at":"2021-11-18T12:37:42.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-15T01:43:57.937Z","etag":null,"topics":["npm","pefile","processor-architecture"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/damieng.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}},"created_at":"2016-11-01T18:29:53.000Z","updated_at":"2023-05-22T09:33:20.000Z","dependencies_parsed_at":"2022-09-05T01:20:16.028Z","dependency_job_id":null,"html_url":"https://github.com/damieng/binarycpu","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/damieng/binarycpu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damieng%2Fbinarycpu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damieng%2Fbinarycpu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damieng%2Fbinarycpu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damieng%2Fbinarycpu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/damieng","download_url":"https://codeload.github.com/damieng/binarycpu/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damieng%2Fbinarycpu/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266161905,"owners_count":23885928,"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":["npm","pefile","processor-architecture"],"created_at":"2024-10-08T13:41:00.466Z","updated_at":"2025-07-22T16:06:34.431Z","avatar_url":"https://github.com/damieng.png","language":"JavaScript","readme":"# binarycpu\n\nIdentify the processor architecture of binary files.\n\n## Usage\n\n### On the command line\n\nSimply install with `npm install -g binarycpu` and then call this with the path you wish to scan. e.g.\n\n```bash\nbinarycpu c:\\apps\n```\n\nAnd it will print out the file names of identified PE/MZ binary files with their appropriate cpu architecture (see table below).\n\n### In your own code\n\n```javascript\nconst binarycpu = require('binarycpu')\n\nconst arch = binarycpu.determinePEArch(filename)\n```\n\n`null` is returned if the file is not a MZ/PE file.  If the processor architecture is unknown it will return unknown as well as the hex identifier.\n\n## Possible architectures\n\nThese have been kept the same as the Microsoft docs for PE files.\n\n| Hex ID | Name   | description\n| ------ | ------ | -----------\n| 0x0000 | native | applicable to any machine type\n| 0x0EBC | ebc | EFI byte code\n| 0x014C | ia32 | Intel 386 or later compatible processors\n| 0x0200 | ia64 | Intel Itanium processor family\n| 0x8664 | amd64 | AMD x64 extensions / Intel 64-bit 'Core'\n| 0x0166 | r4000 | MIPS R4000 little endian\n| 0x0169 | wcemipsv2 | MIPS little-endian WCE v2\n| 0x0266 | mips16 | MIPS16\n| 0x0366 | mipsfpu | MIPS with FPU\n| 0x0466 | mipsfpu16 | MIPS16 with FPU\n| 0x01A1 | sh3 | Hitachi SH3\n| 0x01A3 | sh3dsp | Hitachi SH3 DSP\n| 0x01A6 | sh4 | Hitachi SH4\n| 0x01A8 | sh5 | Hitachi SH5\n| 0x01F0 | powerpc | Power PC little endian\n| 0x01F1 | powerpcfp | Power PC with floating point support\n| 0x01C0 | arm | ARM little endian\n| 0x01C2 | thumb | ARM Thumb\n| 0x01C4 | armnt | ARM Thumb-2 little endian\n| 0xAA64 | arm64 | ARM64 little endian\n| 0x5032 | riscv32 | RISC-V 32-bit address space\n| 0x5064 | riscv64 | RISC-V 64-bit address space\n| 0x5128 | riscv128 | RISC-V 128-bit address space\n| 0x01D3 | am33 | Matsushita AM33\n| 0x9041 | m32r | Mitsubishi M32R little endian\n\n## Notes\n\n* Only Portable Executable files are supported (ELF, mach-O could be added later)\n* Errors are thrown if it is a MZ file but it can't find the PE signature\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamieng%2Fbinarycpu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdamieng%2Fbinarycpu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamieng%2Fbinarycpu/lists"}