Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check LDAP fields #4524

Merged
merged 1 commit into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions scapy/layers/ldap.py
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,8 @@ def answers(self, other):
return isinstance(other, LDAP) and other.messageID == self.messageID

def mysummary(self):
if not self.protocolOp or not self.messageID:
return ""
return (
"%s(%s)"
% (
Expand Down
5 changes: 5 additions & 0 deletions test/regression.uts
Original file line number Diff line number Diff line change
Expand Up @@ -2338,6 +2338,11 @@ except Scapy_Exception:
file = BytesIO(b"\n\r\r\n\x00\x00\x008\x1a+<M\x00\x01\x00\x00\xef\xff\xff\x81\x01\x00\x00\x01\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x009\x00\x00\x00\x01\x00\x00\x000\x00e\x00\x00\x00\x00\x00\x00\x00\x008\x00\x00\x00\x06\x00\x00\x00d\x00\x00\x00\x00'\x00\x00\x00\x01\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x00\x00\x000\x00\x00\x00\x01\x00\x00\x008\x00\x00\n\x0c\x00A\x05\xc0\x01\x00\x00\x00\x00\x00d\x00\x00\x00\x00\x00\x00\x00\x00\x000\x00\x00\x00\x01\x00\x00\x008\x00\x00\n\x0c\x00A\x05\xc0\x83\x00\x00\x043\x01\x00\x00\x00\x00\x00d\x00\x00\x00\x00d")
l = rdpcap(file)

# Issue #69628
gpotter2 marked this conversation as resolved.
Show resolved Hide resolved
file = BytesIO(b"M<\xb2\xa1 \x00\xff\xf9\xff\x00\x00\xff\xff\xff\xa1\xb2<M\x01\x00\x00\x00\x00\x00\x00\x17\xca\xca\xca\xca\xca\xca\xca\xca\xca\xca\r\x80\x01[\x00\x01noenum\x00\x00\x00\x00\x00\x06value\x01\x00\x00\x00\x00\x00\x00\x01\x85\xff\xff\x00\x00\x94\xc3\x000\x00\x08\xa0\xf30\x800\x000\x00")
l = rdpcap(file)
gpotter2 marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this test fails on 32-bit machines: #4527

assert l[0][LDAP].summary() == "LDAP"

= Read a pcap file with wirelen != captured len
pktpcapwirelen = rdpcap(pcapwirelenfile)

Expand Down
Loading