Compal CH7465LG (Ziggo Connect Box) tools
=============================================
This repository contains a simple api to wrap the web interface of the Ziggo Connect Box (i.e. the
Compal CH7465LG). It is implemented in **Python >= 3.7**.
At the moment it *only* contains the functionality that I needed while I was investigating my
device, but pull requests that improve the documentation or add features are welcome.
About the hardware
------------------
Compal does not provide information about the hardware. The modem has no FCC registration.
However, the related Arris TG2492 modem was submitted to the FCC. The FCC documents for this
modem are [available][0]. Some interesting documents (internal photos) have been mirrored to
`docs/fcc`.
danman [performed][2] an (excellent) analysis of the modem where the procedure for extracting
the content of the firmware and modifying it is discussed. This writeup also examines the
DOCSIS certificates used.
The modem seems to be based on the Intel Puma 6 chipset. There is a long thead on (perceived)
performance problems caused by jitter on DSLReports. See [[ALL] SB6190 is a terrible modem - Intel Puma 6 / MaxLinear mistake][1]
The modem *most likely* contains open source components. Requests to Compal requesting source
code of these components, to an e-mail address on the Compal site, have not been answered yet.
[0]: https://fccid.io/UIDTG2492
[1]: https://www.dslreports.com/forum/r31079834-ALL-SB6190-is-a-terrible-modem-Intel-Puma-6-MaxLinear-mistake
[2]: https://blog.danman.eu/about-adding-a-static-route-to-my-docsis-modem/
Changelog
---------
### 0.6.0
* Support for static DHCP leases was added by @do3cc
### 0.5.1
* Support for hashed (single-sha256) passwords was added by @7FM
### 0.5.0
* Added support for get/create/disable/delete IPv6 filter rules by @7FM
### 0.4.0:
* Updated guest network settings for firmware [6.15.30-1p3-1-NOSH](https://github.com/ties/compal_CH7465LG_py/pull/32) by @frimtec.
### 0.3.2:
* Add [system information methods](https://github.com/ties/compal_CH7465LG_py/pull/28)
by @reitermarkus.
### 0.3.1:
* [Fix](https://github.com/ties/compal_CH7465LG_py/pull/26) for [python url parsing change](https://bugs.python.org/issue42967) by @Kiskae.
### 0.3.0:
* Guest network settings added by @frimtec.
Security
--------
A security evaluation of the Connect Box was [posted](https://packetstormsecurity.com/files/137996/compalch7465lglc-bypassexec.txt)
on-line. This report is included in the `docs` folder.
How to use it?
--------------
The `examples` directory contains some example scripts. My main use case is re-provisioning the
modem. An example script for this task is included.
Want to get started really quickly?
```python
import os
import time
from compal import *
modem = Compal('192.168.178.1', os.environ['ROUTER_CODE'])
modem.login()
fw = PortForwards(modem)
def toggle_all_rules(fw, goal):
rules = list(fw.rules)
for idx, r in enumerate(rules):
rules[idx] = r._replace(enabled=goal)
fw.update_rules(rules)
print(list(fw.rules))
# Disable all rules
toggle_all_rules(fw, False)
time.sleep(5)
# And re-enable
toggle_all_rules(fw, True)
# Or find all possible functions of the modem:
scan = FuncScanner(modem, 0, os.environ['ROUTER_CODE'])
while scan.current_pos < 101:
print(scan.scan().text)
# And/or change wifi settings
wifi = WifiSettings(modem)
settings = wifi.wifi_settings
print(settings)
new_settings = settings._replace(radio_2g=settings.radio_2g._replace(ssid='api_works'))
wifi.update_wifi_settings(new_settings)
print(wifi.wifi_settings)
# And/or Make all dhcp adresses static:
dhcp = DHCPSettings(modem)
lan_table = LanTable(modem)
for client in (*lan_table.get_lan(), *lan_table.get_wifi()):
dhcp.add_static_lease(
lease_ip=client["IPv4Addr"].split("/")[0], lease_mac=client["MACAddr"]
)
# If you want to go back to 'normal':
# modem.reboot() # or
# modem.factory_reset()
# And logout
modem.logout()
```
Raw data
{
"_id": null,
"home_page": "https://github.com/ties/compal_CH7465LG_py",
"name": "compal",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "compal CH7465LG connect box cablemodem",
"author": "Ties de Kock",
"author_email": "ties@tiesdekock.nl",
"download_url": "https://files.pythonhosted.org/packages/62/74/5b7684c1b50ae9a7baed608a2a1a2143754d50a42196b4b640325bc91be2/compal-0.6.0.tar.gz",
"platform": null,
"description": "Compal CH7465LG (Ziggo Connect Box) tools\n=============================================\n\nThis repository contains a simple api to wrap the web interface of the Ziggo Connect Box (i.e. the\nCompal CH7465LG). It is implemented in **Python >= 3.7**.\n\nAt the moment it *only* contains the functionality that I needed while I was investigating my\ndevice, but pull requests that improve the documentation or add features are welcome.\n\nAbout the hardware\n------------------\nCompal does not provide information about the hardware. The modem has no FCC registration.\nHowever, the related Arris TG2492 modem was submitted to the FCC. The FCC documents for this\nmodem are [available][0]. Some interesting documents (internal photos) have been mirrored to\n`docs/fcc`.\ndanman [performed][2] an (excellent) analysis of the modem where the procedure for extracting\nthe content of the firmware and modifying it is discussed. This writeup also examines the\nDOCSIS certificates used.\n\nThe modem seems to be based on the Intel Puma 6 chipset. There is a long thead on (perceived)\nperformance problems caused by jitter on DSLReports. See [[ALL] SB6190 is a terrible modem - Intel Puma 6 / MaxLinear mistake][1]\n\n\nThe modem *most likely* contains open source components. Requests to Compal requesting source\ncode of these components, to an e-mail address on the Compal site, have not been answered yet.\n\n[0]: https://fccid.io/UIDTG2492\n[1]: https://www.dslreports.com/forum/r31079834-ALL-SB6190-is-a-terrible-modem-Intel-Puma-6-MaxLinear-mistake\n[2]: https://blog.danman.eu/about-adding-a-static-route-to-my-docsis-modem/\n\nChangelog\n---------\n\n### 0.6.0\n * Support for static DHCP leases was added by @do3cc\n\n### 0.5.1\n * Support for hashed (single-sha256) passwords was added by @7FM\n\n### 0.5.0\n * Added support for get/create/disable/delete IPv6 filter rules by @7FM\n\n### 0.4.0:\n * Updated guest network settings for firmware [6.15.30-1p3-1-NOSH](https://github.com/ties/compal_CH7465LG_py/pull/32) by @frimtec.\n\n### 0.3.2:\n * Add [system information methods](https://github.com/ties/compal_CH7465LG_py/pull/28)\n\t by @reitermarkus.\n\n### 0.3.1:\n * [Fix](https://github.com/ties/compal_CH7465LG_py/pull/26) for [python url parsing change](https://bugs.python.org/issue42967) by @Kiskae.\n\n### 0.3.0:\n * Guest network settings added by @frimtec.\n\nSecurity\n--------\nA security evaluation of the Connect Box was [posted](https://packetstormsecurity.com/files/137996/compalch7465lglc-bypassexec.txt)\non-line. This report is included in the `docs` folder.\n\nHow to use it?\n--------------\nThe `examples` directory contains some example scripts. My main use case is re-provisioning the\nmodem. An example script for this task is included.\n\nWant to get started really quickly?\n```python\nimport os\nimport time\nfrom compal import *\n\nmodem = Compal('192.168.178.1', os.environ['ROUTER_CODE'])\nmodem.login()\n\nfw = PortForwards(modem)\n\ndef toggle_all_rules(fw, goal):\n\trules = list(fw.rules)\n\tfor idx, r in enumerate(rules):\n\t rules[idx] = r._replace(enabled=goal)\n\n\tfw.update_rules(rules)\n\tprint(list(fw.rules))\n\n# Disable all rules\ntoggle_all_rules(fw, False)\ntime.sleep(5)\n# And re-enable\ntoggle_all_rules(fw, True)\n\n# Or find all possible functions of the modem:\nscan = FuncScanner(modem, 0, os.environ['ROUTER_CODE'])\nwhile scan.current_pos < 101:\n\tprint(scan.scan().text)\n\n# And/or change wifi settings\nwifi = WifiSettings(modem)\nsettings = wifi.wifi_settings\nprint(settings)\n\nnew_settings = settings._replace(radio_2g=settings.radio_2g._replace(ssid='api_works'))\nwifi.update_wifi_settings(new_settings)\n\nprint(wifi.wifi_settings)\n\n# And/or Make all dhcp adresses static:\n\ndhcp = DHCPSettings(modem)\nlan_table = LanTable(modem)\nfor client in (*lan_table.get_lan(), *lan_table.get_wifi()):\n dhcp.add_static_lease(\n lease_ip=client[\"IPv4Addr\"].split(\"/\")[0], lease_mac=client[\"MACAddr\"]\n )\n\n\n# If you want to go back to 'normal':\n# modem.reboot() # or\n# modem.factory_reset()\n\n# And logout\nmodem.logout()\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Compal CH7465LG/Ziggo Connect Box client",
"version": "0.6.0",
"project_urls": {
"Homepage": "https://github.com/ties/compal_CH7465LG_py"
},
"split_keywords": [
"compal",
"ch7465lg",
"connect",
"box",
"cablemodem"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "62745b7684c1b50ae9a7baed608a2a1a2143754d50a42196b4b640325bc91be2",
"md5": "4ac1b9d46052443264d153bf9fc86b99",
"sha256": "d3f789d3cebd69e9fc48fc3e9f4aaa53d77cbee12a23df55e52addb7ba407b44"
},
"downloads": -1,
"filename": "compal-0.6.0.tar.gz",
"has_sig": false,
"md5_digest": "4ac1b9d46052443264d153bf9fc86b99",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 28887,
"upload_time": "2024-04-19T14:41:32",
"upload_time_iso_8601": "2024-04-19T14:41:32.851685Z",
"url": "https://files.pythonhosted.org/packages/62/74/5b7684c1b50ae9a7baed608a2a1a2143754d50a42196b4b640325bc91be2/compal-0.6.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-19 14:41:32",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ties",
"github_project": "compal_CH7465LG_py",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"tox": true,
"lcname": "compal"
}