Navigation X
ALERT
Click here to register with a few steps and explore all our cool stuff we have to offer!



   1165

C# Help To Parse Cookie

by CrackerShadow - 20 May, 2021 - 05:35 PM
This post is by a banned member (CrackerShadow) - Unhide
34
Posts
9
Threads
4 Years of service
#1
(This post was last modified: 20 May, 2021 - 05:42 PM by CrackerShadow.)
Code:
httpRequest.UserAgent = "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko";
                            httpRequest.IgnoreProtocolErrors = true;
                            httpRequest.ConnectTimeout = 10000;
                            httpRequest.SslCertificateValidatorCallback = (RemoteCertificateValidationCallback)Delegate.Combine(httpRequest.SslCertificateValidatorCallback,
                            new RemoteCertificateValidationCallback((object obj, X509Certificate cert, X509Chain ssl, SslPolicyErrors error) => (cert as X509Certificate2).Verify()));
                            string text2 = httpRequest.Get("https://profile.callofduty.com/cod/login").ToString();
                            Console.WriteLine(text2);
                            //Console.ReadLine();
                            string csrf = Parse(text2, "<meta name=\"_csrf\" content=\"", "\" /> ");
                            httpRequest.AddHeader("Host", "profile.callofduty.com");
                            httpRequest.AddHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8Accept - Language: en - US, en; q = 0.5");
                            httpRequest.AddHeader("Accept-Encoding", "gzip, deflate, br");
                            httpRequest.AddHeader("Origin", "https://profile.callofduty.com");
                            httpRequest.AddHeader("Referer", "https://profile.callofduty.com/cod/login");
                            //httpRequest.AddHeader("", "");
                            CookieStorage cookies = new CookieStorage();
                            httpRequest.Cookies = cookies;
                            httpRequest.UseCookies = true;
                            httpRequest.AllowEmptyHeaderValues = true;
                            httpRequest.KeepAlive = true;
                            /*Console.WriteLine("---------------------------------------------------------------------------------------------");
                            HttpResponse httpResponse = httpRequest.Post("https://profile.callofduty.com/do_login?new_SiteId=cod", "username=" + strArray[0] + "&remember_me=true&password=" + strArray[1] + "&_csrf=" + csrf, "application/x-www-form-urlencoded");
                            Console.WriteLine(httpResponse);
                            Console.WriteLine(httpResponse["COOKIES(ACT_SSO_COOKIE"]);
                            Console.WriteLine("---------------------------------------------------------------------------------------------");
                            */
                            string text3 = httpRequest.Post("https://profile.callofduty.com/do_login?new_SiteId=cod", "username="+strArray[0]+"&remember_me=true&password="+strArray[1]+"&_csrf="+csrf, "application/x-www-form-urlencoded").ToString();
                            bool check1 = text3.Contains("https://www.callofduty.com/") || text3.Contains("YOUR PROFILE IS MISSING REQUIRED INFORMATION") || text3.Contains("Skip For Now</a></p>");
                            bool check2 = text3.Contains("You have entered an invalid email / password combination.");




this is my code i want to parse SSO_Cookie after posting user,pass
how can i parse that cookie
This post is by a banned member (CrackerShadow) - Unhide
34
Posts
9
Threads
4 Years of service
#2
This is a bump

[Image: Banner.gif]
This post is by a banned member (SirTharwaT) - Unhide
184
Posts
36
Threads
6 Years of service
#3
u can try var parsecook = httpRequest.response.cookies["NAMECOOKIES"];

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
or
Sign in
Already have an account? Sign in here.


Forum Jump:


Users browsing this thread: 1 Guest(s)