Skip to content

Instantly share code, notes, and snippets.

@staaldraad
staaldraad / huaweiPassExtract.py
Last active May 19, 2023 11:00
Extract local users and passwords from Huawei router/firewall config
#!/usr/bin/python
"""
Simple tool to extract local users and passwords from most Huawei routers/firewalls.
Author: Etienne Stalmans ([email protected])
Version: 1.0 (15/01/2014)
"""
import os
import sys
import argparse
@staaldraad
staaldraad / huaweiDecrypt.py
Created March 11, 2015 13:19
Decrypt Huawei router/firewall passwords. Huawei stores passwords using DES encryption when the crypted option is enabled.
#!/usr/bin/python
"""
Simple tool to extract local users and passwords from most Huawei routers/firewalls config files.
Will extract plain-text passwords and crypted credentials. Huawei config files use DES encryption with
a known key. Using this information, the script will decrypt credentials found in the config file.
Author: Etienne Stalmans ([email protected])
Version: 1.0 (12/01/2014)
"""
from Crypto.Cipher import DES