WinBoxPassRec

Ok for my protection i have to say this is a old version of the original code, that has been bug fixed and more readable then this code you see here but still it does it job well i wont fix it today cause I’m lazy it’s purpose is to Recover Mikrotik’s WinBox Username and Password’s.

‘—————————————————————————————
‘ Module : WinBoxPassRec
‘ DateTime : 29.03.2009 3:55
‘ Author : Kreshnik Hasanaj
‘ Mail : kresha7@hotmail.com
‘ Purpose : Recovery WinBox Passwords
‘ Usage : At your own risk
‘ Requirements: None
‘ Distribution: You can freely use this code in your own
‘ applications, but you may not reproduce
‘ or publish this code on any web site,
‘ online service, or distribute as source
‘ on any media without express permission.
‘—————————————————————————————
Option Explicit
Public Function WinBoxOwner(ByVal TheDir As String)
Dim sData As String
Dim svData() As String
Dim i As Long
Dim TheWinFile As String
Dim AppData As String

AppData = Environ(“appdata”)
TheWinFile = AppData & “\Mikrotik\Winbox\winbox.CFG”

Open TheWinFile For Binary Access Read As #1
sData = Space(LOF(1))
Get #1, , sData
Close #1

svData = Split(sData, Chr$(&H12) & Chr$(&H0) & Chr$(&H4))

Open TheDir & “MikroOutput.txt” For Append As #2

For i = 0 To UBound(svData)

svData(i) = Replace(svData(i), Chr$(&H1), “”)
svData(i) = Replace(svData(i), Chr$(&H2), “”)
svData(i) = Replace(svData(i), Chr$(&H3), “”)
svData(i) = Replace(svData(i), Chr$(&H4), “”)
svData(i) = Replace(svData(i), Chr$(&H5), “”)
svData(i) = Replace(svData(i), Chr$(&H6), “”)
svData(i) = Replace(svData(i), Chr$(&H8), “”)
svData(i) = Replace(svData(i), Chr$(&H10), “”)
svData(i) = Replace(svData(i), Chr$(&H11), “”)
svData(i) = Replace(svData(i), Chr$(&H14), “”)
svData(i) = Replace(svData(i), Chr$(&H16), “”)
svData(i) = Replace(svData(i), Chr$(&H17), “”)
svData(i) = Replace(svData(i), Chr$(&H19), “”)
svData(i) = Replace(svData(i), Chr$(&H20), “”)

svData(i) = Replace(svData(i), Chr$(&H1A), “”)
svData(i) = Replace(svData(i), Chr$(&HC), “”)
svData(i) = Replace(svData(i), Chr$(&HE), “”)
svData(i) = Replace(svData(i), Chr$(&HF), “”)
svData(i) = Replace(svData(i), Chr$(&H1C), “”)
svData(i) = Replace(svData(i), Chr$(&HA), “”)
svData(i) = Replace(svData(i), Chr$(&HB), “”)
svData(i) = Replace(svData(i), Chr$(&HD), “”)

svData(i) = Replace(svData(i), “Œ”, “”)
svData(i) = Replace(svData(i), “boundsß”, “”)
svData(i) = Replace(svData(i), “typewindow”, “”)
svData(i) = Replace(svData(i), “typeaddr”, “”)
svData(i) = Replace(svData(i), “À¾”, “”)
svData(i) = Replace(svData(i), “secure-mode”, “”)
svData(i) = Replace(svData(i), “keep-pwd”, “”)

svData(i) = Replace(svData(i), “list-col-0d”, “”)
svData(i) = Replace(svData(i), “list-col-1P”, “”)
svData(i) = Replace(svData(i), “list-col-2–”, “”)
svData(i) = Replace(svData(i), “list-sort”, “”)
svData(i) = Replace(svData(i), “list-ascend”, “”)

svData(i) = Replace(svData(i), “host”, “Host:”)
svData(i) = Replace(svData(i), “login”, “Username:”)
svData(i) = Replace(svData(i), “pwd”, “Password:”)
svData(i) = Replace(svData(i), “noteAP-“, “AccessPoint:”)

Print #2, svData(i)
Next

Close #2
End Function

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s