the-useless-one / pywerview

A (partial) Python rewriting of PowerSploit's PowerView
GNU General Public License v3.0
890 stars 113 forks source link

AttributeError: 'int' object has no attribute 'hex' #53

Closed sdcampbell closed 1 year ago

sdcampbell commented 1 year ago

I was able to replicate this error on a fresh installation of Kali Linux with nothing more than 'python3-pywerview' installed. The command I ran was:

pywerview get-netuser -w $DOMAIN -u $USERNAME -p '$PASSWORD' -t $DC_IP --username '*' --custom-filter '(!(userAccountControl:1.2.840.113556.1.4.803:=2))' |tee /dev/tty > netuser_enabled

On the last line before the error, the line started with 'wwwhomepage'.

The error:

Traceback (most recent call last):
  File "/usr/bin/pywerview", line 33, in <module>
    sys.exit(load_entry_point('pywerview==0.3.2', 'console_scripts', 'pywerview')())
  File "/usr/lib/python3/dist-packages/pywerview/cli/main.py", line 472, in main
    print(x)
  File "/usr/lib/python3/dist-packages/pywerview/objects/adobjects.py", line 122, in __str__
    member_value = (',\n' + ' ' * (max_length + 2)).join(x.hex() for x in member[1])
  File "/usr/lib/python3/dist-packages/pywerview/objects/adobjects.py", line 122, in <genexpr>
    member_value = (',\n' + ' ' * (max_length + 2)).join(x.hex() for x in member[1])
AttributeError: 'int' object has no attribute 'hex'
ThePirateWhoSmellsOfSunflowers commented 1 year ago

Hello,

Unfortunately, we do not maintained the kali package python3-pywerview (which seems to be out of date by the way, the last pywerview version is 0.4.0). Can you please git clone this repo and test again ?

:sunflower:

sdcampbell commented 1 year ago

Installing from source worked. Thanks!