Also ich habe mich mal an einen kleinen Register-bot probiert, jedoch bekomm ich zum verrecken es nicht hin, dass die Formular Daten hochgeladen werden, da ich als antwort immer nur bekomme das sämtliche Felder leer wären.
Hiermit poste ich:
und zwar
Selbstverständlich lasse ich noch die Felder entsprechend ersetzen. Das ganze ist exact das was nach livehttpheaders gesendet wird...
Gesendet wird dann zb:
Also vllt kann mir ja jemand helfen.
Schonmal danke im vorraus,
MfG
Hiermit poste ich:
Code:
Public Function WebRPOST(ByVal sUrl As String, ByVal sPost As String, Optional ByRef cookies As CookieContainer = Nothing) As String
Dim nRequest As HttpWebRequest = CType(WebRequest.Create(sUrl), HttpWebRequest)
nRequest.Method = "POST"
nRequest.ContentType = "multipart/form-data; boundary=-----------------------------"
nRequest.UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20100101 Firefox/8.0"
nRequest.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
nRequest.KeepAlive = True
If cookies.ToString <> Nothing Then
nRequest.CookieContainer = cookies
End If
MsgBox(sPost)
Dim nbyteArray() As Byte = Encoding.UTF8.GetBytes(sPost)
nRequest.ContentLength = nbyteArray.Length
Dim nDataStream As Stream = nRequest.GetRequestStream()
nDataStream.Write(nbyteArray, 0, nbyteArray.Length)
nDataStream.Close()
Dim nResponse As HttpWebResponse = nRequest.GetResponse()
nDataStream = nResponse.GetResponseStream()
Dim nreader As New StreamReader(nDataStream)
Dim nServerResponse As String = nreader.ReadToEnd()
nreader.Close()
nDataStream.Close()
nResponse.Close()
Return nServerResponse
End Function
Code:
inhalt = "-----------------------------IdHere" & vbCrLf & "Content-Disposition: form-data; name=" & """" & "user[username]" & """" & "" & vbCrLf & "" & vbCrLf & "NameHere" & vbCrLf & "-----------------------------IdHere" & vbCrLf & "Content-Disposition: form-data; name=" & """" & "user[firstname]" & """" & "" & vbCrLf & "" & vbCrLf & "FirstNameHere" & vbCrLf & "-----------------------------IdHere" & vbCrLf & "Content-Disposition: form-data; name=" & """" & "user[lastname]" & """" & "" & vbCrLf & "" & vbCrLf & "LastNameHere" & vbCrLf & "-----------------------------IdHere" & vbCrLf & "Content-Disposition: form-data; name=" & """" & "user[email]" & """" & "" & vbCrLf & "" & vbCrLf & "EmailHere1" & vbCrLf & "-----------------------------IdHere" & vbCrLf & "Content-Disposition: form-data; name=" & """" & "user[email_repeat]" & """" & "" & vbCrLf & "" & vbCrLf & "EmailHere2" & vbCrLf & "-----------------------------IdHere" & vbCrLf & "Content-Disposition: form-data; name=" & """" & "user[password]" & """" & "" & vbCrLf & "" & vbCrLf & "PwHere1" & vbCrLf & "-----------------------------IdHere" & vbCrLf & "Content-Disposition: form-data; name=" & """" & "user[password_repeat]" & """" & "" & vbCrLf & "" & vbCrLf & "PwHere2" & vbCrLf & "-----------------------------IdHere" & vbCrLf & "Content-Disposition: form-data; name=" & """" & "user[culture]" & """" & "" & vbCrLf & "" & vbCrLf & "de" & vbCrLf & "-----------------------------IdHere" & vbCrLf & "Content-Disposition: form-data; name=" & """" & "user[dob]" & """" & "" & vbCrLf & "" & vbCrLf & "DateHere" & vbCrLf & "-----------------------------IdHere" & vbCrLf & "Content-Disposition: form-data; name=" & """" & "user[gender]" & """" & "" & vbCrLf & "" & vbCrLf & "GenderHere" & vbCrLf & "-----------------------------IdHere" & vbCrLf & "Content-Disposition: form-data; name=" & """" & "user[upload_image]" & """" & "; filename=" & """" & "" & """" & "" & vbCrLf & "Content-Type: application/octet-stream" & vbCrLf & "" & vbCrLf & "" & vbCrLf & "-----------------------------IdHere" & vbCrLf & "Content-Disposition: form-data; name=" & """" & "user[agreement]" & """" & "" & vbCrLf & "" & vbCrLf & "on" & vbCrLf & "-----------------------------IdHere" & vbCrLf & "Content-Disposition: form-data; name=" & """" & "recaptcha_challenge_field" & """" & "" & vbCrLf & "" & vbCrLf & "ChallengeHere" & vbCrLf & "-----------------------------IdHere" & vbCrLf & "Content-Disposition: form-data; name=" & """" & "recaptcha_response_field" & """" & "" & vbCrLf & "" & vbCrLf & "RespondeHere" & vbCrLf & "-----------------------------IdHere--"
Gesendet wird dann zb:
Code:
----------------------------- Content-Disposition: form-data; name="user[username]" trololol ----------------------------- Content-Disposition: form-data; name="user[firstname]" Firsttrololol ----------------------------- Content-Disposition: form-data; name="user[lastname]" Lasttrololol ----------------------------- Content-Disposition: form-data; name="user[email]" [Only registered and activated users can see links. Click Here To Register...] ----------------------------- Content-Disposition: form-data; name="user[email_repeat]" [Only registered and activated users can see links. Click Here To Register...] ----------------------------- Content-Disposition: form-data; name="user[password]" helloworld ----------------------------- Content-Disposition: form-data; name="user[password_repeat]" helloworld ----------------------------- Content-Disposition: form-data; name="user[culture]" de ----------------------------- Content-Disposition: form-data; name="user[dob]" 10.10.1910 ----------------------------- Content-Disposition: form-data; name="user[gender]" M ----------------------------- Content-Disposition: form-data; name="user[upload_image]"; filename="" Content-Type: application/octet-stream ----------------------------- Content-Disposition: form-data; name="user[agreement]" on ----------------------------- Content-Disposition: form-data; name="recaptcha_challenge_field" 03AHJ_VutgGaUHgnX9fhnoKKmc3euxA2FZLi80GFJ9TBBEjZmYoltr57lmDE4Lsieim5YamxVtx0ucmp1s0YzdD67B_ff6w9in5tx5h_my-dsGQHy4bjhUw-9gdDrK6_58WunlA1U8_EIIQCC9WmPLYiK1sOlXUl_kJ5YT8LWPt8GQnBqolWMSzKk ----------------------------- Content-Disposition: form-data; name="recaptcha_response_field" comparative stsMHaf -------------------------------
Schonmal danke im vorraus,
MfG