Skip to content

Commit e428bcc

Browse files
committed
Move function
1 parent 81c6d9f commit e428bcc

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

nxc/modules/coerce_plus.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,6 @@ def __init__(self, context=None, module_options=None):
1919
self.always_continue = None
2020
self.method = "all"
2121

22-
@staticmethod
23-
def get_dynamic_endpoint(interface: bytes, target: str, timeout: int = 5) -> str:
24-
string_binding = rf"ncacn_ip_tcp:{target}[135]"
25-
rpctransport = transport.DCERPCTransportFactory(string_binding)
26-
rpctransport.set_connect_timeout(timeout)
27-
dce = rpctransport.get_dce_rpc()
28-
dce.connect()
29-
return epm.hept_map(target, interface, protocol="ncacn_ip_tcp", dce=dce)
30-
3122
def options(self, context, module_options):
3223
"""
3324
LISTENER LISTENER for exploitation (default: 127.0.0.1)
@@ -220,6 +211,15 @@ def on_login(self, context, connection):
220211
context.log.error("Invalid method, please check the method name.")
221212
return
222213

214+
@staticmethod
215+
def get_dynamic_endpoint(interface: bytes, target: str, timeout: int = 5) -> str:
216+
string_binding = rf"ncacn_ip_tcp:{target}[135]"
217+
rpctransport = transport.DCERPCTransportFactory(string_binding)
218+
rpctransport.set_connect_timeout(timeout)
219+
dce = rpctransport.get_dce_rpc()
220+
dce.connect()
221+
return epm.hept_map(target, interface, protocol="ncacn_ip_tcp", dce=dce)
222+
223223

224224
class ShadowCoerceTrigger:
225225
def __init__(self, context):

0 commit comments

Comments
 (0)