Exemple #1
0
 public Utils(Sharphound.Options cli)
 {
     _options     = cli;
     _cache       = Cache.Instance;
     _domainList  = CreateDomainList();
     _pingTimeout = TimeSpan.FromMilliseconds(_options.PingTimeout);
 }
Exemple #2
0
 public Utils(Sharphound.Options cli)
 {
     _options             = cli;
     _cache               = Cache.Instance;
     _domainList          = CreateDomainList();
     _pingTimeout         = TimeSpan.FromMilliseconds(_options.PingTimeout);
     _ldapConnectionCache = new ConcurrentDictionary <string, LdapConnection>();
     _gcConnectionCache   = new ConcurrentDictionary <string, LdapConnection>();
 }
Exemple #3
0
        private Cache(Sharphound.Options opts)
        {
            _options  = opts;
            _fileName = Path.Combine(_options.JsonFolder, _options.CacheFile);
            var oldFilePath = Path.Combine(_options.JsonFolder, "BloodHound.bin");

            if (File.Exists(oldFilePath))
            {
                File.Move(oldFilePath, _fileName);
            }

            LoadCache();
        }
Exemple #4
0
 private Cache(Sharphound.Options opts)
 {
     _options  = opts;
     _fileName = Path.Combine(_options.CSVFolder, _options.CacheFile);
     LoadCache();
 }
Exemple #5
0
 public static void CreateInstance(Sharphound.Options opts)
 {
     Instance = new Cache(opts);
 }
Exemple #6
0
 public static void CreateInstance(Sharphound.Options cli)
 {
     Instance       = new Utils(cli);
     _fileTimeStamp = $"{DateTime.Now:yyyyMMddHHmmss}";
 }
Exemple #7
0
 public static void CreateInstance(Sharphound.Options cli)
 {
     Instance = new Utils(cli);
 }
Exemple #8
0
 private Cache(Sharphound.Options opts)
 {
     _options = opts;
     LoadCache(_options.CacheFile);
 }