![]() |
|
[C#] [Solved] Automatically login to website and get cookie - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [C#] [Solved] Automatically login to website and get cookie (/showthread.php?tid=5795931) |
[Solved] Automatically login to website and get cookie - SIM-989994 - Feb 6, 2018 I'm trying to automatically login at archive.org to get the main cookie "logged-in-sig" and "logged-in-user". Through Postman I've been configurated a POST call to the account/login.php page with the parameters "username: [email protected]", "password: password" and "action: login", it works and I get the cookie that interest me. The real problem is when I try to do the same on C# code. RestSharp generated with Postman Code var client = new RestClient("https://archive.org/account/login.php");So, how is possible automatically login at archive.org to get "logged-in-sig" and "logged-in-user" cookie? Thanks ------- UPDATE Solved adding request.AddCookie("test-cookie", "1"); Probably a site security check Thread can be close RE: [Solved] Automatically login to website and get cookie - Ninja - Feb 7, 2018 Even though you solved it already, allow me to give you some advice; usually, the first thing you want to do if your request is not working, is run a local proxy like Fiddler to sniff the requests. Compare the request made by your program with the actual request, and if the request from your program is any different then fix that difference immediately. Because in the end, all it is is a string that is sent to the server. |