Skip to content

Commit cbb09c4

Browse files
authored
Publish LDAPHero (#4762)
* Introduce LDAPéro * Fix tox -e docs2 * Update ldap.rst
1 parent 56de4f4 commit cbb09c4

File tree

5 files changed

+2075
-2
lines changed

5 files changed

+2075
-2
lines changed

doc/scapy/layers/ldap.rst

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,4 +251,30 @@ The following issues a ``Modify Request`` that replaces the ``displayName`` attr
251251
)
252252
)
253253
]
254-
)
254+
)
255+
256+
LDAPHero
257+
--------
258+
259+
LDAPHero (LDAPéro in French) is a graphical wrapper around Scapy's :class:`~scapy.layers.ldap.LDAP_Client`, that works on all plateforms.
260+
It can be used with:
261+
262+
.. code:: python
263+
264+
>>> load_module("ticketer")
265+
>>> LDAPHero()
266+
267+
It's possible to pass it a SSP, which will be used when clicking the "Bind" button:
268+
269+
.. code:: python
270+
271+
>>> LDAPHero(mech=LDAP_BIND_MECHS.SICILY,
272+
... ssp=NTLMSSP(UPN="[email protected]", PASSWORD="test"))
273+
274+
You can use the same examples as in `Binding <#binding>`_.
275+
276+
It's also possible to pass some connection parameters, for instance to connect to a specific host, you could use:
277+
278+
.. code:: python
279+
280+
>>> LDAPHero(host="192.168.0.100")

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ all = [
6060
"matplotlib",
6161
]
6262
doc = [
63+
"cryptography>=2.0",
6364
"sphinx>=7.0.0",
6465
"sphinx_rtd_theme>=1.3.0",
6566
"tox>=3.0.0",

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)