diff --git a/README.md b/README.md index 1e44bdb..b5b3775 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # lsassy -[![PyPI version](https://d25lcipzij17d.cloudfront.net/badge.svg?id=py&type=6&v=3.1.2&x2=0)](https://pypi.org/project/lsassy/) +[![PyPI version](https://d25lcipzij17d.cloudfront.net/badge.svg?id=py&type=6&v=3.1.3&x2=0)](https://pypi.org/project/lsassy/) [![PyPI Statistics](https://img.shields.io/pypi/dm/lsassy.svg)](https://pypistats.org/packages/lsassy) [![Tests](https://github.com/hackndo/lsassy/workflows/Tests/badge.svg)](https://github.com/hackndo/lsassy/actions?workflow=Tests) [![Twitter](https://img.shields.io/twitter/follow/hackanddo?label=HackAndDo&style=social)](https://twitter.com/intent/follow?screen_name=hackanddo) diff --git a/lsassy/__init__.py b/lsassy/__init__.py index f71b21a..dc0a25b 100644 --- a/lsassy/__init__.py +++ b/lsassy/__init__.py @@ -1 +1 @@ -__version__ = '3.1.2' +__version__ = '3.1.3' diff --git a/lsassy/console.py b/lsassy/console.py index 0221024..d58ea17 100644 --- a/lsassy/console.py +++ b/lsassy/console.py @@ -66,7 +66,7 @@ def main(): group_out.add_argument('--users', action='store_true', help='Only display user accounts (No computer accounts)') group_out.add_argument('--no-tickets', action='store_true', help='Do not display valid TGT') - group_out.add_argument('--no-masterkeys', action='store_true', help='Do not display valid masterkeys') + group_out.add_argument('--masterkeys', action='store_true', help='Display valid masterkeys') parser.add_argument('-v', action='count', default=0, help='Verbosity level (-v or -vv)') parser.add_argument('--threads', default=10, type=int, action='store', help='Threads number') diff --git a/lsassy/core.py b/lsassy/core.py index 53e848b..75ceadc 100644 --- a/lsassy/core.py +++ b/lsassy/core.py @@ -214,7 +214,7 @@ def run(self): quiet=self.args.quiet, users_only=self.args.users, tickets=not self.args.no_tickets, - masterkeys=not self.args.no_masterkeys, + masterkeys=self.args.masterkeys, kerberos_dir=kerberos_dir, masterkeys_file=masterkeys_file ) diff --git a/lsassy/output/__init__.py b/lsassy/output/__init__.py index d550bb4..bd9ee48 100644 --- a/lsassy/output/__init__.py +++ b/lsassy/output/__init__.py @@ -27,7 +27,7 @@ def get_credentials(credentials, users_only=False, tickets=False, masterkeys=Fal :param masterkeys: If set, also returns valid DPAPI masterkeys :return: List of credentials dict """ - return [cred.get_object() for cred in credentials if (tickets or cred.ticket is None) and masterkeys and not (users_only and cred.get_username().endswith("$"))] + return [cred.get_object() for cred in credentials if (tickets or cred.ticket is None) and (masterkeys or cred.masterkey is None) and not (users_only and cred.get_username().endswith("$"))] def get_output(self): """ diff --git a/pyproject.toml b/pyproject.toml index 62514e8..2eec0d4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "lsassy" -version = "3.1.2" +version = "3.1.3" description = "Tool to remotely extract credentials" readme = "README.md" homepage = "https://github.com/hackndo/lsassy" diff --git a/setup.py b/setup.py index 049f643..e10e9de 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setup( name="lsassy", - version="3.1.2", + version="3.1.3", author="Pixis", author_email="hackndo@gmail.com", description="Python library to extract credentials from lsass remotely", diff --git a/tests/test_lsassy.py b/tests/test_lsassy.py index 4d46f6a..18895b9 100644 --- a/tests/test_lsassy.py +++ b/tests/test_lsassy.py @@ -2,4 +2,4 @@ def test_version(): - assert __version__ == '3.1.2' + assert __version__ == '3.1.3'