rabobank-cdc / DeTTECT

Detect Tactics, Techniques & Combat Threats
GNU General Public License v3.0
2.04k stars 331 forks source link

Unable to generate groups heatmap #90

Closed OpalSec closed 1 year ago

OpalSec commented 1 year ago

I attempted to generate a groups layer using the sample data - despite using the exact command suggested, it didn't work:

user@ubuntu:/opt/DeTTECT# python dettect.py g -g sample-data/groups.yaml 
Traceback (most recent call last):
  File "dettect.py", line 421, in <module>
    _menu(_init_menu())
  File "dettect.py", line 339, in _menu
    generate_group_heat_map(args.groups, args.campaigns, args.overlay, args.overlay_type, args.platform,
  File "/opt/DeTTECT/group_mapping.py", line 729, in generate_group_heat_map
    groups_dict |= campaigns_dict
TypeError: unsupported operand type(s) for |=: 'dict' and 'dict'

I'm running Python 3.8.10, which should be supported for this project.

rubinatorz commented 1 year ago

hi @OpalSec

I was using the "|=" operator on line group_mapping.py:729 but this operator is new in Python 3.9. I just changed it to the dict.update(dict) method to support older Python versions. So when you checkout the latest master branch code it should work.

Regards, Ruben