@@ -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
224224class ShadowCoerceTrigger :
225225 def __init__ (self , context ):
0 commit comments