WithSecureLabs/drozer

The module server cannot be accessed. - Error

bzxxxxxx opened this issue · 4 comments

drozer module search
Traceback (most recent call last):
  File "/usr/local/bin/drozer", line 32, in <module>
    __import__("drozer.cli.%s" % (sys.argv[1]))
  File "/usr/local/lib/python3.10/dist-packages/drozer/cli/module.py", line 5, in <module>
    ModuleManager().run(sys.argv[2::])
  File "/usr/local/lib/python3.10/dist-packages/drozer/repoman/manager.py", line 79, in run
    self._Base__invoke_command(arguments)
  File "/usr/local/lib/python3.10/dist-packages/WithSecure/common/cli.py", line 137, in __invoke_command
    getattr(self, "do_" + command)(arguments)
  File "/usr/local/lib/python3.10/dist-packages/drozer/repoman/manager.py", line 58, in do_search
    self.__search_remotes(len(arguments.options) > 0 and arguments.options[0] or "", arguments.descriptions)
  File "/usr/local/lib/python3.10/dist-packages/drozer/repoman/manager.py", line 146, in __search_remotes
    modules = installer.search_index(term)
  File "/usr/local/lib/python3.10/dist-packages/drozer/repoman/installer.py", line 100, in search_index
    index = self.__get_combined_index()
  File "/usr/local/lib/python3.10/dist-packages/drozer/repoman/installer.py", line 149, in __get_combined_index
    source = Remote.get(url).download("INDEX.xml")
  File "/usr/local/lib/python3.10/dist-packages/drozer/repoman/remotes.py", line 88, in download
    return self.getPath(module)
  File "/usr/local/lib/python3.10/dist-packages/drozer/repoman/remotes.py", line 102, in getPath
    socket = FakeSocket(r.read())
TypeError: initial_value must be str or None, not bytes

drozer module install cmdclient 
Traceback (most recent call last):
  File "/usr/local/bin/drozer", line 32, in <module>
    __import__("drozer.cli.%s" % (sys.argv[1]))
  File "/usr/local/lib/python3.10/dist-packages/drozer/cli/module.py", line 5, in <module>
    ModuleManager().run(sys.argv[2::])
  File "/usr/local/lib/python3.10/dist-packages/drozer/repoman/manager.py", line 79, in run
    self._Base__invoke_command(arguments)
  File "/usr/local/lib/python3.10/dist-packages/WithSecure/common/cli.py", line 137, in __invoke_command
    getattr(self, "do_" + command)(arguments)
  File "/usr/local/lib/python3.10/dist-packages/drozer/repoman/manager.py", line 31, in do_install
    repository = self.__choose_repo()
  File "/usr/local/lib/python3.10/dist-packages/drozer/repoman/manager.py", line 91, in __choose_repo
    if len(repositories) == 1:
TypeError: object of type 'map' has no len()

The module server cannot be accessed. It could be installed in the previous version. When will it be opened?

Hi!
https://labs.withsecure.com/tools/drozer
If you see at point 5.1 currently the module functionality still needs to be ported.

May I ask what you want to use modules for? My understanding is all the public modules are all extremely out of date, and not really relevant! However if this usecase is a blocker for you and others we can prioritize fixing it.

Hi! https://labs.withsecure.com/tools/drozer If you see at point 5.1 currently the module functionality still needs to be ported.

May I ask what you want to use modules for? My understanding is all the public modules are all extremely out of date, and not really relevant! However if this usecase is a blocker for you and others we can prioritize fixing it.

Hello, I was using the previous Python2 version, it's not a big deal, but I was curious about what had changed. It's not a big problem, but thank you and good work.

No worries! Thanks for the bug report :D
Its definitely on the roadmap, but its probably looking more like a "Completely recreate the feature from scratch" instead of porting it if nobody really is using it as it is right now.

Fixing the module repo itself is a small part of the job. That said, all of the modules currently in there are broken for many reasons (Python 2/Python 3 differences being one of them). But we should be able to at least restore the infrastructure for future contributors.