[vb]
Imports System.Net
Imports System.IO
Public Class Form1
Dim CookieCon As New CookieContainer
Private Function GetSourceCode(ByVal url As String, ByVal bCookie As Boolean) As String
Dim req As HttpWebRequest = CType(WebRequest.Create(url), HttpWebRequest)
req.Method = "GET"
req.ContentType = "application/x-www-form-urlencoded"
req.UserAgent = "Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.7) Gecko/20070914 Firefox/2.0.0.7"
req.Referer = "http://google.com"
If bCookie Then
req.CookieContainer = CookieCon
End If
Dim res As HttpWebResponse = CType(req.GetResponse, HttpWebResponse)
Dim str As New StreamReader(res.GetResponseStream)
Return str.ReadToEnd()
End Function
Private Function solo_rapidshare(ByVal sUser As String, ByVal sPass As String)
Dim sSource As String = GetSourceCode("https://api.rapidshare.com/cgi-bin/rsapi.cgi?sub=getaccountdetails&login=" & sUser & "&password=" & sPass & "&withcookie=1&cbid=1&cbf=rsapi.system.jsonp.callback", False)
If sSource.Contains("email") Then
Return True
Else
Return False
End If
End Function
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If TextBox1.Text = "" Then
MsgBox("Please fill in a Username")
Exit Sub
ElseIf TextBox2.Text = "" Then
MsgBox("Please fill in a Password")
Exit Sub
End If
If solo_rapidshare(TextBox1.Text, TextBox2.Text) Then
Label3.Text = "Valid"
Label3.ForeColor = Color.LightGreen
Else
Label3.Text = "Invalid"
Label3.ForeColor = Color.Red
End If
End Sub
End Class
[/vb]
Ein Kommentar
¥akuza112
Credits gehen wohl an Becks