{"id":16492635,"url":"https://github.com/sokis/asar-parse","last_synced_at":"2026-05-18T17:02:54.203Z","repository":{"id":72086313,"uuid":"99886504","full_name":"sokis/asar-parse","owner":"sokis","description":"从 asar 文件中加载模块","archived":false,"fork":false,"pushed_at":"2017-08-10T13:01:03.000Z","size":58,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-07T02:50:06.815Z","etag":null,"topics":["asar","electron","parser"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sokis.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2017-08-10T05:54:10.000Z","updated_at":"2022-02-14T03:50:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"9296720c-77a7-4292-a5ee-ec564130b2a7","html_url":"https://github.com/sokis/asar-parse","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sokis/asar-parse","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sokis%2Fasar-parse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sokis%2Fasar-parse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sokis%2Fasar-parse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sokis%2Fasar-parse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sokis","download_url":"https://codeload.github.com/sokis/asar-parse/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sokis%2Fasar-parse/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33184769,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T09:27:30.708Z","status":"ssl_error","status_checked_at":"2026-05-18T09:27:28.300Z","response_time":71,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["asar","electron","parser"],"created_at":"2024-10-11T14:06:41.171Z","updated_at":"2026-05-18T17:02:54.180Z","avatar_url":"https://github.com/sokis.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"```javascript                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   \n ▄▄▄▄▄▄▄▄▄▄▄  ▄▄▄▄▄▄▄▄▄▄▄  ▄▄▄▄▄▄▄▄▄▄▄  ▄▄▄▄▄▄▄▄▄▄▄       ▄▄▄▄▄▄▄▄▄▄▄  ▄▄▄▄▄▄▄▄▄▄▄  ▄▄▄▄▄▄▄▄▄▄▄  ▄▄▄▄▄▄▄▄▄▄▄  ▄▄▄▄▄▄▄▄▄▄▄ \n▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌     ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌\n▐░█▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀▀▀▀█░▌     ▐░█▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ \n▐░▌       ▐░▌▐░▌          ▐░▌       ▐░▌▐░▌       ▐░▌     ▐░▌       ▐░▌▐░▌       ▐░▌▐░▌       ▐░▌▐░▌          ▐░▌          \n▐░█▄▄▄▄▄▄▄█░▌▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄█░▌▐░█▄▄▄▄▄▄▄█░▌     ▐░█▄▄▄▄▄▄▄█░▌▐░█▄▄▄▄▄▄▄█░▌▐░█▄▄▄▄▄▄▄█░▌▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄▄▄ \n▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌     ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌\n▐░█▀▀▀▀▀▀▀█░▌ ▀▀▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀█░█▀▀      ▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀█░█▀▀  ▀▀▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀▀▀▀▀▀ \n▐░▌       ▐░▌          ▐░▌▐░▌       ▐░▌▐░▌     ▐░▌       ▐░▌          ▐░▌       ▐░▌▐░▌     ▐░▌            ▐░▌▐░▌          \n▐░▌       ▐░▌ ▄▄▄▄▄▄▄▄▄█░▌▐░▌       ▐░▌▐░▌      ▐░▌      ▐░▌          ▐░▌       ▐░▌▐░▌      ▐░▌  ▄▄▄▄▄▄▄▄▄█░▌▐░█▄▄▄▄▄▄▄▄▄ \n▐░▌       ▐░▌▐░░░░░░░░░░░▌▐░▌       ▐░▌▐░▌       ▐░▌     ▐░▌          ▐░▌       ▐░▌▐░▌       ▐░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌\n ▀         ▀  ▀▀▀▀▀▀▀▀▀▀▀  ▀         ▀  ▀         ▀       ▀            ▀         ▀  ▀         ▀  ▀▀▀▀▀▀▀▀▀▀▀  ▀▀▀▀▀▀▀▀▀▀▀ \n                                                                                                                          \n                                                     \n```\n# Asar-Parse\n直接从`asar`格式文件中载入模块\n\n## 用法\n\n例：\n```javascript\n  const AsarParse = require('./bin/asar-parse.js');\n  var parse = new AsarParse('model.asar')\n\n  parse.patch(); // 挂载钩子函数\n  require('./colors') // 从当前目录下载入 colors 模块 \n  parse.unpatch(); // 卸载钩子函数  \n```\n\n### new AsarParse ( archive )  \n实例化 AsarParse 对象，并载入指定的 asar 文件\n\n### patch ()\n挂载钩子函数，劫持 module._findModule，fs.readFileSync， fs.readFile。从而`require`可以直接从asar 文件中尝试载入模块\n\n### unpatch ()\n卸载钩子劫持\n\n## 相关项目\n* [electron - asar](https://github.com/electron/asar)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsokis%2Fasar-parse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsokis%2Fasar-parse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsokis%2Fasar-parse/lists"}