/// <summary> /// Run protection scan on a given dump environment /// </summary> /// <param name="env">DumpEnvirionment containing all required information</param> /// <returns>Copy protection detected in the envirionment, if any</returns> public static async Task <string> RunProtectionScanOnPath(string path) { try { var found = await Task.Run(() => { return(ProtectionFind.Scan(path)); }); if (found == null || found.Count == 0) { return("None found"); } return(string.Join("\n", found.Select(kvp => kvp.Key + ": " + kvp.Value).ToArray())); } catch { return("Path could not be scanned!"); } }