Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim request1 As New HttpRequest()
- request1.Cookies = New CookieDictionary()
- request1.UserAgent = Http.FirefoxUserAgent
- request1.Get("https://accounts.spotify.com/en-US/login?continue=https:%2F%2Fwww.spotify.com%2Fus%2Faccount%2Foverview%2F")
- Dim token As String = request1.Cookies.ToString
- Dim csrf As String = Regex.Match(token, "csrf_token=(\S+)").Groups(1).ToString
- Try
- request1.Cookies = request1.Cookies
- request1.UserAgent = request1.UserAgent
- request1.Referer = "https://accounts.spotify.com/en-US/login?continue=https:%2F%2Fwww.spotify.com%2Fus%2Faccount%2Foverview%2F"
- request1.AddHeader("Cookie", "csrf_token=" + csrf + "; __bon=MHwwfDQ1MzY4Nzk4M3wxOTA1NDg5NTI4NnwxfDF8MXwx; fb_continue=https%3A%2F%2Fwww.spotify.com%2Fus%2Faccount%2Foverview%2F; remember=" + TextBox1.Text)
- request1.AddParam("remember", "true")
- request1.AddParam("username", "vincent.vega301195@gmail.com")
- request1.AddParam("password", "Vincent3011")
- request1.AddParam("captcha_token", "")
- request1.AddParam("csrf_token", csrf)
- Dim response1 As String = request1.Post("https://accounts.spotify.com/api/login").ToString
- Dim hhhhh As String = request1.Get("https://www.spotify.com/us/account/overview/").ToString()
- Dim match As System.Text.RegularExpressions.Match = (New Regex("""plan"":{""title"":""Your plan"",""plan"":{""name"":""([^""]*)")).Match(hhhhh)
- Dim match1 As System.Text.RegularExpressions.Match = (New Regex("{""label"":""Country"",""value"":""([^""]*)")).Match(hhhhh)
- RichTextBox1.Text = response1
- RichTextBox1.Text = match.Groups(1).Value + ": Country is : " + match1.Groups(1).Value
- If response1.Contains("displayName") Then
- MsgBox("Succesfully logged In!")
- End If
- Catch ex As Exception
- Dim res As HttpResponse = request1.Response
- Dim geterror As String = res.ToString
- RichTextBox1.Text += geterror
- If geterror.Contains("errorInvalidCredentials") Then
- MsgBox("Invalid Credentials")
- End If
- End Try
Add Comment
Please, Sign In to add comment