New to parsing info and cant figure this out
Hi i got given this source code to help me learn a few things. Well the problem is i cant figure out the IP parse function and the guy that made it is now on holiday. Ive searched everywhere for a good reliable guide to help and cant find one for this particular source code. The problem is this its a proxy leecher that ive been trying to learn how to do for a long time now on vb6 without success when a person i got talking to decided to try and help me by making up a source code for one. I know theres some errors in it (my mistake not his) it just the Parse functions i cant get working. If anybody feels like helping a sad ripping his hair out person :D can they take a look and see if they know the proper functions to make it parse the info from the sites in the program. Any help i get will be greatly appreciated. Its very simple to understand you open the leecher part of the program hit start and away it goes it should start going through the lists of sites and parse the proxies into a listbox. Please help me if you can ive been at this for months without success and all im doing is trying to learn
[1123 byte] By [
sparky22] at [2007-11-11 8:50:57]

# 1 Re: New to parsing info and cant figure this out
I would be glad to help, but not loading an entire project trying to figure out what part of the code you need to understand...
can you please post just that part of the code?
mstraf at 2007-11-11 17:25:00 >

# 2 Re: New to parsing info and cant figure this out
this is for the leeching part of the program
Option Explicit
Dim URL(0 To 999) As String
Dim proxy(0 To 999) As String
Dim port(0 To 999) As String
Dim Data As String
Private Sub ccXPButton1_Click()
Call ScanIp
End Sub
Private Sub ccXPButton2_Click()
GRAB.Enabled = False
End Sub
Private Sub ccXPButton3_Click()
List1.Clear
List2.Clear
End Sub
Private Sub ccXPButton5_Click()
Dim i As Integer
On Error Resume Next
Dim LTD As String, F As Variant, X As Integer
F = FreeFile
With Form1.CD
.FileName = ""
.DialogTitle = "Load URLS"
.Filter = "All Supported Types|*.txt"
.ShowOpen
If .FileName = "" Then Exit Sub
Open .FileName For Input As #F
While Not EOF(1)
Input #1, LTD
List1.AddItem LTD
Wend
Close #1
End With
End Sub
Private Sub Form_Unload(Cancel As Integer)
End
End Sub
Sub ScanIp()
Rich.Text = frmHTTP.OpenURL(List1.Text)
Parse Rich
Parse2 Rich
Parse3 Rich
GETip Rich, List2
End Sub
the ccXPButton1 is the start button for the program to make it go through the url list to parse the ip addresses from them
do you want to see the module code?
# 3 Re: New to parsing info and cant figure this out
Let's see.
The ScanIP() methods calls first Parse(), Parse2() and Parse3(), that change all the literals and special characters in the RichText to " "
Then calls the GetIP method, that adds in a ListBox all the instances of type
X.X.X.X:K
(where X goes from 0 to 9 and K from 0 to 4) found in the RichText
For example, a possible output in the ListBox could be
5.5.5.5:0
7.7.7.7:3
Now, this is what the program does, but what is it supposed to do?
Marco
mstraf at 2007-11-11 17:26:58 >

# 4 Re: New to parsing info and cant figure this out
okay first of all ty for the help with this i do really appreciate it and sorry im not very good at explaining it.
okay the program has a list of websites in it one of which is www.samair.ru/proxy. Its supposed to go to that site and grab the proxy/IP for example 193.194.69.66:8080 . Thats all i want it to grab i dont want it to grab the country or proxy type.
# 5 Re: New to parsing info and cant figure this out
what are you talking about dennis?
# 6 Re: New to parsing info and cant figure this out
before continuing, can you please tell me the reason on doing so? I am just trying to figure out if it is legal...
Marco
mstraf at 2007-11-11 17:30:03 >

# 7 Re: New to parsing info and cant figure this out
basically the short version of it is i see alot of vb6 & .net proxy leechers made by ppl and i thought to myself im ok with databases/win apps in vb6 why not try to a proxy leecher to help learn the parse function aswell as other things too thats basically why im just trying to learn. As for it being legal i can assure you it is the site i posted and the sites in the program provide proxies for usage updated usually every hr. If you look at the site i posted you will see what i mean exactly by that. There is also "buyable" programs you can buy to do what i want to make this program for. But why spend money on something i want to learn? hope i dont sound ignorant with that.
But yes it is legal and your more than welcome to check that out
# 8 Re: New to parsing info and cant figure this out
this is what I'll do. first idea I had...
Find the first "." in the textBox (use Instr).
Starting from that, see if the previous 3 characters are numbers (using Mid). If yes, look for the next characters, always using the Mid function and check if the sequence is right.
You should be able to write this with e sequence of few For loops.
Then continue until no more "." are found
Let me know if you have problems. In fact, this is a very nice exercise to learn the basic of string manipulation
Marco
mstraf at 2007-11-11 17:32:06 >

# 9 Re: New to parsing info and cant figure this out
sorry and i feel like a real prat for doin this but im not sure on what you mean and how to do that