skelsec / pypykatz

Mimikatz implementation in pure Python
MIT License
2.81k stars 371 forks source link

python3.9 setup.py install: 2 errors #82

Closed blshkv closed 3 years ago

blshkv commented 3 years ago

pypykatz-0.4.8 was working fine, the latest version 0.5.0 got the following warning/error:

 .[32;01m*.[0m python3_9: running distutils-r1_run_phase distutils-r1_python_install
python3.9 setup.py install --skip-build --root=/var/tmp/portage/app-exploits/pypykatz-0.5.0/image/_python3.9
Warning: 'classifiers' should be a list, got type 'tuple'

<skip>

  File "/usr/lib/python3.9/site-packages/pypykatz/alsadecryptor/packages/kerberos/decryptor.py", line 96
                        entry_ptr = PLIST_ENTRY(self.reader)
                                    ^
SyntaxError: 'await' outside async function
daniboomberger commented 3 years ago

Hey I'm pretty new to contributing to open source projects. Am I allowed to make a pull request for the solution to the warning and the error? Thanks in advance.

blshkv commented 3 years ago

Yes, you can create a pull request

skelsec commented 3 years ago

This is super-weird, on Ubuntu + python3.8 this doesn't show an issue (that's the combo I'm testing + windows 3.8) Just a question: did this error message actually blocking the install? or it is just showing up during install? Reason for error: the async kerberos parsing is not yet finisheed, so I commented out the function which would start the parsing, then I started working on implementing it but it seems I would have better just commented out the whole file for the update.

skelsec commented 3 years ago

And ofc yes, you can always send a PR to any project on github, just be aware that not all PRs will be accepted. (but all of them will be appreciated)

blshkv commented 3 years ago

I haven't tested the functionality, but it fails later so I guess it is broken:

 * This package installs one or more Python modules that are not byte-compiled.
 * The following files are missing:
 * 
 *   /usr/lib/python3.8/site-packages/pypykatz/alsadecryptor/packages/kerberos/__pycache__/decryptor.cpython-38.pyc
 *   /usr/lib/python3.8/site-packages/pypykatz/alsadecryptor/packages/kerberos/__pycache__/decryptor.cpython-38.opt-1.pyc
 *   /usr/lib/python3.8/site-packages/pypykatz/alsadecryptor/packages/kerberos/__pycache__/decryptor.cpython-38.opt-2.pyc
 *   /usr/lib/python3.9/site-packages/pypykatz/alsadecryptor/packages/kerberos/__pycache__/decryptor.cpython-39.pyc
 *   /usr/lib/python3.9/site-packages/pypykatz/alsadecryptor/packages/kerberos/__pycache__/decryptor.cpython-39.opt-1.pyc
 *   /usr/lib/python3.9/site-packages/pypykatz/alsadecryptor/packages/kerberos/__pycache__/decryptor.cpython-39.opt-2.pyc

I'm sure you can reproduce it on Ubuntu using python setup.py install --user:

Warning: 'classifiers' should be a list, got type 'tuple'
running install
running bdist_egg
running egg_info
writing pypykatz.egg-info/PKG-INFO
writing dependency_links to pypykatz.egg-info/dependency_links.txt
writing entry points to pypykatz.egg-info/entry_points.txt
writing requirements to pypykatz.egg-info/requires.txt
writing top-level names to pypykatz.egg-info/top_level.txt
reading manifest file 'pypykatz.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'pypykatz.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
byte-compiling build/bdist.linux-x86_64/egg/pypykatz/alsadecryptor/packages/kerberos/decryptor.py to decryptor.c
python-39.pyc
  File "build/bdist.linux-x86_64/egg/pypykatz/alsadecryptor/packages/kerberos/decryptor.py", line 96
                        entry_ptr = await PLIST_ENTRY.load(self.reader)
                                    ^
SyntaxError: 'await' outside async function
blshkv commented 3 years ago

That pull seems fixed it. Thanks!