A Python tool to parse, view, and edit MikroTik Winbox WBX files. WBX files store saved sessions (addresses, groups, logins, and passwords) used by Winbox. This utility allows you to list, export, import, and edit WBX files — including bulk changes via CSV.
- ✅ Parse WBX reliably (supports multiple TLV layouts: L2, L1, L0).
- ✅ List records in human-readable or raw hex format.
- ✅ Edit individual records by
host. - ✅ Bulk update from CSV (update existing hosts).
- ✅ Mass replace login/password across all records (with modes: replace or add).
- ✅ Export WBX → CSV and import CSV → WBX.
- ✅ Preview/analyze CSV without importing.
- ✅ Passwords remain plain text inside WBX (same as Winbox).
Clone this repository and run with Python 3:
git clone https://github.com/yourname/wbx-editor.git
cd wbx-editor
chmod +x wbx_tool.pyHuman-readable list:
python3 wbx_tool.py --in addresses.WBX --listHide secrets:
python3 wbx_tool.py --in addresses.WBX --list --hide-secretsRaw hex with lengths:
python3 wbx_tool.py --in addresses.WBX --list-rawSet new login for a host:
python3 wbx_tool.py --in addresses.WBX \
--set-login 192.168.88.1 admin \
--out new.WBXSet new password (also enables keep-pwd):
python3 wbx_tool.py --in addresses.WBX \
--set-pass 192.168.88.1 MySecret123 \
--out new.WBXSet keep-pwd flag:
python3 wbx_tool.py --in addresses.WBX \
--set-keep 192.168.88.1 1 \
--out new.WBXReplace all records where login = olduser with new login/password.
Mode: replace (default) → changes in place:
python3 wbx_tool.py --in addresses.WBX \
--replace-login olduser newuser NewPass123 \
--replace-mode replace \
--out addresses-new.WBXMode: add → duplicates entries with new login/password, keeping originals:
python3 wbx_tool.py --in addresses.WBX \
--replace-login olduser newuser NewPass123 \
--replace-mode add \
--out addresses-new-add.WBXUpdate existing WBX entries by host using a CSV file.
Columns supported: host, login, password, keep (others ignored for updates).
Example changes.csv:
host,login,password,keep
10.0.0.1,admin,Secret123,1
10.0.0.2,netops,AnotherPass,1Apply updates:
python3 wbx_tool.py --in addresses.WBX \
--csv changes.csv \
--out addresses-updated.WBX--import-csv.
Dump WBX records to a CSV file:
python3 wbx_tool.py --in addresses.WBX --export-csv addresses.csvOutput columns:
grouphostloginpasswordkeepnotetypesecure-mode
Build WBX from scratch using a CSV file (creates all rows, including new hosts):
python3 wbx_tool.py --import-csv addresses.csv --out addresses-built.WBXAlias: you can also use --csv without --in:
python3 wbx_tool.py --csv addresses.csv --out addresses-built.WBXNotes:
hostcolumn is required.- If
passwordis set andkeepis empty, the tool defaults tokeep=1.
Check CSV structure without importing:
python3 wbx_tool.py --preview-csv addresses.csvOutput:
Detected delimiter: ','
Headers: ['group','host','login','password','keep','note','type','secure-mode']
Rows (excluding header): 395
Rows missing 'host': 0
First rows:
#1 group=OFFICE, host=10.0.0.1, login=admin, password=Secret123, keep=1
#2 group=LAB, host=10.0.0.2, login=netops, password=AnotherPass, keep=1
...
By default shows first 20 rows. Show all rows:
python3 wbx_tool.py --preview-csv addresses.csv --preview-limit 0- Clone all
YaTvaccounts with new loginNetOpsand passwordN3wP@ss!:
python3 wbx_tool.py --in addresses.WBX \
--replace-login YaTv NetOps N3wP@ss! \
--replace-mode add \
--out addresses-cloned.WBX- Update 200 servers in bulk from Excel-exported CSV:
python3 wbx_tool.py --in servers.WBX \
--csv update.csv \
--out servers-updated.WBX- Export all saved Winbox sessions to CSV for auditing:
python3 wbx_tool.py --in addresses.WBX --export-csv audit.csv- Preview a questionable CSV before importing:
python3 wbx_tool.py --preview-csv broken.csv --preview-limit 50-
Always backup your WBX before editing:
cp addresses.WBX addresses-backup.WBX
-
WBX stores passwords in plain text. Treat exported CSVs carefully.
-
This tool is meant for automation, bulk management, and recovery — not for securing credentials.
MIT License — free for personal and commercial use.
Website: https://github.com/YATV/WBX-tools/
Author: Taras Yanchuk
Say thank you here: https://www.patreon.com/YATV