D4rk^S0ul 0 Posted April 11, 2007 Share Posted April 11, 2007 I have this proxy list and i wish to see if they still work, i was thinking of doing this by simply pinging the ips 1 by 1 seeing if they respond and noting if they dont. Here is part of the proxy list. 68.255.184.16:4226 195.175.37.6:8080 83.228.105.117:3128 203.116.61.164:8080 66.56.15.204:57102 87.246.44.129:1080 67.165.61.175:478 63.135.30.94:8297 151.204.248.3:3966 61.47.15.133:8080 24.8.109.251:6061 61.78.56.133:7000 210.94.178.29:2753 88.73.226.172:64560 200.66.191.1:80 204.13.69.62:1080 91.34.87.130:5933 219.142.99.29:1080 There are alot more but this just a sample, i was wondering how to do it because it will error if i inc the port so does anyone know how i can read line but not include the port? Link to post Share on other sites
BillLuvsU 8 Posted April 11, 2007 Share Posted April 11, 2007 use StringSplit to split from the ":", so you'll have an array with one element being the ip and the other the port. [center][/center]Working on the next big thing.Currently Playing: Halo 4, League of LegendsXBL GT: iRememberYhslaw Link to post Share on other sites
Zedna 377 Posted April 11, 2007 Share Posted April 11, 2007 $line = '68.255.184.16:4226' $line = StringSplit($line,':') $line = $line[1] MsgBox(0,'Result',$line) Resources UDF ResourcesEx UDF AutoIt Forum Search Link to post Share on other sites
jvanegmond 309 Posted April 11, 2007 Share Posted April 11, 2007 You can't actually 'Ping' those proxies on that port, because ICMP uses a fixed port. Rather use a TCPConnect to test if a connection can be made on that IP and Port. expandcollapse popupOpt("TCPTimeout", 50) ;sets the connection timeout x ms $Read = FileRead("proxylist.txt") ; reads the file containing all the proxies and ports #cs Filename: proxylist.txt Content: 68.255.184.16:4226 195.175.37.6:8080 83.228.105.117:3128 203.116.61.164:8080 66.56.15.204:57102 87.246.44.129:1080 67.165.61.175:478 63.135.30.94:8297 151.204.248.3:3966 61.47.15.133:8080 24.8.109.251:6061 61.78.56.133:7000 210.94.178.29:2753 88.73.226.172:64560 200.66.191.1:80 204.13.69.62:1080 91.34.87.130:5933 219.142.99.29:1080 #ce $Line = StringSplit(StringStripCR($Read),@LF) ; splits everything line by line TCPStartup() ; for TCPConnect For $x = 1 To $Line[0] ; loop through all the lines If $Line[$x] Then ;make sure the line is not empty $IPort = StringSplit($Line[$x],":") ; seperate the IP from the Port $Socket = TCPConnect($IPort[1],$IPort[2]) MsgBox(0, @error, $Socket) ; if @Error = 0 AND $Socket <> -1 Then ; connection is made TCPCloseSocket($Socket) EndIf Next github.com/jvanegmond Link to post Share on other sites
D4rk^S0ul 0 Posted April 11, 2007 Author Share Posted April 11, 2007 thx i used $file3 = FileOpen("proxys.ini", 0) $Count = 1 While 1 $line2 = FileReadLine($File3, $Count) If @error Then ExitLoop $line3 = StringSplit($line2,':') $line3 = $line3[1] $P = Ping($line3, 3000) If $P Then FileWrite("proxynew.ini", $line2 & @CRLF) EndIf $Count = $Count + 1 WEnd MsgBox(0, "Done", "Done on line " & $Count) But il try your example Manadar in a minute because its true i cant tell if the proxies work or not using my script just that the host is online. Link to post Share on other sites
jvanegmond 309 Posted April 11, 2007 Share Posted April 11, 2007 But il try your example Manadar in a minute because its true i cant tell if the proxies work or not using my script just that the host is online.Yeah, and mine looks better.. github.com/jvanegmond Link to post Share on other sites
November 2 Posted April 12, 2007 Share Posted April 12, 2007 I have this proxy list and i wish to see if they still work, i was thinking of doing this by simply pinging the ips 1 by 1 seeing if they respond and noting if they dont. Here is part of the proxy list. 68.255.184.16:4226 195.175.37.6:8080 83.228.105.117:3128 203.116.61.164:8080 66.56.15.204:57102 87.246.44.129:1080 67.165.61.175:478 63.135.30.94:8297 151.204.248.3:3966 61.47.15.133:8080 24.8.109.251:6061 61.78.56.133:7000 210.94.178.29:2753 88.73.226.172:64560 200.66.191.1:80 204.13.69.62:1080 91.34.87.130:5933 219.142.99.29:1080 There are alot more but this just a sample, i was wondering how to do it because it will error if i inc the port so does anyone know how i can read line but not include the port? Try my software... its suites well to your needs. Cheers Keep scripting and kicking Old Scriptology Visual Ping 1.8 - Mass Ping Program with export to txt delimited. Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code. Desktop 2 RGB - Pick a color in the desktop and get the RGB code. ShootIT 1.0 - Screen Capture full and partial screen [font="'Arial Black';"]Remember Remember The Fifth of November.[/font] Link to post Share on other sites
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now