feat(passwords): Added router default users and passwords Source: https://portforward.com/ ``` import os from bs4 import BeautifulSoup invalidValues = ["none", "N/A", "blank", "user created", "password changes when reset", "none; created during initial setup", "PrintedOnRouterLabel", "provided by ISP"] invalidKeywords = ["none", "leave blank", "n/a", "blank", "found by", "found on", "printed on", "configured during", "create", "last", "located", "on ", "sticker on", "refer to"] def extract_credentials(file_path): with open(file_path, 'r') as file: content = file.read() soup = BeautifulSoup(content, 'html.parser') table = soup.find('table') if table: model = table.find('th').text.strip().lower().replace('model', '').strip().replace(' ', '-').replace('/', '-') usernames = set() passwords = set() for row in table.find_all('tr')[1:]: cols = row.find_all('td') username = cols[1].text.strip() password = cols[2].text.strip() if username not in invalidValues: addUsername = True tempusername = username.lower() for keyword in invalidKeywords: if tempusername.startswith(keyword): addUsername=False break if addUsername: usernames.add(username) if password not in invalidValues: addPassword = True temppassword = password.lower() for keyword in invalidKeywords: if temppassword.startswith(keyword): addPassword=False break if addPassword: passwords.add(password) return model, sorted(usernames), sorted(passwords) else: return None, None, None def save_credentials(model, usernames, passwords, output_dir): if model and usernames and passwords: user_file_path = os.path.join(output_dir, f'{model}_default-users.txt') pass_file_path = os.path.join(output_dir, f'{model}_default-passwords.txt') with open(user_file_path, 'w') as user_file: user_file.write('\n'.join(usernames)) with open(pass_file_path, 'w') as pass_file: pass_file.write('\n'.join(passwords)) def process_files(input_dir, output_dir): for file_name in os.listdir(input_dir): print(f'Processing file {file_name}') file_path = os.path.join(input_dir, file_name) model, usernames, passwords = extract_credentials(file_path) save_credentials(model, usernames, passwords, output_dir) # Input directory containing the text files input_dir = "C:\\Users\\User\\Desktop\\out\\portforward.com" # Output directory where the output files will be saved output_dir = "C:\\Users\\User\\Github\\SecLists\\Passwords\\Default-Credentials\\Routers" process_files(input_dir, output_dir) ``` |
||
|---|---|---|
| .bin | ||
| .github | ||
| Discovery | ||
| Fuzzing | ||
| IOCs | ||
| Miscellaneous | ||
| Passwords | ||
| Pattern-Matching | ||
| Payloads | ||
| Usernames | ||
| Web-Shells | ||
| .gitattributes | ||
| .gitignore | ||
| CONTRIBUTING.md | ||
| CONTRIBUTORS.md | ||
| LICENSE | ||
| README.md | ||
| SecLists.png | ||
About SecLists
SecLists is the security tester's companion. It's a collection of multiple types of lists used during security assessments, collected in one place. List types include usernames, passwords, URLs, sensitive data patterns, fuzzing payloads, web shells, and many more. The goal is to enable a security tester to pull this repository onto a new testing box and have access to every type of list that may be needed.
This project is maintained by Daniel Miessler, Jason Haddix, and g0tmi1k.
Repository details
Size of a complete clone of SecLists is currently at 1.2 GB
Cloning this repository should take 4-5 minutes at 5MB/s speeds.
Install
Zip
wget -c https://github.com/danielmiessler/SecLists/archive/master.zip -O SecList.zip \
&& unzip SecList.zip \
&& rm -f SecList.zip
Git (Small)
git clone --depth 1 \
https://github.com/danielmiessler/SecLists.git
Git (Complete)
git clone https://github.com/danielmiessler/SecLists.git
Kali Linux (Tool Page)
apt -y install seclists
BlackArch (Tool Page)
sudo pacman -S seclists
Attribution
See CONTRIBUTORS.md
Contributing
See CONTRIBUTING.md
Similar Projects
Licensing
This project is licensed under the MIT license.
—
NOTE: Downloading this repository is likely to cause a false-positive alarm by your anti-virus or anti-malware software, the filepath should be whitelisted. There is nothing in SecLists that can harm your computer as-is, however it's not recommended to store these files on a server or other important system due to the risk of local file include attacks.

