Ejemplo n.º 1
0
        public static List <Computer> GetDomainRandomTargets(int count)
        {
            List <Computer> targets = new List <Computer>();

            Console.WriteLine("[*] Obtaining domain random targets ...");
            targets = Ldap.GetADComputers(count);

            return(targets);
        }
Ejemplo n.º 2
0
        public static List <Computer> GetDomainRandomTargets(int count, Logger logger)
        {
            List <Computer> targets = new List <Computer>();

            logger.TimestampInfo("Obtaining domain random targets ...");
            targets = Ldap.GetADComputers(count, logger);

            return(targets);
        }
Ejemplo n.º 3
0
        public static List <Computer> GetDomainNeighborTargets(int count, Lib.Logger logger)
        {
            List <Computer>  targets = new List <Computer>();
            PrincipalContext context = new PrincipalContext(ContextType.Domain);
            string           dc      = context.ConnectedServer;

            logger.TimestampInfo("Obtaining domain neighbor targets ...");
            targets = Ldap.GetADComputers(count, logger, dc);
            //Console.WriteLine("[*] Finished");
            return(targets);
        }
Ejemplo n.º 4
0
        public static List <Computer> GetDomainNeighborTargets(int count)
        {
            List <Computer> targets     = new List <Computer>();
            string          logonserver = Environment.GetEnvironmentVariable("logonserver").Replace("\\", "");
            string          dnsdomain   = Environment.GetEnvironmentVariable("USERDNSDOMAIN");
            string          dc          = logonserver + "." + dnsdomain;

            Console.WriteLine("[*] Obtaining domain neighbor targets ...");
            targets = Ldap.GetADComputers(count, dc);

            return(targets);
        }
Ejemplo n.º 5
0
        public static List <Computer> GetDomainNeighborTargets(int count)
        {
            List <Computer> targets = new List <Computer>();

            /*
             * string logonserver = Environment.GetEnvironmentVariable("logonserver").Replace("\\","");
             * string dnsdomain = Environment.GetEnvironmentVariable("USERDNSDOMAIN");
             * string dc = logonserver + "." + dnsdomain;
             */
            PrincipalContext context = new PrincipalContext(ContextType.Domain);
            string           dc      = context.ConnectedServer;

            //logger.TimestampInfo("[*] Obtaining domain neighbor targets ...");
            Console.WriteLine("[*] Obtaining domain neighbor targets ...");
            targets = Ldap.GetADComputers(count, dc);
            //Console.WriteLine("[*] Finished");
            return(targets);
        }