Skip to content

Commit

Permalink
Fixing lstrip quirk/bug (threat9#585)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucyoa authored Apr 18, 2019
1 parent 188afd7 commit 01aac5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions routersploit/core/exploit/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ def shell(exploit, architecture="", method="", payloads=None, **params):

if architecture and method:
# get all payloads for given architecture
all_payloads = [p.lstrip('payloads.').replace('.', '/') for p in index_modules() if "payloads.{}".format(architecture) in p]
all_payloads = [p.replace("payloads.", "").replace(".", "/") for p in index_modules() if "payloads.{}".format(architecture) in p]

for p in all_payloads:
module = getattr(importlib.import_module('routersploit.modules.payloads.' + p.replace('/', '.')), 'Payload')
module = getattr(importlib.import_module("routersploit.modules.payloads." + p.replace("/", ".")), "Payload")

# if method/arch is cmd then filter out payloads
if method == "cmd":
Expand Down

0 comments on commit 01aac5a

Please sign in to comment.