Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imports System.IO
- Imports System.Net
- Imports System.Text.RegularExpressions
- Imports System.Threading
- Imports OpenQA.Selenium
- Imports OpenQA.Selenium.Chrome
- Imports SMM_CONTROLS.iTalk
- Public Class ManagePage
- Private drv1 As ChromeDriver
- Private chromeOptions As ChromeOptions
- Dim C As Integer = 0
- Private Sub GroupBox2_Enter(sender As Object, e As EventArgs)
- End Sub
- Private Sub ListView1_SelectedIndexChanged(sender As Object, e As EventArgs)
- End Sub
- Dim JustLog As System.Threading.Thread
- Private Sub BunifuThinButton22_Click(sender As Object, e As EventArgs)
- End Sub
- Private Sub Button1_Click(sender As Object, e As EventArgs)
- 'ListBox2.Items.Add(ListBox1.Text)
- 'ListBox1.Items.Clear()
- End Sub
- Private Sub BunifuThinButton25_Click_1(sender As Object, e As EventArgs) Handles BunifuThinButton25.Click
- Try
- Dim chromeDriverService As ChromeDriverService = ChromeDriverService.CreateDefaultService()
- Me.chromeOptions = New ChromeOptions()
- chromeDriverService.HideCommandPromptWindow = True
- Control.CheckForIllegalCrossThreadCalls = False
- ServicePointManager.DefaultConnectionLimit = Integer.MaxValue
- Dim drv As ChromeDriver = New ChromeDriver(chromeDriverService, chromeOptions)
- drv1 = drv
- drv1.Navigate().GoToUrl("https://mbasic.facebook.com/")
- login()
- Catch ex As Exception
- End Try
- End Sub
- Private Sub login()
- Try
- drv1.FindElement(By.Id("m_login_email")).SendKeys(Email.Text)
- drv1.FindElement(By.Name("pass")).SendKeys(Pass.Text)
- drv1.FindElement(By.Name("login")).Click()
- Catch ex As Exception
- End Try
- End Sub
- Private Sub send()
- End Sub
- Private Sub BunifuThinButton26_Click(sender As Object, e As EventArgs) Handles BunifuThinButton26.Click
- ListBox2.Items.Clear()
- Dim openfile = New OpenFileDialog()
- openfile.Filter = "Text (*.txt)|*.txt"
- If (openfile.ShowDialog() = System.Windows.Forms.DialogResult.OK) Then
- Dim myfile As String = openfile.FileName
- Dim allLines As String() = File.ReadAllLines(myfile)
- For Each line As String In allLines
- ListBox2.Items.Add(line)
- Next
- End If
- Label6.Text = "Numbers Of Ids" + ListBox2.Text.Count.ToString()
- End Sub
- Private Sub BunifuThinButton24_Click(sender As Object, e As EventArgs) Handles BunifuThinButton24.Click
- Dim s As SaveFileDialog = New SaveFileDialog()
- s.Title = "Save Members"
- s.FileName = "Page IDs"
- s.Filter = "Text files (*.txt)|*.txt"
- If s.ShowDialog() = DialogResult.OK Then
- For i = 0 To ListBox1.Items.Count - 1
- ListBox1.SelectedItem = ListBox1.Items(i)
- Dim tw As TextWriter = New StreamWriter(s.FileName, True)
- tw.WriteLine(ListBox1.SelectedItems)
- tw.Close()
- Next
- ListBox1.Items.Clear()
- End If
- End Sub
- Private Sub PictureBox2_Click(sender As Object, e As EventArgs) Handles PictureBox2.Click
- TextBox1.Text += "<3"
- End Sub
- Private Sub BunifuThinButton22_Click_1(sender As Object, e As EventArgs) Handles BunifuThinButton22.Click
- ListBox1.Items.Clear()
- Dim WebClinet1 As New Net.WebClient()
- WebClinet1.Encoding = System.Text.Encoding.UTF8
- Dim Content As String = Regex.Unescape(WebClinet1.DownloadString("https://graph.facebook.com/v5.0/" + Page_ID.Text + "/conversations?access_token=" + Page_access.Text + "&debug=all&fields=id&format=json&limit=" + limit.Text + "&method=get&pretty=0&suppress_http_code=1&transport=cors"))
- Dim StrArray() As String = Regex.Split(Content, "{")
- For i As Integer = 1 To StrArray.Length - 1
- Dim FirstCol2 As String = Regex.Match(StrArray(i), """id"":""t_(.+?)""").Groups(1).Value
- ListBox1.Items.Add(FirstCol2)
- Next
- End Sub
- Sub listingarea()
- End Sub
- Private Sub BunifuThinButton27_Click(sender As Object, e As EventArgs) Handles BunifuThinButton27.Click
- drv1.Navigate().GoToUrl("https://www.facebook.com/OF.Hamsa/inbox/?mailbox_id=1684949355067687&selected_item_id=" + ListBox2.Text)
- C += 1
- ListBox2.SelectedItem = ListBox2.Items(C - 1)
- Timer1.Start()
- End Sub
- Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
- Try
- Thread.Sleep(2000)
- drv1.FindElement(By.CssSelector("textarea[class='_1p7p _5id1 _4dv_ _58al uiTextareaAutogrow']")).SendKeys(TextBox1.Text + Keys.Enter)
- Thread.Sleep(2000)
- 'Thread.Sleep(TextBox8.Text * 1000)
- Timer1.Stop()
- Timer2.Start()
- Catch ex As Exception
- MsgBox(ex.Message)
- End Try
- End Sub
- Private Sub Timer2_Tick(sender As Object, e As EventArgs) Handles Timer2.Tick
- drv1.Navigate().GoToUrl("https://www.facebook.com/OF.Hamsa/inbox/?mailbox_id=1684949355067687&selected_item_id=" + ListBox2.Text)
- C += 1
- ListBox2.SelectedItem = ListBox2.Items(C - 1)
- Timer2.Stop()
- Timer1.Start()
- End Sub
- Sub DisposeTimer()
- Timer1.Stop()
- Timer2.Stop()
- End Sub
- Private Sub BunifuThinButton28_Click(sender As Object, e As EventArgs) Handles BunifuThinButton28.Click
- DisposeTimer()
- End Sub
- Private Sub BunifuThinButton23_Click_1(sender As Object, e As EventArgs) Handles BunifuThinButton23.Click
- Dim WebClinet1 As New Net.WebClient()
- WebClinet1.Encoding = System.Text.Encoding.UTF8
- Dim Content As String = Regex.Unescape(WebClinet1.DownloadString("https://graph.facebook.com/" + PageID.Text + "?fields=access_token&access_token=" + Token.Text + ""))
- Dim StrArray() As String = Regex.Split(Content, "{")
- For i As Integer = 1 To StrArray.Length - 1
- Dim FirstCol As String = Regex.Match(StrArray(i), "access_token"":""(.+?)""").Groups(1).Value
- ITalk_RichTextBox1.Text = "Token : " + FirstCol
- Next
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement