{"id":16991760,"url":"https://github.com/soif/hackapi","last_synced_at":"2025-07-08T10:40:09.136Z","repository":{"id":216189072,"uuid":"733139805","full_name":"soif/HackApi","owner":"soif","description":"Unified API client for devices (like Routers, Modems, ISP boxes, SmartHome...). Supports Huawei modems, OpenWRT, Opnsense, SFR boxes, ZTE modems","archived":false,"fork":false,"pushed_at":"2024-01-13T12:29:48.000Z","size":764,"stargazers_count":9,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-15T16:08:29.477Z","etag":null,"topics":["api","api-client","box","huawei","modem","openwrt","opnsense","php","router","sfr","smarthome","sms","wifi","zte"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/soif.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}},"created_at":"2023-12-18T16:44:52.000Z","updated_at":"2025-04-13T18:47:11.000Z","dependencies_parsed_at":"2024-01-13T12:47:58.358Z","dependency_job_id":null,"html_url":"https://github.com/soif/HackApi","commit_stats":null,"previous_names":["soif/hackapi"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/soif/HackApi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soif%2FHackApi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soif%2FHackApi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soif%2FHackApi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soif%2FHackApi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soif","download_url":"https://codeload.github.com/soif/HackApi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soif%2FHackApi/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260131023,"owners_count":22963432,"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":["api","api-client","box","huawei","modem","openwrt","opnsense","php","router","sfr","smarthome","sms","wifi","zte"],"created_at":"2024-10-14T03:27:09.609Z","updated_at":"2025-06-16T09:04:20.502Z","avatar_url":"https://github.com/soif.png","language":"PHP","readme":"# HackApi\n\nA fast, lighweight  and solid API client written in PHP, to interact with various devices (mainly Routers, Modems or Smart Home hardware). \n\nYou can use it to interface with the [currently implemented devices](src/devices/), or use it as a base to **quickly** develop your own client.\n\n\n## Why HackApi ?\n\nWhile numerous API clients and frameworks excel with well-documented public APIs, they often prove excessive and challenging for tasks involving hardware devices like routers, modems, ISP boxes, and smart home devices. In situations where internal APIs, often undocumented and not intended for public access, come into play, existing tools can be overcomplicated, possess a steep learning curve, and lack suitability.\n\nEnter **HackApi**: a straightforward, lightweight solution designed for ease of learning and debugging, specifically catering to the challenges posed by undocumented APIs. With just the [HackApi main class](src/lib/Hackapi.php) file and a concise device-specific class file (e.g., [openwrt](src/devices/openwrt/main.php)) accompanied by its autogenerated [trait.php file](src/devices/openwrt/trait.php) from a [template.php file](src/devices/openwrt/template.php) (essentially an API endpoint definition), HackApi simplifies the process, eliminating the need to reinvent the wheel.\n\n## Features\n\n- Standardised API methods\n- Full debug to ease API client development\n- Template based for building API endpoints methods \u0026 documentation very quickly\n- CLI commands to build, test, and debug API methods\n\n## Currently Supported Devices\n\n- **[Huawei](src/devices/huawei_modem)** modems\n- **[OpenWRT](src/devices/openwrt)** based routers\n- **[OPNSense](src/devices/opnsense)** routers\n- **[SFR](src/devices/sfr_box)** internet boxes provided by french \"SFR\" (or \"Red-by-SFR\") ISP\n- **[ZTE](src/devices/zte_modem)** modems\n\n*All tested models are listed in:* `/src/devices/(BRAND)/Readme.md`\n\n\n## Requirements\n\n- php \u003e= 5.4\n- curl php extension\n\n\n## How to use\n\nExample:\n\n```php\nrequire('src/devices/huawei_modem/main.php');\n$client= new HackApi_Huawei_modem();\n\n//Set Credentials (if not set in default.php) file\n//$client-\u003eSetHost('192.168.0.1');\n//$client-\u003eSetLogin('admin','password');\n\n// List messages from the SMS Inbox\n$messages = $client-\u003eApiSmsListReceived();\nprint_r($messages);\n\n// Send an SMS\n$done = $client-\u003eApiSmsSend('0612345678','Hello world');\n\n// Reboot modem\n$done = $client-\u003eApiReboot();\n```\n\n*Very Simple, isn't it?*\n\n\n## Contribute\n\n- Please submit the products models that you have tested\n- Write new device specifics clients and submit them back\n- Enhance the documentation : *yes, I know, my english writing sucks!*\n- Pull Requests are always **welcome**!\n\nEnjoy!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoif%2Fhackapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoif%2Fhackapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoif%2Fhackapi/lists"}