Skip to content

Commit 895c366

Browse files
committed
Introduce LDAPéro
1 parent 56de4f4 commit 895c366

3 files changed

Lines changed: 2074 additions & 2 deletions

File tree

doc/scapy/layers/ldap.rst

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ In that case, the default port is 636. This can be changed using the ``port`` at
8787
Binding
8888
~~~~~~~
8989

90+
.. section:: binding
91+
9092
When binding, you must specify a *mechanism type*. This type comes from the :class:`~scapy.layers.ldap.LDAP_BIND_MECHS` enumeration, which contains:
9193

9294
- :attr:`~scapy.layers.ldap.LDAP_BIND_MECHS.NONE`: an unauthenticated bind.
@@ -251,4 +253,30 @@ The following issues a ``Modify Request`` that replaces the ``displayName`` attr
251253
)
252254
)
253255
]
254-
)
256+
)
257+
258+
LDAPHero
259+
--------
260+
261+
LDAPHero (LDAPéro in French) is a graphical wrapper around Scapy's :class:`~scapy.layers.ldap.LDAP_Client`, that works on all plateforms.
262+
It can be used with:
263+
264+
.. code:: python
265+
266+
>>> load_module("ticketer")
267+
>>> LDAPHero()
268+
269+
It's possible to pass it a SSP, which will be used when clicking the "Bind" button:
270+
271+
.. code:: python
272+
273+
>>> LDAPHero(mech=LDAP_BIND_MECHS.SICILY,
274+
... ssp=NTLMSSP(UPN="Administrator@domain.local", PASSWORD="test"))
275+
276+
You can use the same examples as in `Binding <#binding>`_.
277+
278+
It's also possible to pass some connection parameters, for instance to connect to a specific host, you could use:
279+
280+
.. code:: python
281+
282+
>>> LDAPHero(host="192.168.0.100")

scapy/layers/ldap.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888
GSSAPI_BLOB,
8989
GSSAPI_BLOB_SIGNATURE,
9090
GSS_C_FLAGS,
91+
GSS_C_NO_CHANNEL_BINDINGS,
9192
GSS_S_COMPLETE,
9293
GssChannelBindings,
9394
SSP,
@@ -1808,7 +1809,7 @@ def __init__(
18081809
self.sign = False
18091810
# Session status
18101811
self.sasl_wrap = False
1811-
self.chan_bindings = None
1812+
self.chan_bindings = GSS_C_NO_CHANNEL_BINDINGS
18121813
self.bound = False
18131814
self.messageID = 0
18141815

0 commit comments

Comments
 (0)