A preserved archive of the Logical Gamers community forums, 2009-2025. The original threads and posts, served read-only. Registration, posting and private messages are gone for good.

[vb6] Extractor

1.4k views · started by Chad ·
#1
[vb6] Extractor
heres the source. really simple. No i will not give you the custom wrappers so don't even ask.


Dim StrAccounts As String
Dim strSave As String
Dim StrUserPass() As String
Dim strSplit As String
Dim IntSplit As Integer

Private Sub cmdLoadA_Click()
StrAccounts = (InputBox("What is the name of the file you want to open? Must be in same folder", "Load", "accounts.txt"))
Call Wrapper.LoadList(lstAccounts, StrAccounts)
End Sub

Private Sub cmdSaveP_Click()
strSave = (InputBox("What do you want to save the file as?", "Save", "Passwords.txt"))
Call Wrapper.SaveList(lstPasswords, strSave)
End Sub

Private Sub cmdSaveU_Click()
strSave = (InputBox("What do you want to save the file as?", "Save", "Usernames.txt"))
Call Wrapper.SaveList(lstUsernames, strSave)
End Sub

Private Sub cmdStart_Click()
Dim StrDeli As String

StrDeli = (InputBox("What is the delimeter the accounts should be split by?", "Delimeter", " : "))
cmdStart.Enabled = False

For IntSplit = 0 To lstAccounts.ListCount - 1
strSplit = (lstAccounts.List(IntSplit))
StrUserPass = (Split(strSplit, StrDeli))

lstUsernames.AddItem (StrUserPass(0))
lstPasswords.AddItem (StrUserPass(1))
Next
Call MsgBox("Finished extracting", vbInformation, "Done")
cmdStart.Enabled = True
End Sub
#2
You should make one that uses dynamic data parsing.

For example it can extract items that are in totally different data positions.

Example;

File Data - "Lol : Hi"

Input - "Username : Password"
Output - "Username = Lol, Password = Hi"

Input - "Password : Username"
Output - "Password = Lol, Username = Hi"


Etc.
#3
What why I want to do that if this works just the same?
#4
Chad wrote:
What why I want to do that if this works just the same?


Because you are using sterile code.

You always have "Username Delimiter Password".

Why can't it be "Data Delimiter Password Delimiter Username"

It's called generic or dynamic coding, a method that should be used for an extractor code. And it is not difficult mostly in VB6.
#5
I know but i made this in a hurry for Nick.
#6
Chad wrote:
I know but i made this in a hurry for Nick.


Oh well, I was just giving some ideas :P
#7
What is a data exrtractor?

Is it like WIn RAR On 7-Zip?
#8
What is the equivalent for ".ListCount" and ".AddItem" in vb.net?

I have converted everything else...

What is a data exrtractor?

Is it like WIn RAR On 7-Zip?


Try Win Zip...
#9
What is the equivalent for ".ListCount" and ".AddItem" in vb.net?

I have converted everything else...



Try Win Zip...


ListCount for vb.net = List.Items.Item
Additem for vb.net = List.Items.Add
#10
Chad wrote:
ListCount for vb.net = List.Items.Item
Additem for vb.net = List.Items.Add


Hers is a snippet of your code converted to vb.net then:

For Me.IntSplit = 0 To lstaccounts.List.Items.Item - 1


It says " 'List' is not a member of 'Systems.Windows.Forms.ListBox' "

I have tried putting the .Listbox.Items.Item. What am I doing wrong?
#11
the .List. Was just an example take it out.
#12
Chad wrote:
the .List. Was just an example take it out.


Ok. That solved a lot of the problems...


For Me.IntSplit = 0 To lstaccounts.Items.Item - 1


Now it is :

Argument not specified for parameter 'index' of 'Public Overridable Default Property Item(index As Integer) As Object'.
#13
Ok. That solved a lot of the problems...


For Me.IntSplit = 0 To lstaccounts.Items.Item - 1


Now it is :

Argument not specified for parameter 'index' of 'Public Overridable Default Property Item(index As Integer) As Object'.


Messagebox.Show (lstAccounts.Items.Item(IntSplit)

should be something like that
#14
Chad wrote:
Messagebox.Show (lstAccounts.Items.Item(IntSplit)

should be something like that


It seems to be an error with this "lstaccounts.Items.Item" (It has a blue underline)...

I inputed that and a little red square pops up under the 1.

The error is : " ')' expected. "