예제 #1
0
        public override string[] Execute(ParsedArgs args)
        {
            if (string.IsNullOrEmpty(args.ComputerName) || string.IsNullOrEmpty(args.GroupName))
            {
                throw new EDDException("ComputerName and GroupName cannot be empty");
            }

            Amass         shepherd          = new Amass();
            List <string> localGroupMembers = shepherd.GetLocalGroupMembers(args.ComputerName, args.GroupName);

            return(localGroupMembers.ToArray());
        }
        public override string[] Execute(ParsedArgs args)
        {
            try
            {
                if (string.IsNullOrEmpty(args.ComputerName) || string.IsNullOrEmpty(args.GroupName))
                {
                    throw new EDDException("ComputerName and GroupName cannot be empty");
                }

                Amass         shepherd          = new Amass();
                List <string> localGroupMembers = shepherd.GetLocalGroupMembers(args.ComputerName, args.GroupName);
                return(localGroupMembers.ToArray());
            }
            catch (Exception e)
            {
                return(new string[] { "[X] Failure to enumerate info - " + e });
            }
        }