Hôm nay mình xin chia sẽ những đoạn code mà mình hồi xưa đã dùng để viết ra ừng dụng FACEBOOK SPAM WALL cho mọi người :). Bên dưới là đoạn code
Imports System.Net
Imports Microsoft.VisualBasic.ApplicationServices
Imports System.Text.RegularExpressions
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
WebBrowser1.Navigate("http://m.facebook.com/")
' kiểm tra kết nối
If NetworkInformation.NetworkInterface.GetIsNetworkAvailable Then
ToolStripStatusLabel8.Text = "Connecting" & Space(1) & "IP Adress :" & System.Net.Dns.GetHostEntry(System.Net.Dns.GetHostName).AddressList.GetValue(0).ToString
Else
ToolStripStatusLabel8.Text = "Disconecting!"
End If
If WindowState = FormWindowState.Minimized Then
Me.Hide()
End If
End Sub
Private Sub WebBrowser1_ProgressChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserProgressChangedEventArgs)
ProgressBar1.Maximum = e.MaximumProgress
If e.CurrentProgress > ProgressBar1.Maximum Then
ProgressBar1.Value = ProgressBar1.Maximum
ElseIf e.CurrentProgress < ProgressBar1.Minimum Then
ProgressBar1.Value = ProgressBar1.Minimum
Else
ProgressBar1.Value = e.CurrentProgress
End If
End Sub
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
ToolStripStatusLabel9.Text = ToolStripStatusLabel9.Text + 1
If WebBrowser1.ReadyState = WebBrowserReadyState.Complete Then
End If
' hàm Send từ textbox1 lên text của facebook
Dim htmlElements As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("textarea")
For Each el As HtmlElement In htmlElements
If el.GetAttribute("name").Equals("xhpc_message") Then
End If
el.SetAttribute("Value", TextBox1.Text)
Dim allelements1 As HtmlElementCollection = WebBrowser1.Document.All
For Each webpageelement As HtmlElement In allelements1
If webpageelement.GetAttribute("value") = "Chia sẻ" Then
webpageelement.InvokeMember("click")
End If
Next
Next
Dim allelements As HtmlElementCollection = WebBrowser1.Document.All
' button đăng
For Each webpageelement As HtmlElement In allelements
If webpageelement.GetAttribute("value") = "Đăng" Then
webpageelement.InvokeMember("click")
End If
Next
'button bình luận
Dim binhluan As HtmlElementCollection = WebBrowser1.Document.All
For Each webpageelement As HtmlElement In binhluan
If webpageelement.GetAttribute("value") = "Bình luận" Then
webpageelement.InvokeMember("click")
End If
Next
' button Post ( English US)
Dim EnglishUS As HtmlElementCollection = WebBrowser1.Document.All
For Each webpageelement As HtmlElement In EnglishUS
If webpageelement.GetAttribute("value") = "Post" Then
webpageelement.InvokeMember("click")
End If
Next
' button Share(chia sẻ) ( English US)
Dim EnglishUSs As HtmlElementCollection = WebBrowser1.Document.All
For Each webpageelement As HtmlElement In EnglishUSs
If webpageelement.GetAttribute("value") = "Share" Then
webpageelement.InvokeMember("click")
End If
Next
End Sub
Private Sub ToolStripSplitButton1_ButtonClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripSplitButton1.ButtonClick
End Sub
Private Sub SpamToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SpamToolStripMenuItem.Click
ToolStripStatusLabel1.Text = "START" & Space(1) & ":"
Timer2.Start()
End Sub
Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click
End
End Sub
Private Sub AuthorToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AuthorToolStripMenuItem.Click
MsgBox("Bờm Khùng Blogger" & vbCrLf & "Spam FaceBook V1.0" & vbCrLf & "Có Hỗ Trợ Unikey 4.0" & vbCrLf & "Email: admin@bomkhung.info or bom.lanhlung@gmail.com")
End Sub
Private Sub FacebookMeToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FacebookMeToolStripMenuItem.Click
Process.Start("http://facebook.com/bomkhungblog")
End Sub
Private Sub StopToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StopToolStripMenuItem.Click
ToolStripStatusLabel1.Text = "STOP" & Space(1) & ":"
ToolStripStatusLabel9.Text = "0"
Timer2.Stop()
End Sub
Private Sub LoadVitiminToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LoadVitiminToolStripMenuItem.Click
WebBrowser1.Navigate(TextBox2.Text)
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
'giờ
ToolStripStatusLabel3.Text = TimeOfDay
End Sub
Private Sub Timer3_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer3.Tick
' ngày tháng năm
Me.ToolStripStatusLabel5.Text = Format(Me.DateTimePicker1.Value, "dd/MM/yyyy")
End Sub
Private Sub SpamTokenToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SpamTokenToolStripMenuItem.Click
Timer2.Start()
End Sub
Private Sub DừngSpamTokenToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DừngSpamTokenToolStripMenuItem.Click
Timer2.Stop()
End Sub
Private Sub LikeToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LikeToolStripMenuItem.Click
'Button thích ( chưa hoạt động )
Dim s As HtmlElementCollection = WebBrowser1.Document.All
For Each webpageelement As HtmlElement In s
If webpageelement.GetAttribute("value") = "Thích" Then
webpageelement.InvokeMember("click")
End If
Next
End Sub
Private Sub Timer5_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer5.Tick
ProgressBar2.Increment(1)
If ProgressBar2.Value = 10 Then
TextBox2.Text = TextBox3.Text
WebBrowser1.Navigate(TextBox3.Text)
End If
If ProgressBar2.Value = 20 Then
TextBox2.Text = TextBox4.Text
WebBrowser1.Navigate(TextBox4.Text)
End If
If ProgressBar2.Value = 30 Then
TextBox2.Text = TextBox5.Text
WebBrowser1.Navigate(TextBox5.Text)
End If
If ProgressBar2.Value = 40 Then
TextBox2.Text = TextBox6.Text
End If
If ProgressBar2.Value = 50 Then
TextBox2.Text = TextBox7.Text
WebBrowser1.Navigate(TextBox6.Text)
End If
If ProgressBar2.Value = 60 Then
TextBox2.Text = TextBox8.Text
End If
If ProgressBar2.Value = 70 Then
TextBox2.Text = TextBox9.Text
End If
If ProgressBar2.Value = 80 Then
TextBox2.Text = TextBox10.Text
End If
If ProgressBar2.Value = 90 Then
TextBox2.Text = TextBox12.Text
End If
If ProgressBar2.Value = 100 Then
TextBox12.Text = TextBox2.Text
Timer5.Stop()
ProgressBar2.Value = 0
Timer4.Start()
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
WebBrowser1.GoBack()
End Sub
Private Sub Timer4_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer4.Tick
ProgressBar2.Increment(1)
If ProgressBar2.Value = 10 Then
TextBox2.Text = TextBox13.Text
End If
If ProgressBar2.Value = 20 Then
TextBox2.Text = TextBox14.Text
End If
If ProgressBar2.Value = 30 Then
TextBox2.Text = TextBox15.Text
End If
If ProgressBar2.Value = 40 Then
TextBox2.Text = TextBox16.Text
End If
If ProgressBar2.Value = 50 Then
TextBox2.Text = TextBox17.Text
End If
If ProgressBar2.Value = 60 Then
TextBox2.Text = TextBox18.Text
End If
If ProgressBar2.Value = 70 Then
TextBox2.Text = TextBox19.Text
End If
If ProgressBar2.Value = 80 Then
TextBox2.Text = TextBox20.Text
End If
If ProgressBar2.Value = 90 Then
TextBox2.Text = TextBox21.Text
End If
If ProgressBar2.Value = 100 Then
TextBox2.Text = TextBox22.Text
Timer4.Stop()
ProgressBar2.Value = 0
Timer5.Start()
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
WebBrowser1.GoForward()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
'không cho nhập trên 100 kí tự
If Len(TextBox23.Text) > 100 Then
Button3.Enabled = False
TextBox23.Text = "Erro! Bạn đã nhập qá 100 Kí tự"
Button3.Enabled = True
Else
'chat log
Dim Total As String = Environment.NewLine & "♥" & ToolStripStatusLabel3.Text & "|" & ToolStripStatusLabel5.Text & ":->" & TextBox23.Text
Dim request As WebRequest = WebRequest.Create("http://chat.bomkhung.net/post.php?w=" & Total)
request.GetResponse()
Dim webclient As New Net.WebClient
TextBox23.Text = Nothing
WebBrowser2.Navigate("http://chat.bomkhung.net/")
End If
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
' Download log suorce
Dim filename As String = DateString + ".txt"
Dim webclient As New Net.WebClient
webclient.DownloadFile("http://chat.bomkhung.net/chat.txt", filename)
End Sub
Private Sub SpamAllListToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SpamAllListToolStripMenuItem.Click
Timer2.Start()
Timer5.Start()
End Sub
Private Sub StopAllListToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StopAllListToolStripMenuItem.Click
Timer5.Stop()
Timer2.Stop()
End Sub
Private Sub NotifyIcon1_MouseDoubleClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles NotifyIcon1.MouseDoubleClick
If (Me.WindowState = FormWindowState.Minimized) Then _
Me.WindowState = FormWindowState.Normal
Me.Activate()
Me.Show()
End Sub
Private Sub ChạyẨnToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ChạyẨnToolStripMenuItem.Click
Me.Hide()
End Sub
Private Sub ExitToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem1.Click
Me.Close()
End Sub
Private Sub OpenToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OpenToolStripMenuItem.Click
Me.Show()
End Sub
Private Sub UpdateToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UpdateToolStripMenuItem.Click
Try
Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create("http://bomkhung.info/vs.txt")
Dim response As System.Net.HttpWebResponse = request.GetResponse()
Dim sr As System.IO.StreamReader = New System.IO.StreamReader(response.GetResponseStream())
Dim newestversion As String = sr.ReadToEnd()
Dim currentversion As String = Application.ProductVersion
If newestversion.Contains(currentversion) Then
Else
MsgBox("Chương trình đã bị khóa! Hoặc Có Thể Hosting Bị Die", MsgBoxStyle.DefaultButton1, "Thông Báo")
MsgBox("Các Bạn Vui Lòng Vào Homepage Để Cập Nhật!", MsgBoxStyle.DefaultButton1, "Thông Báo")
End
End If
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
End Class
Các bạn cũng lưu ý luôn nhé ! Ứng dụng này chỉ sữ dụng cho ngôn ngữ TIẾNG VIẾT thôi nhé :D nếu bạn nào muốn sữ dụng thì buộc phải đổi sang ngôn ngữ Việt Nam nhé :D, còn ai muốn sữ dụng luôn thì để lại email mình send cho nhé !!! Thanks :D
Và trong bộ mã nguồn trên mình có thêm 1 đoạn code chat online như " CHAT.BOMKHUNG.NET " nhé ^^!
Post a Comment
+ Hiện tại HungCoder.Com đang cập nhật giao diện cho trang blog này. Nên sẽ có một số lỗi xãy ra khi các bạn xem blog này.