diff --git a/RombaSharp/RombaSharp.Inits.cs b/RombaSharp/RombaSharp.Inits.cs index 8856cbca..693d92af 100644 --- a/RombaSharp/RombaSharp.Inits.cs +++ b/RombaSharp/RombaSharp.Inits.cs @@ -610,14 +610,11 @@ namespace RombaSharp /// List of input strings representing hashes to check for /// Size to limit hash by, -1 otherwise /// Output directory - /// TODO: Verify implementation private static void InitLookup( List inputs, long size, string outdat) { - Globals.Logger.Error("This feature is not yet implemented: lookup"); - // First, try to figure out what type of hash each is by length and clean it List crc = new List(); List md5 = new List(); @@ -662,7 +659,13 @@ namespace RombaSharp SqliteDataReader sldr = slc.ExecuteReader(); if (sldr.HasRows) { - Globals.Logger.User("For hash '{0}' there were {1} matches in the database", input, sldr.RecordsAffected); + int count = 0; + while (sldr.Read()) + { + count++; + } + + Globals.Logger.User("For hash '{0}' there were {1} matches in the database", input, count); } else { @@ -679,7 +682,13 @@ namespace RombaSharp SqliteDataReader sldr = slc.ExecuteReader(); if (sldr.HasRows) { - Globals.Logger.User("For hash '{0}' there were {1} matches in the database", input, sldr.RecordsAffected); + int count = 0; + while (sldr.Read()) + { + count++; + } + + Globals.Logger.User("For hash '{0}' there were {1} matches in the database", input, count); } else { @@ -696,7 +705,13 @@ namespace RombaSharp SqliteDataReader sldr = slc.ExecuteReader(); if (sldr.HasRows) { - Globals.Logger.User("For hash '{0}' there were {1} matches in the database", input, sldr.RecordsAffected); + int count = 0; + while (sldr.Read()) + { + count++; + } + + Globals.Logger.User("For hash '{0}' there were {1} matches in the database", input, count); } else { diff --git a/RombaSharp/RombaSharp.cs b/RombaSharp/RombaSharp.cs index 9467b6d0..148b0a2d 100644 --- a/RombaSharp/RombaSharp.cs +++ b/RombaSharp/RombaSharp.cs @@ -165,21 +165,9 @@ namespace RombaSharp // Verify that the current flag is proper for the feature if (!_help[feature].ValidateInput(args[i])) { - // Special cases for files - List temp = new List(); - temp.Add(args[i]); - if (!File.Exists(args[i]) - && !Directory.Exists(args[i]) - && GetValidDats(temp).Count == 0) - { - Globals.Logger.Error("Invalid input detected: {0}", args[i]); - _help.OutputIndividualFeature(feature); - Globals.Logger.Close(); - return; - } + // Everything else is treated as a generic input + inputs.Add(args[i]); } - - inputs.Add(args[i]); } // Now loop through all inputs