There is a code in C #, I need to remake if ((product.Contains ("mysql: mysql")) || ... so that the lines are taken from the list.
public List<string> GetIDDesiredDB(List<EntryType> entries) { List<string> IDs = new List<string>(); string id = ""; //List<string> products = GetProductsList(); foreach (EntryType entry in entries) if (entry.VulnerableSoftwareList != null) foreach (string product in entry.VulnerableSoftwareList.Products) if ((product.Contains("mysql:mysql")) || (product.Contains("microsoft:sql_server")) || (product.Contains("oracle:mysql")) || (product.Contains("oracle:database"))) if (id != entry.id) { IDs.Add(entry.id); id = entry.id; } return IDs; } I do this, but I don’t go into if:
var products = GetProductsList(); // [ "mysql:mysql", "microsoft:sql_server", "oracle:mysql", "oracle:database" ] foreach (string product in products) if(entry.VulnerableSoftwareList.Products.Contains(product))
productsan empty list? - VladDvar, var, var...- Igorentryis of typeEntry, in which there is an open field / propertyVulnerableSoftwareList? - VladDVulnerableSoftwareList.Productsjust astring[]? - isnullxbh