You last visited: Today at 18:52
Advertisement
Autoit Proxy Scanner
Discussion on Autoit Proxy Scanner within the AutoIt forum part of the Coders Den category.
03/05/2013, 05:10
#1
elite*gold: 15
Join Date: Oct 2007
Posts: 450
Received Thanks: 474
Autoit Proxy Scanner
Hier mal einen Scanner der schaut ob Proxys noch online sind.
Code:
#include <GUIConstantsEx.au3>
#include <file.au3>
#include <array.au3>
#Include <GuiListView.au3>
Opt("GUIOnEventMode", 1)
global $PROXY_LIST[1][5]
TCPStartup()
Global $hWs2_32 = -1
$win = GUICreate( "Proxy Scanner", 400, 400)
GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked")
$list = GUICtrlCreateListView( "# | IP | Port | Status", 10, 10, 380, 330)
Readin_Proxies()
GUISetState()
Global Const $__TCP_WINDOW = GUICreate("Async Sockets UDF")
For $x = 0 to UBound($PROXY_LIST)-2 step 1
Test_Connection( $x)
Sleep(100)
Next
While 1
Sleep(20)
WEnd
Func CLOSEClicked()
Exit
EndFunc
Func Readin_Proxies()
ProgressOn( "Proxy Scanner", "Loading...Please Wait.", "populating lists...")
local $linecount = _FileCountLines( @ScriptDir & "/proxylist.txt")
ReDim $PROXY_LIST[$linecount][5]
$filehnd = FileOpen( @ScriptDir & "/proxylist.txt")
For $x = 0 to $linecount step 1
ProgressSet( ($x/$linecount)*100)
$Line = ""
While 1
$character = FileRead( $filehnd, 1)
if @error = -1 then ExitLoop 2
if $character = @CR Then ExitLoop
if $character = @LF then ContinueLoop
$Line &= $character
WEnd
$spl = StringSplit( $Line, ":", 1)
$PROXY_LIST[$x][0] = $spl[1]
if $spl[0] >= 2 Then
$PROXY_LIST[$x][1] = $spl[2]
Else
$PROXY_LIST[$x][1] = 80
EndIf
$PROXY_LIST[$x][2] = GUICtrlCreateListViewItem( $x&"|"&$spl[1]&"|"&$PROXY_LIST[$x][1]&"|Unknown", $list)
GUICtrlSetBkColor( $PROXY_LIST[$x][2], 0xFFFFAA)
Next
FileClose( $filehnd)
ProgressOff()
EndFunc
Func Test_Connection( $arrayslot)
local $SocketID = ___ASocket()
___ASockSelect( $SocketID, $__TCP_WINDOW, 0x401 + $arrayslot, BitOR( 1, 2, 16, 32))
GUIRegisterMsg( 0x401 + $arrayslot, "Opensocket_data_" )
___ASockConnect( $SocketID, $PROXY_LIST[$arrayslot][0], $PROXY_LIST[$arrayslot][1])
$PROXY_LIST[$arrayslot][3] = $SocketID
EndFunc
Func Opensocket_data_( $hWnd, $iMsgID, $WParam, $LParam )
Local $iError = ___HiWord( $LParam )
Local $iEvent = ___LoWord( $LParam )
Abs($hWnd)
local $Array_Slot = $iMsgID-0x0401
local $x = $Array_Slot
Switch $iEvent
Case 16
If $iError Then
GUICtrlSetData( $PROXY_LIST[$x][2], $x&"|"&$PROXY_LIST[$x][0]&"|"&$PROXY_LIST[$x][1]&"|OFFLINE")
GUICtrlSetBkColor( $PROXY_LIST[$x][2], 0xCD0000)
FileWrite("Offline Proxy.txt",$PROXY_LIST[$x][0]&":"&$PROXY_LIST[$x][1]&@CRLF)
Else
GUICtrlSetData( $PROXY_LIST[$x][2], $x&"|"&$PROXY_LIST[$x][0]&"|"&$PROXY_LIST[$x][1]&"|ONLINE")
GUICtrlSetBkColor( $PROXY_LIST[$x][2], 0x00FF00)
FileWrite("Online Proxy.txt",$PROXY_LIST[$x][0]&":"&$PROXY_LIST[$x][1]&@CRLF)
EndIf
___ASockShutdown($PROXY_LIST[$x][3])
TCPCloseSocket($PROXY_LIST[$x][2])
EndSwitch
EndFunc
Func ___ASocket($iAddressFamily = 2, $iType = 1, $iProtocol = 6)
If $hWs2_32 = -1 Then $hWs2_32 = DllOpen( "Ws2_32.dll" )
Local $hSocket = DllCall($hWs2_32, "uint", "socket", "int", $iAddressFamily, "int", $iType, "int", $iProtocol)
If @error Then
SetError(1, @error)
Return -1
EndIf
If $hSocket[ 0 ] = -1 Then
SetError(2, ___WSAGetLastError())
Return -1
EndIf
Return $hSocket[ 0 ]
EndFunc ;==>_ASocket
Func ___ASockShutdown($hSocket)
If $hWs2_32 = -1 Then $hWs2_32 = DllOpen( "Ws2_32.dll" )
Local $iRet = DllCall($hWs2_32, "int", "shutdown", "uint", $hSocket, "int", 2)
If @error Then
SetError(1, @error)
Return False
EndIf
If $iRet[ 0 ] <> 0 Then
SetError(2, ___WSAGetLastError())
Return False
EndIf
Return True
EndFunc ;==>_ASockShutdown
Func ___ASockClose($hSocket)
If $hWs2_32 = -1 Then $hWs2_32 = DllOpen( "Ws2_32.dll" )
Local $iRet = DllCall($hWs2_32, "int", "closesocket", "uint", $hSocket)
If @error Then
SetError(1, @error)
Return False
EndIf
If $iRet[ 0 ] <> 0 Then
SetError(2, ___WSAGetLastError())
Return False
EndIf
Return True
EndFunc ;==>_ASockClose
Func ___ASockSelect($hSocket, $hWnd, $uiMsg, $iEvent)
If $hWs2_32 = -1 Then $hWs2_32 = DllOpen( "Ws2_32.dll" )
Local $iRet = DllCall( _
$hWs2_32, _
"int", "WSAAsyncSelect", _
"uint", $hSocket, _
"hwnd", $hWnd, _
"uint", $uiMsg, _
"int", $iEvent _
)
If @error Then
SetError(1, @error)
Return False
EndIf
If $iRet[ 0 ] <> 0 Then
SetError(2, ___WSAGetLastError())
Return False
EndIf
Return True
EndFunc ;==>_ASockSelect
Func ___ASockListen($hSocket, $sIP, $uiPort, $iMaxPending = 5)
Local $iRet
Local $stAddress
If $hWs2_32 = -1 Then $hWs2_32 = DllOpen( "Ws2_32.dll" )
$stAddress = ___SockAddr($sIP, $uiPort)
If @error Then
SetError(@error, @extended)
Return False
EndIf
$iRet = DllCall($hWs2_32, "int", "bind", "uint", $hSocket, "ptr", DllStructGetPtr($stAddress), "int", DllStructGetSize($stAddress))
If @error Then
SetError(3, @error)
Return False
EndIf
If $iRet[ 0 ] <> 0 Then
$stAddress = 0; Deallocate
SetError(4, ___WSAGetLastError())
Return False
EndIf
$iRet = DllCall($hWs2_32, "int", "listen", "uint", $hSocket, "int", $iMaxPending)
If @error Then
SetError(5, @error)
Return False
EndIf
If $iRet[ 0 ] <> 0 Then
$stAddress = 0; Deallocate
SetError(6, ___WSAGetLastError())
Return False
EndIf
Return True
EndFunc ;==>_ASockListen
Func ___ASockConnect($hSocket, $sIP, $uiPort)
Local $iRet
Local $stAddress
If $hWs2_32 = -1 Then $hWs2_32 = DllOpen( "Ws2_32.dll" )
$stAddress = ___SockAddr($sIP, $uiPort)
If @error Then
SetError(@error, @extended)
Return False
EndIf
$iRet = DllCall($hWs2_32, "int", "connect", "uint", $hSocket, "ptr", DllStructGetPtr($stAddress), "int", DllStructGetSize($stAddress))
If @error Then
SetError(3, @error)
Return False
EndIf
$iRet = ___WSAGetLastError()
If $iRet = 10035 Then
Return True
EndIf
SetExtended(1)
Return True
EndFunc ;==>_ASockConnect
Func ___SockAddr($sIP, $iPort, $iAddressFamily = 2)
Local $iRet
Local $stAddress
If $hWs2_32 = -1 Then $hWs2_32 = DllOpen( "Ws2_32.dll" )
$stAddress = DllStructCreate("short; ushort; uint; char[8]")
If @error Then
SetError(1, @error)
Return False
EndIf
DllStructSetData($stAddress, 1, $iAddressFamily)
$iRet = DllCall($hWs2_32, "ushort", "htons", "ushort", $iPort)
DllStructSetData($stAddress, 2, $iRet[ 0 ])
$iRet = DllCall($hWs2_32, "uint", "inet_addr", "str", $sIP)
If $iRet[ 0 ] = 0xffffffff Then
$stAddress = 0
SetError(2, ___WSAGetLastError())
Return False
EndIf
DllStructSetData($stAddress, 3, $iRet[ 0 ])
Return $stAddress
EndFunc ;==>__SockAddr
Func ___WSAGetLastError()
If $hWs2_32 = -1 Then $hWs2_32 = DllOpen( "Ws2_32.dll" )
Local $iRet = DllCall($hWs2_32, "int", "WSAGetLastError")
If @error Then
SetExtended(1)
Return 0
EndIf
Return $iRet[ 0 ]
EndFunc ;==>_WSAGetLastError
Func ___MakeLong($LoWord, $HiWord)
Return BitOR($HiWord * 0x10000, BitAND($LoWord, 0xFFFF)); Thanks Larry
EndFunc ;==>_MakeLong
Func ___HiWord($Long)
Return BitShift($Long, 16); Thanks Valik
EndFunc ;==>_HiWord
Func ___LoWord($Long)
Return BitAND($Long, 0xFFFF); Thanks Valik
EndFunc ;==>_LoWord
Func _Get_IP()
Local $ip, $t_ip
If InetGet("http://checkip.dyndns.org/?rnd1=" & Random(1, 65536) & "&rnd2=" & Random(1, 65536), @TempDir & "\~ip.tmp") Then
$ip = FileRead(@TempDir & "\~ip.tmp", FileGetSize(@TempDir & "\~ip.tmp"))
FileDelete(@TempDir & "\~ip.tmp")
$ip = StringTrimLeft($ip, StringInStr($ip, ":") + 1)
$ip = StringTrimRight($ip, StringLen($ip) - StringInStr($ip, "/") + 2)
$t_ip = StringSplit($ip, '.')
If $t_ip[0] = 4 And StringIsDigit($t_ip[1]) And StringIsDigit($t_ip[2]) And StringIsDigit($t_ip[3]) And StringIsDigit($t_ip[4]) Then
Return $ip
EndIf
EndIf
If InetGet("http://www.whatismyip.com/?rnd1=" & Random(1, 65536) & "&rnd2=" & Random(1, 65536), @TempDir & "\~ip.tmp") Then
$ip = FileRead(@TempDir & "\~ip.tmp", FileGetSize(@TempDir & "\~ip.tmp"))
FileDelete(@TempDir & "\~ip.tmp")
$ip = StringTrimLeft($ip, StringInStr($ip, "Your ip is") + 10)
$ip = StringLeft($ip, StringInStr($ip, " ") - 1)
$ip = StringStripWS($ip, 8)
$t_ip = StringSplit($ip, '.')
If $t_ip[0] = 4 And StringIsDigit($t_ip[1]) And StringIsDigit($t_ip[2]) And StringIsDigit($t_ip[3]) And StringIsDigit($t_ip[4]) Then
Return $ip
EndIf
EndIf
SetError(1)
Return -1
EndFunc ;==>_Get_IP
die Proxys einfach in eine textdokument mit den Namen Proxylist.txt
Hier mal eine Kleine liste im anhang
Attached Files
proxylist.txt
(31.1 KB, 18 views)
Similar Threads
[Question] Making a proxy bot with AutoIt
07/22/2012 - CO2 Programming - 28 Replies
Hi guys,
I've been searching on the net for long days a free proxy bot but I realized that it didn't exist. So now I just want to code mine, even I know it won't be easy. I saw the guide of pro4never which explains very well how it works and how to make yours, but the language used is C# and I'm only starting. Also the written guide isn't finnished so there couples of long videos and because I'm not English, I can't understand everything he says. I coded bots with AutoIt which work perfectly...
Silkroad Online Proxy in AutoIt?
06/13/2011 - AutoIt - 3 Replies
Also ich beschäftige mich letzte Zeit viel mit dem programmieren und verstehen(sehr wichtig) eines Proxy speziell auf der basis für Rsro, müsste jedoch überall gleich sein...
Nun ist mir in den Sinn gekommen sowas kann man auch in AutoIt schreiben, da gibt es die TCP funktion zum listen und connecten für Server und Client, darüber hinaus existiert eine BLOWFISH UDF.
Mir wäre neugierig wer sich in AutoIt etwas besser auskennt und das für ein interessantes Projekt hält, denn ich würde gerne...
AutoIt Desktop-Scanner
01/01/2011 - AutoIt - 5 Replies
Hallo Com,
ich bin auf der Suche nach einem verständlichen, vllt noch erklärten Code für die durchsuchung des ganzen Bildschirmes.
Das ganze sollte für ein Egoshooter eingesetzt.
Ablaufen wird es etwa so ablaufen:
Der ganze Bildschirm wird nach dem Pixel des gegnerischen Kopfes abgesucht - wenn das dann erfasst wurde 1x draufschiessen dann sleep (50)
nochmals draufknallen sleep (50) ... bis das (WTF?! der oder das oO ) Pixel nicht mehr existiert. Reloaden und weiter geht's (:
[Guide] How to use C# & Autoit with Silkroad proxy
10/25/2010 - SRO Coding Corner - 2 Replies
hey everybody,
many people asked me on youtube about that and some did it here aswell so i'd like to give you some examples how to send modified packets to the sro_client / to the server. just made a little video tut about it, downloadlinks can be found in the description. hope it will help some of you :)
YouTube - How to use C# & Autoit with Silkroad proxy
All times are GMT +2. The time now is 18:52 .