• Stars
    star
    114
  • Rank 308,031 (Top 7 %)
  • Language
    Python
  • License
    MIT License
  • Created over 8 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Python interface for the Ziggo Connect Box/Compal CH7465LG

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. Some interesting documents (internal photos) have been mirrored to docs/fcc. danman performed 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

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.

Changelog

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:

0.3.2:

0.3.1:

0.3.0:

  • Guest network settings added by @frimtec.

Security

A security evaluation of the Connect Box was posted 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?

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 DHCPSettings

# If you want to go back to 'normal':
# modem.reboot() # or
# modem.factory_reset()

# And logout
modem.logout()

More Repositories

1

logcheck-extrarules

Extra rules for logcheck that clean up your inbox by adding some opinionated/sensible rules
28
star
2

BeAT

Ontwerpproject Benchmark Analysis Toolkit
Python
9
star
3

rpki-client-web

A web api for rpki-client
Python
7
star
4

tvheadend_m3importer

A quick M3U importer for Tvheadend, in Python
Python
4
star
5

rpki-analysis

Jupyter Notebook
3
star
6

sagemcom-f3896-py

Client for the Sagemcom f3896/Ziggo SmartWifi modem (black)
Python
3
star
7

stichting-nice-dataviz

Jupyter Notebook
2
star
8

libvirt-python_reboot_hooks

Scripts that run on the KVM host before reboot and/or on power failure (apcupsd). In this situation the vm's need to be hibernated.
Python
2
star
9

docker-python-z3

Python 3 + Z3 image
Dockerfile
2
star
10

rpki-rrdp-tools-py

Tools for RRDP in Python
Jupyter Notebook
1
star
11

vertalerbouw-slight

Prototype for University of Twente Compiler Construction course with solid testing framework
Java
1
star
12

ctf-tools

Python
1
star
13

ansible-custom-secure-boot-keys

(local) custom secure boot keys using ansible
1
star
14

cbs_gebiedsindelingen_topojson

Verwerkte TopoJSON bestanden met daarin de CBS gebiedsindelingen. De bron van deze bestanden is het nationaal georegister (http://geodata.nationaalgeoregister.nl/)
1
star
15

bitarray

Simple bit array implemented in python
Python
1
star
16

jinja2_template_virtualhost_config

Templating for virtualhost configs. In hindsight, using puppet would have been quicker than this script...
Python
1
star
17

dvbc-muxutils

Scripts that work with DVB-C on linux
Python
1
star
18

workbook-atlas-probes-invalids

Jupyter Notebook
1
star
19

icao-certificates

JavaScript
1
star
20

chef-shorewall-networking

A port of the OpenStreetmap recipe for [networking](http://git.openstreetmap.org/chef.git/tree/refs/heads/master:/cookbooks/networking). This was the best recipe that I could find for managing Shorewall, but it needed some tweaks before I could use it in other projects
Ruby
1
star