Code:
CookieContainer cookieContainer = new CookieContainer();
HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create("https://www.habbo.de");
myRequest.Method = "GET";
myRequest.CookieContainer = cookieContainer;
// myRequest.Proxy = new WebProxy(myProxy);
myRequest.KeepAlive = true;
myRequest.ServicePoint.Expect100Continue = false;
myRequest.UserAgent = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:21.0) Gecko/20130109 Firefox/21.0";
myRequest.ContentType = "application/x-www-form-urlencoded";
HttpWebResponse myRes = (HttpWebResponse)myRequest.GetResponse();
string Post = "credentials.username=e-mail&credentials.password=Passwort"; ASCIIEncoding encoding = new ASCIIEncoding();
byte[] data = encoding.GetBytes(Post);
myRequest = (HttpWebRequest)WebRequest.Create("https://www.habbo.de/account/submit");
myRequest.Method = "POST";
myRequest.CookieContainer = cookieContainer;
myRequest.ServicePoint.Expect100Continue = false;
myRequest.KeepAlive = true;
myRequest.UserAgent = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:21.0) Gecko/20130109 Firefox/21.0";
myRequest.ContentType = "application/x-www-form-urlencoded";
myRequest.ContentLength = data.Length;
Stream newStream = myRequest.GetRequestStream();
newStream.Write(data, 0, data.Length);
newStream.Close();
myRequest = (HttpWebRequest)WebRequest.Create("http://www.habbo.de/me");
myRequest.Method = "GET";
myRequest.CookieContainer = cookieContainer;
myRequest.KeepAlive = true;
myRequest.ServicePoint.Expect100Continue = false;
myRequest.UserAgent = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:21.0) Gecko/20130109 Firefox/21.0";
myRequest.ContentType = "application/x-www-form-urlencoded";
myRes = (HttpWebResponse)myRequest.GetResponse();
StreamReader srprüfen = new StreamReader(myRes.GetResponseStream());
string Html = srprüfen.ReadToEnd();
richTextBox1.Text = Html;
if (Html.Contains("Ausloggen"))
{
MessageBox.Show("JA");
}
else
{
MessageBox.Show("Nein");
}
was fehlt?
Also ich kommr zwar auf die Seite aber ich bin nicht eingelogt
Was fehlt denn eigentlich ich finde einfach keine fehler
Danke schon mal






