Pennyw0rth / NetExec

The Network Execution Tool
https://netexec.wiki/
BSD 2-Clause "Simplified" License
3.27k stars 358 forks source link

ldap-checker.py Catch connection errors #409

Closed cauan closed 2 months ago

cauan commented 2 months ago

Socket connection moved into the try/catch to catch connection errors.

cauan commented 2 months ago

image

Marshall-Hallenbeck commented 2 months ago

@cauan thanks for this! Can you also update line 115 to say "connection or handshake", so the user knows the error was in one of those, rather than just the handshake (how it is now)?

Marshall-Hallenbeck commented 2 months ago

or add the connection to its own try/except with separate error message, that might be better.

NeffIsBack commented 2 months ago

or add the connection to its own try/except with separate error message, that might be better.

Actually the error message is pretty descriptive on its own. Imo we could just leave it like that (although i can't really imagine how this could legitimate happen). image

cauan commented 2 months ago

or add the connection to its own try/except with separate error message, that might be better.

Actually the error message is pretty descriptive on its own. Imo we could just leave it like that (although i can't really imagine how this could legitimate happen). image

It happens when you use the ldap-check on a non-DC computer (no ldap)