Skip to content

Commit 87c95a4

Browse files
committed
Move int casting to value source
1 parent 23bab54 commit 87c95a4

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

nxc/protocols/ldap.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,7 @@ def resolve_and_display_hostname(name, domain_name=None):
819819
trust_flat_name = trust["flatName"]
820820
trust_direction = int(trust["trustDirection"])
821821
trust_type = int(trust["trustType"])
822-
trust_attributes = trust["trustAttributes"]
822+
trust_attributes = int(trust["trustAttributes"])
823823

824824
# See: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/e9a2d23c-c31e-4a6f-88a0-6646fdb51a3c
825825
trust_attribute_flags = {
@@ -837,10 +837,10 @@ def resolve_and_display_hostname(name, domain_name=None):
837837
}
838838

839839
# For check if multiple posibble flags, like Uplevel-Only, Treat as External
840-
trust_attributes_text = ", ".join([
840+
trust_attributes_text = ", ".join(
841841
text for flag, text in trust_attribute_flags.items()
842-
if int(trust_attributes) & flag
843-
]) or "Other" # If Trust attrs not known
842+
if trust_attributes & flag
843+
) or "Other" # If Trust attrs not known
844844

845845
# Convert trust direction/type to human-readable format
846846
direction_text = {

0 commit comments

Comments
 (0)