the-useless-one / pywerview

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

TypeError: unhashable type: 'list' #58

Closed CaledoniaProject closed 11 months ago

CaledoniaProject commented 1 year ago

I'm trying to execute invoke-userhunter function and I got this error, any ideas?

Traceback (most recent call last):
  File "pywerview.py", line 23, in <module>
    main()
  File "/root/pywerview-master/pywerview/cli/main.py", line 578, in main
    results = args.func(**parsed_args)
  File "/root/pywerview-master/pywerview/cli/helpers.py", line 329, in invoke_userhunter
    foreign_users=foreign_users)
  File "/root/pywerview-master/pywerview/functions/hunting.py", line 191, in invoke_userhunter
    stealth_source=stealth_source)
  File "/root/pywerview-master/pywerview/functions/hunting.py", line 77, in _build_target_computers
    self._target_computers = list(set(self._target_computers))
TypeError: unhashable type: 'list'
CaledoniaProject commented 1 year ago

Why do you need to unique the list here? AD won't return duplicate objects. I had to remove this line to make it work.

ThePirateWhoSmellsOfSunflowers commented 1 year ago

Hi!

I tried to fix it in the last commit : https://github.com/the-useless-one/pywerview/tree/fix_hunting

:sunflower:

ThePirateWhoSmellsOfSunflowers commented 11 months ago

I tested the fix during a engagement, it works. Closing now.

:sunflower: