{"id":27373425,"url":"https://github.com/sirherobrine23/phargo","last_synced_at":"2026-06-23T22:03:34.426Z","repository":{"id":287177897,"uuid":"963635448","full_name":"Sirherobrine23/phargo","owner":"Sirherobrine23","description":"Parser Phar file in Golang","archived":false,"fork":false,"pushed_at":"2025-04-11T03:03:19.000Z","size":5186,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-10T04:58:58.272Z","etag":null,"topics":["go","golang","phar","php","php-phar"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"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/Sirherobrine23.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}},"created_at":"2025-04-10T01:34:45.000Z","updated_at":"2025-04-11T03:03:23.000Z","dependencies_parsed_at":"2025-04-13T11:14:49.350Z","dependency_job_id":null,"html_url":"https://github.com/Sirherobrine23/phargo","commit_stats":null,"previous_names":["sirherobrine23/phargo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Sirherobrine23/phargo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sirherobrine23%2Fphargo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sirherobrine23%2Fphargo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sirherobrine23%2Fphargo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sirherobrine23%2Fphargo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sirherobrine23","download_url":"https://codeload.github.com/Sirherobrine23/phargo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sirherobrine23%2Fphargo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270974347,"owners_count":24678249,"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","status":"online","status_checked_at":"2025-08-18T02:00:08.743Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["go","golang","phar","php","php-phar"],"created_at":"2025-04-13T11:14:48.579Z","updated_at":"2026-06-23T22:03:34.372Z","avatar_url":"https://github.com/Sirherobrine23.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Phargo\n\nReader Php Phar files in golang\n\n## Info\n\nParser supports several signature algorithms:\n* md5\n* sha1\n* sha256\n* sha512\n* OpenSSL\n\nAlso supports compression formats:\n* None\n* Gzip\n* Bzip2\n\nCan read manifest version, alias and metadata. For every file inside PHAR-archive can read it contents, \nname, timestamp and metadata. Checks file CRC and signature of entire archive.\n\n## Installation\n\n1. Download and install:\n\n```sh\ngo get -u github.com/Sirherobrine23/phargo\n```\n\n2. Import and use it:\n\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"flag\"\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/Sirherobrine23/phargo\"\n)\n\nvar pharFilePath = flag.String(\"file\", \"\", \"File path\")\n\nfunc main() {\n\tflag.Parse()\n\n\t// Open file\n\tfile, err := os.Open(*pharFilePath)\n\tif err != nil {\n\t\tfmt.Fprintf(os.Stderr, \"Cannot open file: %s\\n\", err)\n\t\tos.Exit(1)\n\t\treturn\n\t}\n\n\t// Get file size\n\tstat, _ := file.Stat()\n\t\n\t// Parse phar file\n\tpharInfo, err := phargo.NewReader(file, stat.Size())\n\tif err != nil {\n\t\tfmt.Fprintf(os.Stderr, \"Cannot parse file: %s\\n\", err)\n\t\tos.Exit(1)\n\t\treturn\n\t}\n\n\t// Encode in json output\n\tjs := json.NewEncoder(os.Stdout)\n\tjs.SetIndent(\"\", \"  \")\n\tjs.Encode(pharInfo)\n}\n```\n\n## Running the tests\n\nJust run the command:\n\n```sh\ngo test\n```\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsirherobrine23%2Fphargo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsirherobrine23%2Fphargo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsirherobrine23%2Fphargo/lists"}