Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //login زر
- Dim html As String
- Dim web As WebClient = New WebClient
- web = New WebClient
- web.Headers("User-Agent") = "Googlebot/2.1"
- html = web.DownloadString("http://www.313team.biz/ip.php")
- Dim ipfromurl As String = html
- ' Dim hwid As String = getHWID()
- cookie()
- h = log("https://www.instagram.com/accounts/login/?force_classic_login", "csrfmiddlewaretoken=" & TextBox6.Text & "&username=" & TextBox1.Text & "&password=" & TextBox2.Text, "https://www.instagram.com/accounts/login/?force_classic_login")
- Public Sub cookie()
- Dim postData As String = ""
- Dim tempCookies As New CookieContainer
- Dim encoding As New ASCIIEncoding
- Dim byteData As Byte() = encoding.GetBytes(postData)
- Dim postReq As HttpWebRequest = DirectCast(WebRequest.Create("https://www.instagram.com/accounts/login/?force_classic_login"), HttpWebRequest)
- postReq.CookieContainer = tempCookies
- Dim postresponse As HttpWebResponse
- postresponse = DirectCast(postReq.GetResponse(), HttpWebResponse)
- tempCookies.Add(postresponse.Cookies)
- cokkie = tempCookies
- Dim postreqreader As New StreamReader(postresponse.GetResponseStream())
- Dim thepage As String = postreqreader.ReadToEnd
- TextBox6.Text = cokkie.ToString
- Dim regx As New Regex("name=""csrfmiddlewaretoken"" value=""(.*?)""/>", RegexOptions.IgnoreCase)
- Dim mactches As MatchCollection = regx.Matches(thepage)
- For Each match As Match In mactches
- TextBox6.Text = match.Value
- TextBox6.Text = TextBox6.Text.Replace("name=""csrfmiddlewaretoken"" value=""", "")
- TextBox6.Text = TextBox6.Text.Replace("""/>", "")
- tok = TextBox6.Text
- Next
- End Sub
- Public Function log(ByVal url As String, ByVal post As String, ByVal referer As String) As String
- Dim encoding As New ASCIIEncoding
- Dim byteData As Byte() = encoding.GetBytes(post)
- postReq = DirectCast(WebRequest.Create(url), HttpWebRequest)
- postReq.Method = "POST"
- postReq.KeepAlive = True
- postReq.CookieContainer = cokkie
- postReq.ContentType = "application/x-www-form-urlencoded"
- postReq.Referer = referer
- postReq.UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0"
- postReq.ContentLength = byteData.Length
- Dim postreqstream As Stream = postReq.GetRequestStream()
- postreqstream.Write(byteData, 0, byteData.Length)
- postreqstream.Close()
- postresponse = DirectCast(postReq.GetResponse(), HttpWebResponse)
- Dim postreqreader As New StreamReader(postresponse.GetResponseStream())
- Dim thepage As String = postreqreader.ReadToEnd
- If thepage.Contains("profile_pic_url") = True Then
- MsgBox("successful login", MsgBoxStyle.Information)
- GroupBox2.Enabled = True
- GroupBox3.Enabled = True
- GroupBox4.Enabled = True
- GroupBox1.Enabled = False
- Else
- MsgBox("يوجد خطا بتسجيل الدخول تاكد من اسم المستخدم وكلمة المرور" & vbCrLf & "تاكد ان كلمة المرور لا تحتوي على رموز", MsgBoxStyle.Critical)
- End If
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement