Hi liebe Gemeinde,
ich verzweifel solange . Ich habe eine ein LOGIN für mein EMAIL ACCOUNT erstellt. Leider komme ich jedoch nicht rein . !!!
könnt ihr vielleicht mal darübergucken.
DES WEITEREN weiß ich nicht was ich bei der Überprüfung des LOGIN eingeben soll
hier der CODE:
Hier die ausgelesenen DATEN aus der EMAIL SEITE:
mail.domainwtf.com/webmail/login/dologin
POST /webmail/login/dologin HTTP/1.1
Host: mail.domainwtf.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: de,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded
Content-Length: 67
Referer: mail.domainwtf.com/webmail/login/
Connection: keep-alive
Upgrade-Insecure-Requests: 1
kerio_username=xxxx@xxx.de&kerio_password=XXXXXX: undefined
HTTP/1.1 302 Found
Connection: Keep-Alive
Content-Type: application/octet-stream
Date: Fri, 5 May 2017 09:26:01 GMT
Keep-Alive: timeout=15, max=99
Location: mail.domainwtf.com/webmail/
Server: WebServer
Transfer-Encoding: chunked
x-frame-options: SAMEORIGIN
x-ua-compatible: IE=edge
Set-Cookie: SESSION_CONNECT_WEBMAIL=1ac536e597c94bfec0b8af4dd7d98ae9683de639b38b1e24a339f37aa68ab69e; path=/; HttpOnly
Set-Cookie: TOKEN_CONNECT_WEBMAIL=123f28a72a5e4067b921412a7eae61b7fe103d7a200f62ace97954c91622da2d; path=/
Tausend Ausrufezeichen aus dem Titel entfernt. ~Trade
ich verzweifel solange . Ich habe eine ein LOGIN für mein EMAIL ACCOUNT erstellt. Leider komme ich jedoch nicht rein . !!!
könnt ihr vielleicht mal darübergucken.
DES WEITEREN weiß ich nicht was ich bei der Überprüfung des LOGIN eingeben soll
hier der CODE:
Visual Basic-Quellcode
- Imports System.IO, System.Net, System.Text
- Public Class Form1
- 'holds the cookies to keep you logged in
- Dim mainCookie As New CookieContainer
- Private Sub btnLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLogin.Click
- 'taken from Live HTTP headers. This is the data
- 'that gets sent when logging in.
- Dim postData As String = "&kerio_username=" & txtUser.Text & "&kerio_password=" & txtPass.Text & "&submit=Login-button"
- 'when POSTing data, it needs to be in byte format.
- Dim bytes() As Byte = ASCIIEncoding.UTF8.GetBytes(postData)
- 'this is the page we are loggin into
- Dim postReq As HttpWebRequest = WebRequest.Create("http://mail.domainwtf.com/webmail/login/dologin")
- 'it's a POST request, not GET
- postReq.Method = "POST"
- postReq.KeepAlive = True
- 'holds our cookies
- postReq.CookieContainer = mainCookie
- 'comes from Live HTTP Headers, most likely the same for any request
- postReq.ContentType = "application/x-www-form-urlencoded"
- 'from Live HTTP Heasers, some sites require the correct referer
- postReq.Referer = "http://mail.domainwtf.com/webmail/login/"
- 'standard
- postReq.UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0 ( .NET CLR 3.5.30729; .NET4.0E)"
- 'length of our post data
- postReq.ContentLength = bytes.Length
- 'gets the stream to send data on
- Dim postStream As Stream = postReq.GetRequestStream()
- 'send the data
- postStream.Write(bytes, 0, bytes.Length)
- 'close the stream
- postStream.Close()
- 'get the response from the website
- Dim postResponse As HttpWebResponse
- postResponse = postReq.GetResponse()
- 'add the login cookies
- mainCookie.Add(postResponse.Cookies)
- 'reads the response
- Dim reader As New StreamReader(postResponse.GetResponseStream())
- 'puts the response into a string
- Dim strSource As String = reader.ReadToEnd
- 'if it says Welcome back then it worked
- If strSource.Contains("<title>webmail") Then
- MessageBox.Show("Login Successful")
- Else
- MessageBox.Show("Login Failed")
- End If
- End Sub
- End Class
Hier die ausgelesenen DATEN aus der EMAIL SEITE:
mail.domainwtf.com/webmail/login/dologin
POST /webmail/login/dologin HTTP/1.1
Host: mail.domainwtf.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: de,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded
Content-Length: 67
Referer: mail.domainwtf.com/webmail/login/
Connection: keep-alive
Upgrade-Insecure-Requests: 1
kerio_username=xxxx@xxx.de&kerio_password=XXXXXX: undefined
HTTP/1.1 302 Found
Connection: Keep-Alive
Content-Type: application/octet-stream
Date: Fri, 5 May 2017 09:26:01 GMT
Keep-Alive: timeout=15, max=99
Location: mail.domainwtf.com/webmail/
Server: WebServer
Transfer-Encoding: chunked
x-frame-options: SAMEORIGIN
x-ua-compatible: IE=edge
Set-Cookie: SESSION_CONNECT_WEBMAIL=1ac536e597c94bfec0b8af4dd7d98ae9683de639b38b1e24a339f37aa68ab69e; path=/; HttpOnly
Set-Cookie: TOKEN_CONNECT_WEBMAIL=123f28a72a5e4067b921412a7eae61b7fe103d7a200f62ace97954c91622da2d; path=/
Tausend Ausrufezeichen aus dem Titel entfernt. ~Trade
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von „Trade“ ()