DedSecInside / TorBot

Dark Web OSINT Tool
Other
2.85k stars 525 forks source link

Tree related features don't work, TypeError #190

Closed advanced4 closed 2 years ago

advanced4 commented 3 years ago

Describe the bug Using arguments either "-d" or "-v" result in an error

To Reproduce Steps to reproduce the behavior: run python3 torBot.py -u https://p53lf57qovyuvwsc6xnrppyply3vtqm7l6pcobkmyqsiofyeznfu5uqd.onion -v -d

Expected behavior It to not crash. I haven't had a success case, and the repo doesn't provide any example of what this feature actually does, so I don't know what the expected behavior is

Additional context

python3 torBot.py -u https://p53lf57qovyuvwsc6xnrppyply3vtqm7l6pcobkmyqsiofyeznfu5uqd.onion -v -d

                           __  ____  ____  __        ______
                          / /_/ __ \/ __ \/ /_  ____/_  __/
                         / __/ / / / /_/ / __ \/ __ \/ /
                        / /_/ /_/ / _, _/ /_/ / /_/ / /
                        \__/\____/_/ |_/_____/\____/_/  V1.4.0

                    #######################################################
                    #  TorBot - An OSINT Tool for Dark Web                #
                    #  GitHub : https://github.com/DedsecInside/TorBot    #
                    #  Help : use -h for help text                        #
                    #######################################################
                                  LICENSE: GNU Public License v3

Attempting to connect to https://check.torproject.org/
Tor IP Address: 185.220.101.200
getattr(): attribute name must be string
Traceback (most recent call last):
  File "/home/me/.local/lib/python3.8/site-packages/ete3/treeview/main.py", line 415, in set_layout_fn
    self._layout_handler.append(getattr(layouts, ly))
TypeError: getattr(): attribute name must be string

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "torBot.py", line 261, in <module>
    main()
  File "torBot.py", line 177, in main
    tree.show()
  File "/mnt/d/git/personal/TorBot/src/modules/analyzer.py", line 63, in show
    self._tree.show(tree_style)
  File "/home/me/.local/lib/python3.8/site-packages/ete3/coretype/tree.py", line 1334, in show
    drawer.show_tree(self, layout=layout,
  File "/home/me/.local/lib/python3.8/site-packages/ete3/treeview/drawer.py", line 75, in show_tree
    scene, img = init_scene(t, layout, tree_style)
  File "/home/me/.local/lib/python3.8/site-packages/ete3/treeview/drawer.py", line 64, in init_scene
    ts.layout_fn  = layout
  File "/home/me/.local/lib/python3.8/site-packages/ete3/treeview/main.py", line 554, in __setattr__
    object.__setattr__(self, attr, val)
  File "/home/me/.local/lib/python3.8/site-packages/ete3/treeview/main.py", line 418, in set_layout_fn
    raise ValueError ("Required layout is not a function pointer nor a valid layout name.")
ValueError: Required layout is not a function pointer nor a valid layout name.
SubaruSama commented 3 years ago

I think i've got it for the -d parameter. The problem it was incorrect when it was passing the informations to the render method.

Here's my solution:

analyzer.py:
default_style = TreeStyle()
default_style.mode = 'c'
default_style.scale = 20
default_style.show_leaf_name = False
default_style.layout_fn = default_layout

save method:
self._tree.render(file_name, w=183, units='mm', tree_style=tree_style)
KingAkeem commented 3 years ago

This has been addressed, please let me know if you're still encountering issues.