This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # | |
| # Decrypt and re-encrypt the rootfs from ZTE H267A OTA firmware images | |
| # | |
| # Python 3.10+; dependency: python3 -m pip install cryptography | |
| # | |
| # H267A uses following encryption key for rootfs: | |
| # AES-128-ECB, "pkq_lsw20160407" with a \0 at the end makes 16 bytes; no IV, KDF, or PKCS#7 padding. | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # Parse and rebuild Nokia/Alcatel DMDB files used by libdmdb.so. | |
| # | |
| # Commands: | |
| # dmdb_tool.py unpack INPUT.dmdb OUTPUT.xml | |
| # dmdb_tool.py pack --base BASE.dmdb INPUT.xml OUTPUT.dmdb | |
| # dmdb_tool.py verify INPUT.dmdb | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # | |
| # Nokia/Alcatel-Lucent extfs dump parser and "src4" generator for decrypting dmdb | |
| # as the only input argument supply path to dump of extfs partition from SPI flash | |
| # | |
| # Released under the MIT License (http://opensource.org/licenses/MIT) | |
| # Copyright (c) Rajko Stojadinovic (rajkosto) | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #define WIN32_LEAN_AND_MEAN | |
| #include <windows.h> | |
| #include <Shlobj.h> | |
| #include <string.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <errno.h> | |
| bool replaceAllInFile(const TCHAR* filePath) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| HGU firmware features: | |
| 0 BDP (OMCI_CUSTOM_BDP): | |
| 0x001 = KERNEL:TLS_4095 = (0)tls_4095_us_rule_to_ds_rule, (1)tls_4095_us_act_to_ds_sact, (2)tls_4095_us_act_to_ds_cact, (3)tls_4095_us_set_mbr_port_by_svlan, (4)tls_4095_us_del_mbr_port_by_svlan | |
| 0x002 = KERNEL:ignore_dsPbit = (5)ignore_ds_pbit, this one is very slightly different (less magic values) in SFU firmware | |
| 0x008 = (15)cf_gen_vtfd_rule, (14)cf_check_vtfd_mode | |
| 0x010 = KERNEL:set_ds_bc_gem_flow_to_ds_bcster_mod = (6)omci_apply_ds_bcster_mod, (7)omci_set_ds_bc_gem_flow_to_ds_bcster_mod, | |
| KERNEL:add_ds_tag_rule_to_ds_bcster_mod = (8)omci_add_ds_tag_rule_to_ds_bcster_mod, (9)omci_del_ds_tag_rule_to_ds_bcster_mod | |
| KERNEL:reset_to_ds_bcster_mod = (10)omci_reset_to_ds_bcster_mod, | |
| 0x080 = (18)omci_ingoreExtVlanDefaultDrop (parameter & 0x01 => IGN_ME_171_DEFAULT_DROP, parameter & 0x02 => IGN_ME_171_TREAT_UNTAG, parameter == -1 ?) | |
| 0x100 = KERNEL:force_veip_rule_to_sfu = (13)force_veip_rule_to_sfu, (14)force_veip_us_r |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # | |
| # Nokia/Alcatel-Lucent router backup configuration tool | |
| # G2425 support added by rajkosto on 20/11/2022 | |
| # XS-2426G-B support added by rajkosto on 28/02/2023 | |
| # Newer dmdb_encryption.cfg support added by rajkosto on 03/10/2026 | |
| # (requires device specific info, generate extfshash with https://gist.github.com/rajkosto/d003f2426310bd62bd9fd32548d04dd5) | |
| # (DMDB files can be converted to/from familiar XML format using https://gist.github.com/rajkosto/737876e062840cfdec2d6ce23d318d0d) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| #ODI DFP-34X-2C2 MAC_KEY key generator by rajkosto | |
| import sys | |
| import string | |
| import hashlib | |
| args = sys.argv | |
| if len(args) != 2: | |
| sys.exit("Usage: odi_keygen.py YOURMACADDR") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ZTE Yettel ruter uspostavlja sledece veze preko svog WAN kabla: | |
| Connection: Management | |
| DHCP IPoE VLAN 715 Priority 0 | |
| Vendor class dslforum.org | |
| IP address 10.48.x.x/255.254.0.0 | |
| Ovu mrezu koristi da komunicira sa TR069 ACS-om na adresi https://acs.cetin.rs:10302/acs/serbia | |
| Connection: Voice | |
| DHCP IPoE VLAN 711 Priority 5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| struct DummyBase | |
| { | |
| DummyBase() : val(5) {} | |
| DummyBase(int newVal) : val(newVal) {} | |
| void set_val(int newVal) { val = newVal; } | |
| int get_val() const { return val; } | |
| private: | |
| int val; | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| struct DummyBase | |
| { | |
| DummyBase() : val(5) {} | |
| DummyBase(int newVal) : val(newVal) {} | |
| void set_val(int newVal) { val = newVal; } | |
| int get_val() const { return val; } | |
| private: | |
| int val; | |
| }; |
NewerOlder