Skip to content

Commit 5d933ea

Browse files
committed
Ruff fix: return False only for specific RPC errors, None otherwise
1 parent 8177de2 commit 5d933ea

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

nxc/modules/enum_ca.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ def on_login(self, context, connection):
7878
RPC_PROXY_CONN_A1_0X6BA_ERR in error_text:
7979
context.log.fail("This usually means the target does not allow "
8080
"to connect to its epmapper using RpcProxy.")
81-
return
81+
return False
82+
8283
for entry in entries:
8384
tmpUUID = str(entry["tower"]["Floors"][0])
8485

@@ -95,7 +96,7 @@ def on_login(self, context, connection):
9596
context.log.highlight("Web enrollment found on HTTP (ESC8).")
9697
except requests.RequestException as e:
9798
context.log.debug(e)
98-
return
99+
return None
99100

100101
def __fetchList(self, doKerberos, rpctransport):
101102
dce = rpctransport.get_dce_rpc()

0 commit comments

Comments
 (0)