diff --git a/Rubeus/Program.cs b/Rubeus/Program.cs index 1b643297..9bc5d859 100755 --- a/Rubeus/Program.cs +++ b/Rubeus/Program.cs @@ -93,7 +93,7 @@ public static string MainString(string command) return output; } - public static void Main(string[] args) + public static void MainArgs(string[] args) { // try to parse the command line arguments, show usage on failure and then bail var parsed = ArgumentParser.Parse(args); @@ -119,5 +119,27 @@ public static void Main(string[] args) MainExecute(commandName, parsed.Arguments); } } + + public static void Main(string[] args) + { + if (args.Length > 0 && args[0] != "") + { + MainArgs(args); + } + else + { + string command; + do + { + Console.Write("Rubeus # "); + command = Console.ReadLine(); + if (command != "" && command != "exit") + { + args = command.Split(); + MainArgs(args); + } + } while (command != "exit"); + } + } } }