예제 #1
0
 public Utils(Sharphound.Options cli)
 {
     _options     = cli;
     _cache       = Cache.Instance;
     _domainList  = CreateDomainList();
     _pingTimeout = TimeSpan.FromMilliseconds(_options.PingTimeout);
 }
예제 #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>();
 }
예제 #3
0
파일: Cache.cs 프로젝트: vletoux/SharpHound
        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();
        }
예제 #4
0
 private Cache(Sharphound.Options opts)
 {
     _options  = opts;
     _fileName = Path.Combine(_options.CSVFolder, _options.CacheFile);
     LoadCache();
 }
예제 #5
0
 public static void CreateInstance(Sharphound.Options opts)
 {
     Instance = new Cache(opts);
 }
예제 #6
0
 public static void CreateInstance(Sharphound.Options cli)
 {
     Instance       = new Utils(cli);
     _fileTimeStamp = $"{DateTime.Now:yyyyMMddHHmmss}";
 }
예제 #7
0
 public static void CreateInstance(Sharphound.Options cli)
 {
     Instance = new Utils(cli);
 }
예제 #8
0
 private Cache(Sharphound.Options opts)
 {
     _options = opts;
     LoadCache(_options.CacheFile);
 }