예제 #1
0
 internal static void CheckVRPS(string filename)
 {
     try
     {
         if (SettingsManager.VRPS)
         {
             if (FileFormat.GetVRPS(Path.GetExtension(filename)) != "false")
             {
                 // only VT
                 if (FileFormat.GetVRPS(Path.GetExtension(filename)) == "1")
                 {
                     string vn       = null;
                     bool   ssresult = VT.Check(Security.GetMD5HashFromFile(filename), out vn);
                     if (ssresult)
                     {
                         Alert.InfectedByMany(vn, filename);
                     }
                 }
                 else if (FileFormat.GetVRPS(Path.GetExtension(filename)) == "2")
                 {
                     string vn       = null;
                     bool   ssresult = VT.Check(Security.GetMD5HashFromFile(filename), out vn);
                     if (ssresult)
                     {
                         Alert.InfectedByMany(vn, filename);
                     }
                     else
                     {
                         string infec     = null;
                         bool   sysresult = ThreadExpert.Check(Security.GetMD5HashFromFile(filename), out infec);
                         if (sysresult)
                         {
                             if (infec != "ThreatExpert Submission Report")
                             {
                                 if (Regex.Match(infec, @"[A-Z]", RegexOptions.IgnoreCase).Success)
                                 {
                                     Alert.InfectedByMany(infec, filename);
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     catch
     {
     }
     finally
     {
     }
 }
예제 #2
0
 internal static bool CheckReputation(string filename)
 {
     try
     {
         if (FileFormat.GetVRPS(Path.GetExtension(filename)) != "false")
         {
             // only VT
             if (FileFormat.GetVRPS(Path.GetExtension(filename)) == "1")
             {
                 string vn       = null;
                 bool   ssresult = VT.Check(Security.GetMD5HashFromFile(filename), out vn);
                 if (ssresult)
                 {
                     return(true);
                 }
             }
             else if (FileFormat.GetVRPS(Path.GetExtension(filename)) == "2")
             {
                 string vn       = null;
                 bool   ssresult = VT.Check(Security.GetMD5HashFromFile(filename), out vn);
                 if (ssresult)
                 {
                     return(true);
                 }
                 else
                 {
                     string infec     = null;
                     bool   sysresult = ThreadExpert.Check(Security.GetMD5HashFromFile(filename), out infec);
                     if (sysresult)
                     {
                         if (infec != "ThreatExpert Submission Report")
                         {
                             if (Regex.Match(infec, @"[A-Z]", RegexOptions.IgnoreCase).Success)
                             {
                                 return(true);
                             }
                         }
                     }
                 }
             }
         }
         return(false);
     }
     catch
     {
     }
     finally
     {
     }
     return(false);
 }