Jump to content

Automatic speedtest for all servers in your country.


Morthawt
 Share

Recommended Posts

Source:

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_UseUpx=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <String.au3>
FileInstall('d:\speedtest-servers.txt', @ScriptDir & '\speedtest-servers-morthawt.txt', 1)
$CC = IPDetails()
$file = FileRead(@ScriptDir & '\speedtest-servers-morthawt.txt')
$sections = _StringBetween($file, '<server value="', '</server>')
$Count = 0
For $a In $sections
    If StringInStr($a, '[' & $CC & ']  -', 1) Then
        $ID = StringSplit($a, '"')[1]
        $Location = StringReplace(StringSplit($a, '">', 1)[2], '</server>', '')
        ConsoleWrite($ID & @CRLF & $Location & @CRLF & @CRLF)
        $Count += 1
        $URL = 'http://www.speedtest.net/?s=' & $ID
        $hPID = ShellExecute('iexplore.exe', $URL, '', '', @SW_MINIMIZE)
        Sleep(65000)
        ProcessClose($hPID)
    EndIf
Next
Func IPDetails()
    $_presource = InetRead('http://freegeoip.net/xml/', 1)
    If @error Then
        SetError(1)
        Return ''
    EndIf
    $_source = BinaryToString($_presource)
    $start = StringInStr($_source, '<CountryCode>', 0, 1) + 13
    $end = StringInStr($_source, '</CountryCode>')
    $CountryCode = StringMid($_source, $start, $end - $start)
    Return $CountryCode
EndFunc   ;==>IPDetails

I have included the compiled script which contains the file with all the speedtest.net servers and ID's in it. I wanted to just get a wide range of servers (all in the UK) to get a good picture of what my speeds are now that I have changed ISP, without having to sit there and click each one visually and probably not remember which blips I had gone over etc. So this will detect your country and load up a minimized IE that will run the test after 10 seconds if you leave it alone, then wait 65 seconds, close IE and open a new one with the next server.

This was a massive time saver for me and I was able to find a great server to do my tests with in the future.

EDIT:

If you are going to use this, for real, make sure you open internet explorer, login with the "Remember me" option and then close IE. That way your test results will be logged on your account so you can trace what got you the highest scores.

speed tester.zip

Edited by Morthawt
Link to comment
Share on other sites

Welcome to the Internet.  =P

I ran the exe.  The txt was created but nothing else happened after several minutes of waiting.  I'm in North America (as though there was any other amirite?)  runnin' Win7 Pro x64.

Link to comment
Share on other sites

No news is good or bad news.

 

I didn't test because that website is flagged as being malicious on two separate HOSTS lists I use. Therefore it wouldn't work anyway. If it's trying to determine your IP, then why not use _GetIP()?

Edited by guinness

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

wow speedtest.net is marked as a bad site? what on earth..

EDIT:

Its not the IP thats needed, its the country code. So I get it from that site. But I had another of my programs that uses that geo site stop working. Turned out the website was down. I am about to try it again manually in my browser to see if it is working again.

Yup, the geoip site is working now. It should work.

Edited by Morthawt
Link to comment
Share on other sites

This site >> freegeoip.net is marked as malicious, not speedtest.net.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

Still, that is strange. All it is is a free IP get-location service. I use it with the program to get the 2 digit country code so that the program will only select servers from that country. Pretty useful. I use it on another program to track the general location of people trying to run a gaming clan-only file if they are not an actual member of the clan. It is amazing how many random people end up with your files when you upload them to virustotal and email them to AV companies for whitelisting. Companies from Russia, tech universities in the USA.. I had to build in hardware blocking in the end to prevent constant false "Unauthorized attempt" log entries on my server so that the program will kick them out before creating a log. Kind of annoying really. But I digress. The site is really useful in my opinion (when it's not down..).

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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