Jump to content

Recommended Posts

Posted

Thanks  @RichardHawkesford would rather the the most automated approach when clearing the cookies so what would you say is the best way?

Was going to use HMA for VPN.

Currently stuck with the random url.

#include <Array.au3>
#include <File.au3>
#include <MsgBoxConstants.au3>
#include <IE.au3>
#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>

Global $aUserAgent, $aReferrer, $aURLList
Local $sUserAgentFile = "UserAgent.txt"
Local $sReferrerFile = "referrer.txt"
Local $sURLListFile = "URLList.txt"

_FileListArray('UserAgent', $sUserAgentFile, $aUserAgent)
_FileListArray('Referrer', $sReferrerFile, $aReferrer)
_FileListArray('URLList', $sURLListFile, $aURLList)

Global $oIE = _IECreate()
    $oIE.Navigate2($aURLList[Random(0, UBound($aURLList) -1, 1)] Default, Default, Default, 'User-Agent: ' & $aUserAgent[Random(0, UBound($aUserAgent) - 1, 1)] & @CRLF & 'Referer: ' & $aReferrer[Random(0, UBound($aReferrer) - 1, 1)])

Func _FileListArray($sTitle, $sFileName, ByRef $aArray)
    If FileExists($sFileName) Then
        _FileReadToArray($sFileName, $aArray, 0, "")
        If @error Then
            MsgBox(0, $sTitle & " - Setup Error", "The file " & $sFileName & " is empty.")
            Exit
        EndIf
    Else
        MsgBox(0, $sTitle & " - Setup Error", "The File " & $sFileName & " doesn't exist.")
        Exit
    EndIf
EndFunc

 

Posted

Kinda go it working basically it open the first URL but when I open it again it tells me the URL is invalid.

#include <Array.au3>
#include <File.au3>
#include <MsgBoxConstants.au3>
#include <IE.au3>
#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>

Global $aUserAgent, $aReferrer, $aURL
Local $sUserAgentFile = "UserAgent.txt"
Local $sReferrerFile = "referrer.txt"
Local $sURLFile = "URL.txt"

_FileListArray('UserAgent', $sUserAgentFile, $aUserAgent)
_FileListArray('Referrer', $sReferrerFile, $aReferrer)
_FileListArray('URL', $sURLFile, $aURL)


Global $oIE = _IECreate()
$oIE.Navigate2($aURL[Random(0, UBound($aURL) -1, 1)], Default, Default, Default, 'User-Agent: ' & $aUserAgent[Random(0, UBound($aUserAgent) - 1, 1)] & @CRLF & 'Referer: ' & $aReferrer[Random(0, UBound($aReferrer) - 1, 1)])

Func _FileListArray($sTitle, $sFileName, ByRef $aArray)
    If FileExists($sFileName) Then
        _FileReadToArray($sFileName, $aArray, 0, "")
        If @error Then
            MsgBox(0, $sTitle & " - Setup Error", "The file " & $sFileName & " is empty.")
            Exit
        EndIf
    Else
        MsgBox(0, $sTitle & " - Setup Error", "The File " & $sFileName & " doesn't exist.")
        Exit
    EndIf
EndFunc

 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...