NIMBUZZ TOOLS FORUM-2016
Kєяλℓλ-ßυzZ ►☻◄ ƒøяυλ⁄(-2016

✽✽✽✽✽✽✽✽✽✽✽✽ нι gυєѕт ✽✽✽✽✽✽✽✽✽✽✽✽✽✽

♚♚♚♚ωєℓ¢σмє тσ ♚kєяαℓα♕ßυzz♚ zσηє♚♚♚♚

ρℓєαѕє яєgιѕтєя тσ gєт ƒυℓℓ α¢¢єѕѕ αη∂ ∂σωηℓσα∂ ѕтυƒƒ . σηℓү яεgιsтεяε∂ мεмвεя αℓℓσωε∂ vιεω sρεcιαℓ zσηε αη∂ ∂σωηℓσα∂ sтυғғ.

тнαηк уσυ

вαℓυ кяιsнηα !
Top posters
330 Posts - 27%
275 Posts - 23%
127 Posts - 11%
107 Posts - 9%
69 Posts - 6%
54 Posts - 4%
53 Posts - 4%
53 Posts - 4%
51 Posts - 4%
Top posting users this week
Top posting users this month

Share
View previous topicGo downView next topic
avatar
KßZ ►☻◄ ƒøяυλ⁄(-тєαм мємвєя
KßZ ►☻◄ ƒøяυλ⁄(-тєαм мємвєя
Male
emad♥ebn♥felesteen
AGE : 30
POSTS : 275
REPUTATION : 33
KBZ TEAM POINTS : 643
JOIN DATE : 2015-10-13
BIRTHDAY : 1987-09-21
View user profile

Nimbuzz: (Source Code) LOGIN ID NIMBUZZ (Visual Basic .Net)

on Wed Dec 16, 2015 3:10 am
Imports System.Net.Sockets 'Import For TCP socket Connection
Imports System.Threading
Imports System.Text


Public Class Form1
    Private tcp As TcpClient = New TcpClient
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        tcp.Client.Connect("Host.Name.Here", 5222) ' port is 5222 default i am using
        If tcp.Client.Connected Then
            Dim s As String = ("" & Convert.ToBase64String(Encoding.UTF8.GetBytes(String.Concat(New Object() {ChrW(0), TextBox1.Text, ChrW(0), TextBox2.Text}))) & "

Code:
")
            tcp.Client.Send(Encoding.UTF8.GetBytes(s))
        End If
        Dim th As New Threading.Thread(AddressOf recieve)
        th.Start()
    End Sub
    Private Sub recieve()  
        Try
            Do While tcp.Connected
                Dim buffer As Byte() = New Byte(tcp.ReceiveBufferSize - 1) {}
                Dim num As Integer = tcp.Client.Receive(buffer)
                If (num <> 0) Then
                    If (num < buffer.Length) Then
                        Dim buffer2 As Byte() = New Byte(num - 1) {}
                        Dim i As Integer
                        For i = 0 To num - 1
                            buffer2(i) = buffer(i)
                        Next i
                        buffer = buffer2
                    End If
                    Dim xml As String = Encoding.UTF8.GetString(buffer)
                    ReadXml(xml)
                End If
            Loop
        Catch
        End Try
    End Sub
    Private Sub ReadXml(ByVal xml As String) ' usind ReadXml 
        xml = xml.Replace("'", """")
        If xml.Contains("success xmlns=""urn:ietf:params:xml:ns:xmpp-sasl""") Then
            MessageBox.Show("Connected") 'If password Is correct Show, This Message means ID is Successfully Login Than It Show Message
        ElseIf xml.Contains("not-authorized") Then
            MessageBox.Show("Wrong Username or Password") 'If password is Wrong show this message for, This Message Means ID is Unsuccessfully In Login
        End If
    End Sub
End Class


تحياتي لكم عماد ابن فلسطين
View previous topicBack to topView next topic
Permissions in this forum:
You cannot reply to topics in this forum