Skip to content

Commit

Permalink
Add 'auto.py' example (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkst authored Aug 25, 2024
1 parent d3a342c commit a25f1de
Show file tree
Hide file tree
Showing 15 changed files with 477 additions and 76 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## 0.5.0

Added `auto.py` which tries all key/iv/signature combinations.

## 0.4.0

Allow basic support for little-endian header format.
Expand Down
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,18 @@ Creates byte-perfect binaries for the limited number of `config.bin` that have b

## Quickstart

Clone the repo and run `python3 setup.py install --user` to install the `zcu` module.
You can then use the scripts in the [resources](./resources) directory.
Clone the repo and run `python3 -m pip install . --user` to install the `zcu` module.
You can then use the scripts in the [examples](./examples) directory.

NOTE: This project has only been tested against **Python 3.7** and higher.
**NOTE:** This project has only been tested against **Python 3.7** and higher.

### 100% auto decode

Try running the `examples/auto.py` against your `config.bin`

```sh
$ python3 examples/auto.py config.bin config.xml
```

## Examples

Expand Down Expand Up @@ -110,7 +118,7 @@ The decoder has only been tested against `config.bin` files generated by the fol

And `db_default_auto_cfg.xml` files extracted from `ZXHN H268N` and `ZXHN H298Q` firmwares

It makes a number of assumptions due to this. The encoder has not been tested in the wild. Use at your own risk.
It makes a number of assumptions due to this. The encoder has not been heavily tested in the wild. Use at your own risk.

## Requirements

Expand Down
80 changes: 42 additions & 38 deletions SUPPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,50 @@

# Supported

| model | notes |
| ----- | ----- |
| ZXHN H298A |
| ZXHN H298N |
| ZXHN H267A | @samtimber can extract username/password from config.bin |
| ZXHN H268Q |
| ZXHN H298Q |
| ZXHN H168N V2.2 |
| ZXHN H168N V3.5 |
| ZXHN H108N V2.5 |
| F600W |
| ZTE F670L | See [gist](https://gist.github.com/zainarbani/723d1387bec9e1559de7a1029d08aa91) "Your key will be the ONT serial number (ZTEGXXXXXXXX, take only the last 8 hex characters in UPPERCASE) + MAC address of your ONT (from right to left)."
| model | type | notes |
|-------------------|:-----:|-------|
| F600W | **0** | |
| ZTE F670L | | See [gist](https://gist.github.com/zainarbani/723d1387bec9e1559de7a1029d08aa91) "Your key will be the ONT serial number (ZTEGXXXXXXXX, take only the last 8 hex characters in UPPERCASE) + MAC address of your ONT (from right to left)."
| ZTE ZXHN H268A V1 | **0** | |
| ZXHN H108N V2.5 | | |
| ZXHN H168N V2.2 | **2** | |
| ZXHN H168N V3.1 | **2** | |
| ZXHN H168N V3.5 | **4** | |
| ZXHN H188A | **4** | |
| ZXHN H267A V1.0 | **2** | @samtimber can extract username/password from `config.bin`|
| ZXHN H268Q | | |
| ZXHN H288A | **4** | |
| ZXHN H298A | | |
| ZXHN H298N | **2** | |
| ZXHN H298Q | **4** | |
| ZXV10 H201L V2.0 | **2** | |

# Unsupported

The table below shows an overview of the various models that people have tried:
The table below provides an overview of the various models that people have tried:

| model | github issue(s) | supported? | status |
|-|-|:-:|-|
| ZTE F450 | [#69](https://github.com/mkst/zte-config-utility/issues/69) | :question: | unknown |
| ZTE F670 V1.1 | [#72](https://github.com/mkst/zte-config-utility/issues/72) | :white_circle: | missing key(s) |
| ZTE F670 V2.0 / F680 | [#57](https://github.com/mkst/zte-config-utility/issues/57) | :red_circle: | `Unknown payload type 5` |
| ZTE F760 | [#54](https://github.com/mkst/zte-config-utility/issues/54) | :question: | unknown |
| ZTE H188A | [#43](https://github.com/mkst/zte-config-utility/issues/43) | :black_circle: | missing key(s) |
| ZTE H3600 V9 | [#76](https://github.com/mkst/zte-config-utility/issues/76) | :red_circle: | ValueError: Payload header does not start with the payload magic. |
| ZTE H3600 V9 | [#94](https://github.com/mkst/zte-config-utility/issues/94) | :question: | unknown |
| ZTE H388X(F) | [#91](https://github.com/mkst/zte-config-utility/issues/91) | :white_circle: | missing key(s) |
| ZTE ZXHN F650 | [#28](https://github.com/mkst/zte-config-utility/issues/28) | :question: | unknown |
| ZTE ZXHN F671Y | [#78](https://github.com/mkst/zte-config-utility/issues/78) | :red_circle: | `header[2]` is not 4. |
| ZTE ZXHN F680 | [#15](https://github.com/mkst/zte-config-utility/issues/15), [#68](https://github.com/mkst/zte-config-utility/issues/68) | :red_circle: | unsupported. `payload_type = 6` or `payload_type = 5`|
| ZTE ZXHN H168A V2.0 | [#25](https://github.com/mkst/zte-config-utility/issues/25) | :white_circle: | missing key(s) |
| ZTE ZXHN H199A | [#67](https://github.com/mkst/zte-config-utility/issues/67) | :question: | unknown |
| ZTE ZXHN H267A V1.0 | [#49](https://github.com/mkst/zte-config-utility/issues/49) | :white_circle: | supported? |
| ZTE ZXHN H267N V1.1 | [#9](https://github.com/mkst/zte-config-utility/issues/9) | :black_circle: | missing key(s) |
| ZTE ZXHN H268A V2.0 | [#12](https://github.com/mkst/zte-config-utility/issues/12) | :red_circle: | unsupported |
| ZTE ZXHN H288A | [#32](https://github.com/mkst/zte-config-utility/issues/32) | :white_circle: | unknown |
| ZTE ZXHN H298A V1 | [#96](https://github.com/mkst/zte-config-utility/issues/96) | :red_circle: | ValueError: Payload header does not start with the payload magic.
| ZTE ZXHN H298A V9 | [#31](https://github.com/mkst/zte-config-utility/issues/31) | :white_circle: | missing key(s) |
| ZTE ZXHN H367A | [#71](https://github.com/mkst/zte-config-utility/issues/71) | :white_circle: | missing key(s) |
| RT-GM-5 | [#41](https://github.com/mkst/zte-config-utility/issues/41) | :white_circle: | missing key(s) |
| Speedport Entry 2i | [#13](https://github.com/mkst/zte-config-utility/issues/13) | :white_circle: | externally supported, see [gist](https://gist.github.com/viliampucik/54956df2302362dab281f86178a4b848) |
| TIM Smart Hub+, H388X | [#24](https://github.com/mkst/zte-config-utility/issues/24) | :white_circle: | missing key(s) |
| model | type | support | status | github issue(s) |
|-----------------------|:-----:|:--------------:|--------------------------|-----------|
| ZTE F450 | ? | :question: | need example config.bin | [#69](https://github.com/mkst/zte-config-utility/issues/69) |
| ZTE F670 V1.1 | **2** | :key: | need more ivs/keys | [#72](https://github.com/mkst/zte-config-utility/issues/72) |
| ZTE F670 V2.0 / F680 | **5** | :red_circle: | `Unknown payload type 5` | [#57](https://github.com/mkst/zte-config-utility/issues/57) |
| ZTE F760 | ? | :question: | need example config.bin | [#54](https://github.com/mkst/zte-config-utility/issues/54) |
| ZTE H188A | ? | :key: | need more keys | [#43](https://github.com/mkst/zte-config-utility/issues/43) |
| ZTE H3600 V9 | ? | :question: | need example config.bin | [#76](https://github.com/mkst/zte-config-utility/issues/76) |
| ZTE H388X(F) | ? | :key: | need more ivs/keys | [#91](https://github.com/mkst/zte-config-utility/issues/91) |
| ZTE ZXHN F650 | ? | :question: | need example config.bin | [#28](https://github.com/mkst/zte-config-utility/issues/28) |
| ZTE ZXHN F671Y | ? | :key: | need more ivs/keys | [#78](https://github.com/mkst/zte-config-utility/issues/78) |
| ZTE ZXHN F680 | ? | :red_circle: | unsupported. `payload_type = 6` or `payload_type = 5`| [#15](https://github.com/mkst/zte-config-utility/issues/15), [#68](https://github.com/mkst/zte-config-utility/issues/68) |
| ZTE ZXHN H168A V2.0 | 4 | :key: | need more ivs/keys | [#25](https://github.com/mkst/zte-config-utility/issues/25) |
| ZTE ZXHN H199A | ? | :question: | need example config.bin | [#67](https://github.com/mkst/zte-config-utility/issues/67) |
| ZTE ZXHN H267A V1.0 | ? | :white_circle: | supported? | [#49](https://github.com/mkst/zte-config-utility/issues/49) |
| ZTE ZXHN H267N V1.1 | ? | :key: | missing key(s) | [#9](https://github.com/mkst/zte-config-utility/issues/9) |
| ZTE ZXHN H268A V2.0 | ? | :red_circle: | unsupported | [#12](https://github.com/mkst/zte-config-utility/issues/12) |
| ZTE ZXHN H288A | ? | :white_circle: | unknown | [#32](https://github.com/mkst/zte-config-utility/issues/32) |
| ZTE ZXHN H298A V1 | ? | :question: | missing key(s) | [#96](https://github.com/mkst/zte-config-utility/issues/96) |
| ZTE ZXHN H298A V9 | ? | :key: | need more ivs/keys | [#31](https://github.com/mkst/zte-config-utility/issues/31) |
| ZTE ZXHN H367A | ? | :key: | need more ivs/keys | [#71](https://github.com/mkst/zte-config-utility/issues/71) |
| RT-GM-5 | ? | :key: | need more ivs/keys | [#41](https://github.com/mkst/zte-config-utility/issues/41) |
| Speedport Entry 2i | ? | :white_circle: | externally supported, see [gist](https://gist.github.com/viliampucik/54956df2302362dab281f86178a4b848) | [#13](https://github.com/mkst/zte-config-utility/issues/13) |
| TIM Smart Hub+, H388X | ? | :key: | need more ivs/keys | [#24](https://github.com/mkst/zte-config-utility/issues/24) |

2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.4.0
0.5.0
Loading

0 comments on commit a25f1de

Please sign in to comment.