kiril318
09-11-2015, 03:40
Здравствуйте, есть бот, который заходит на сайт (логин, пароль берет из файла). Как сделать,чтобы каждый раз когда заходит на следующий аккаунт менялся ip адрес?
#include <IE.au3>
Local $b = 0
$oIE = _IECreate("сайт", 0, 1)
$file = FileOpen("Путь к файлу")
While 1
$b +=1
$Profile = FileReadLine($file)
If @error = -1 Then ExitLoop
$Login = StringRegExpReplace($Profile, "(.*):(.*)", "\1")
$pass = StringRegExpReplace($Profile, "(.*):(.*)", "\2")
$oLogin = _IEGetObjById($oIE, "authentificationLogin")
_IEDocInsertText($oLogin, $Login)
$oPass = _IEGetObjById($oIE, "authentificationPassword")
_IEDocInsertText($oPass, $pass)
If $b > 1 Then
$oAuth = _IEGetObjById($oIE, "authentificationSubmit")
Else
$oAuth = _IEGetObjById($oIE, "connexion-submit")
EndIf
_IEAction($oAuth, "click")
_IELoadWait($oIE, 500)
$oBtns = _IETagNameGetCollection($oIE, "a")
For $oBtn In $oBtns
If $oBtn.ClassName == "icone-deconnexion" Then
_IEAction($oBtn, "click")
_IELoadWait($oIE, 500)
EndIf
Next
WEnd
#include <IE.au3>
Local $b = 0
$oIE = _IECreate("сайт", 0, 1)
$file = FileOpen("Путь к файлу")
While 1
$b +=1
$Profile = FileReadLine($file)
If @error = -1 Then ExitLoop
$Login = StringRegExpReplace($Profile, "(.*):(.*)", "\1")
$pass = StringRegExpReplace($Profile, "(.*):(.*)", "\2")
$oLogin = _IEGetObjById($oIE, "authentificationLogin")
_IEDocInsertText($oLogin, $Login)
$oPass = _IEGetObjById($oIE, "authentificationPassword")
_IEDocInsertText($oPass, $pass)
If $b > 1 Then
$oAuth = _IEGetObjById($oIE, "authentificationSubmit")
Else
$oAuth = _IEGetObjById($oIE, "connexion-submit")
EndIf
_IEAction($oAuth, "click")
_IELoadWait($oIE, 500)
$oBtns = _IETagNameGetCollection($oIE, "a")
For $oBtn In $oBtns
If $oBtn.ClassName == "icone-deconnexion" Then
_IEAction($oBtn, "click")
_IELoadWait($oIE, 500)
EndIf
Next
WEnd