Ejemplo n.º 1
0
 public SMBShareACL(HostShare share, Dictionary <string, Dictionary <string, string> > shareACL, Dictionary <DateTime, Dictionary <string, Dictionary <string, string> > > ShareACLEvolution)
 {
     this.discoveryDateTime = DateTime.UtcNow;
     this.share             = share;
     this.shareACL          = shareACL;
     this.shareACLEvolution = ShareACLEvolution;
 }
Ejemplo n.º 2
0
 static private bool IsRecursivelyScannable(HostShare hostShare)
 {
     return(
         !(
             hostShare.shareInfo.shi1_type == (UInt16)SHARE_TYPE.STYPE_PRINTQ ||
             hostShare.shareInfo.shi1_type == (UInt16)SHARE_TYPE.STYPE_IPC ||
             Config.SharesRecursiveScanBlackList.Contains(hostShare.shareInfo.shi1_netname)
             )
         );
 }
Ejemplo n.º 3
0
        static private bool IsRecursivelyScannable(HostShare hostShare)
        {
            if (hostShare.shareInfo.shi1_type == (UInt16)SHARE_TYPE.STYPE_PRINTQ || hostShare.shareInfo.shi1_type == (UInt16)SHARE_TYPE.STYPE_IPC)
            {
                return(false);
            }

            if (Config.SharesRecursiveScanBlackList.Contains(hostShare.shareInfo.shi1_netname))
            {
                return(false);
            }

            return((Config.SharesScanWhiteList.Count > 0) ? Config.SharesScanWhiteList.Contains(hostShare.shareInfo.shi1_netname) : true);
        }
Ejemplo n.º 4
0
 public static SMBShareACL GetShareACL(HostShare share)
 {
     if (share.shareInfo.shi1_type == (UInt16)SHARE_TYPE.STYPE_IPC || share.shareInfo.shi1_type == (UInt16)SHARE_TYPE.STYPE_PRINTQ)
     {
         if (Config.Debug)
         {
             Console.WriteLine("[*][" + DateTime.Now.ToString() + "] The shareInfo " + share.ToString() + " will not be scanned");
         }
         return(new SMBShareACL {
             share = share, shareACL = new Dictionary <string, Dictionary <string, string> >()
         });
     }
     return(new SMBShareACL {
         share = share, shareACL = GetShareACL(share.ToString())
     });
 }