mirror of
https://github.com/samba-team/samba.git
synced 2025-01-06 13:18:07 +03:00
a07279b78a
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Noel Power <npower@samba.org>
14 lines
332 B
Python
14 lines
332 B
Python
#!/usr/bin/env python3
|
|
# Trivial reimplementation of tdbdump in Python
|
|
|
|
from __future__ import print_function
|
|
import tdb, sys
|
|
|
|
if len(sys.argv) < 2:
|
|
print("Usage: tdbdump.py <tdb-file>")
|
|
sys.exit(1)
|
|
|
|
db = tdb.Tdb(sys.argv[1])
|
|
for (k, v) in db.items():
|
|
print("{\nkey(%d) = %r\ndata(%d) = %r\n}" % (len(k), k, len(v), v))
|