I assume it uses cookies so i tried importing those, not sure if that's right, i've messed quite a bit with it but it still says im not logged in. At times i do see my username in the source, not logged in, but i do see it and other times i don't.
Here's a super basic part of my code and hopefully one of you can find a mistake i may be making? programatically or with the way HTS logs in.
- Code: Select all
CookieContainer cooks = new CookieContainer;
HttpWebRequest webR = (HttpWebRequest)WebRequest.Create("http://www.hackthissite.org/missions/prog/2");
webR.CookieContainer = cooks;
webR.Method = "Post";
// tried both get and post methods.
HttpWebResponse webRs = (HttpWebResponse) webR.GetResponse();
System.IO.StreamReader str = new System.IO.StreamReader( webRs.GetResponseStream());
and dont comment about my naming conventions, i know i just wanted something quick to show :p




