public override string[] Execute(ParsedArgs args) { LDAP findDCs = new LDAP(); List <string> domainControllers = findDCs.CaptureDomainControllers(); return(domainControllers.ToArray()); }
public override string[] Execute(ParsedArgs args) { try { List <string> domainControllers = new List <string>(); LDAP domainQuery = new LDAP(); LDAP findDCs = new LDAP(); if (string.IsNullOrEmpty(args.DomainName)) { domainControllers = findDCs.CaptureDomainControllers(); } else { domainControllers = findDCs.CaptureDomainControllers(args.DomainName); } return(domainControllers.ToArray()); } catch (Exception e) { return(new string[] { "[X] Failure to enumerate info - " + e }); } }