Skip to content

Fix missing required argument in ADUserCreds Report constructor - #132

Merged
fang0654 merged 1 commit into
depthsecurity:dockerfrom
crypt0lith:fix/adusercreds-constructor-override
Sep 10, 2026
Merged

Fix missing required argument in ADUserCreds Report constructor#132
fang0654 merged 1 commit into
depthsecurity:dockerfrom
crypt0lith:fix/adusercreds-constructor-override

Conversation

@crypt0lith

Copy link
Copy Markdown
Contributor

Summary

list_report_options in armory_cmd.py raises TypeError for the ADUserCreds report template due to a missing required argument:

$ armory -r ADUserCreds -R
Traceback (most recent call last):
  ...
  File ".../armory_cmd.py", line 272, in list_report_options
    m = Module.Report()
TypeError: Report.__init__() missing 1 required positional argument: 'db'

Root cause

The Report class in ADUserCreds.py overrode ReportTemplate.__init__ in an incompatible manner. ReportTemplate defined def __init__(self, db=None): pass, while ADUserCreds.Report defined def __init__(self, db): pass, making db a required argument by omitting the default None value.

Fix

Remove the __init__ methods for both ReportTemplate and ADUserCreds.Report, since the db argument was never used and no callers in the package supplied it.

The 'Report' class in ADUserCreds.py overrode 'ReportTemplate.__init__'
in an incompatible manner. 'ReportTemplate' defined 'def __init__(self,
db=None): pass', while 'ADUserCreds.Report' defined 'def __init__(self,
db): pass', making 'db' a required argument by omitting the default
None value.

Removes the __init__ methods for both ReportTemplate and
ADUserCreds.Report, since the 'db' argument was never used and no
callers in the package supplied it.
@fang0654

Copy link
Copy Markdown
Collaborator

Oh yeah, this is left over from armory v1. Thanks for the PR!

@fang0654
fang0654 merged commit aeb17b6 into depthsecurity:docker Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants