| 1 | from autorecon.plugins import ServiceScan |
| 2 | |
| 3 | class LDAPSearch(ServiceScan): |
| 4 | |
| 5 | def __init__(self): |
| 6 | super().__init__() |
| 7 | self.name = 'LDAP Search' |
| 8 | self.tags = ['default', 'safe', 'ldap', 'active-directory'] |
| 9 | |
| 10 | def configure(self): |
| 11 | self.match_service_name('^ldap') |
| 12 | |
| 13 | def manual(self, service, plugin_was_run): |
| 14 | service.add_manual_command('ldapsearch command (modify before running):', [ |
| 15 | 'ldapsearch -x -D "<username>" -w "<password>" -H ldap://{address}:{port} -b "dc=example,dc=com" -s sub "(objectclass=*)" 2>&1 | tee > "{scandir}/{protocol}_{port}_ldap_all-entries.txt"' |
| 16 | ]) |
nothing calls this directly
no outgoing calls
no test coverage detected