Skip to content

nxcdb: export keys throws AttributeError — 'database' object has no attribute 'get_keys' #1273

Description

@m4sk0ff

Description

Running export keys all <filename> or export keys <id> <filename> inside nxcdb
crashes with an AttributeError.

Steps to Reproduce

  1. Run nxcdb
  2. Select a workspace and proto smb
  3. Run export keys all key3.bin

Error

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/nxc/nxcdb.py", line 314, in do_export
keys = self.db.get_keys() if line[1].lower() == "all" else self.db.get_keys(key_id=int(line[1]))
^^^^^^^^^^^^^^^^
AttributeError: 'database' object has no attribute 'get_keys'. Did you mean: 'get_users'?

Root Cause

do_export in nxcdb.py calls self.db.get_keys() but this method does not exist
on the database object. The help export output advertises keys as a valid table
but it cannot actually be exported.

Environment

  • nxc version: 1.5.1 - Yippie-Ki-Yay
  • Python: 3.13.9
  • OS: Kali

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions