Ookla speedtest CLI for Windows has some undocumented arguments to accept license and GDPR
Posted by jpluimers on 2023/10/11
I had speedtest-cli
running on MacOS and various Linux machines, but not yet on Windows (see for instance my post Ubuntu: Fixing the myserious “Failed to stop apt-daily.timer: Connection timed out”).
[Wayback/Archive] Install and Test Internet Speed with Speedtest CLI Command Line – NEXTOFWINDOWS.COM reminded me there is a Speedtest CLI for Windows download at at [Wayback/Archive] Speedtest CLI: Internet speed test for the command line, but I am a an automation/scripting/devops person, so luckily there are also [Wayback/Archive] Chocolatey Software | Speedtest by Ookla (don’t get [Wayback/Archive] Ookla.Speedtest download, as that is the GUI version).
Both the Chocolatey and winget packages are named the same, so that is quite confusing. This is how I have set them apart:
- Chocolatey
- [Wayback/Archive] chocolatey-coreteampackages/automatic/speedtest at main · xmha97/chocolatey-coreteampackages
- [Wayback/Archive] chocolatey-coreteampackages/speedtest.nuspec at main · xmha97/chocolatey-coreteampackages
- [Wayback/Archive] chocolatey-coreteampackages/chocolateyInstall.ps1 at main · xmha97/chocolatey-coreteampackages
url = 'https://install.speedtest.net/app/cli/ookla-speedtest-1.1.1-win64.zip'
- winget
- [Wayback/Archive] Ookla.Speedtest 1.9.159.001 download
Download Links
- [Wayback/Archive] Speedtest for Windows: Internet speed test for Windows (breadcrumbs: Speedtest® Apps > Desktop apps > Windows):
- [Wayback/Archive] Ookla.Speedtest 1.9.159.001 download
Speedtest CLI on Windows
The first time you run Speedtest CLI on Windows, it will ask you one or more license or usage questions that depends on your region that you have to manually accept.
In Europe (because of GDPR), you get this:
C:\temp> speedtest ============================================================================== You may only use this Speedtest software and information generated from it for personal, non-commercial use, through a command line interface on a personal computer. Your use of this software is subject to the End User License Agreement, Terms of Use and Privacy Policy at these URLs: https://www.speedtest.net/about/eula https://www.speedtest.net/about/terms https://www.speedtest.net/about/privacy ============================================================================== License acceptance recorded. Continuing. ============================================================================== Ookla collects certain data through Speedtest that may be considered personally identifiable, such as your IP address, unique device identifiers or location. Ookla believes it has a legitimate interest to share this data with internet providers, hardware manufacturers and industry regulators to help them understand and create a better and faster internet. For further information including how the data may be shared, where the data may be transferred and Ookla's contact details, please see our Privacy Policy at: http://www.speedtest.net/privacy ============================================================================== Do you accept the license? [type YES to accept]:
The help does not show how to get around this:
C:\temp> speedtest --help Speedtest by Ookla is the official command line client for testing the speed and performance of your internet connection. Version: speedtest 1.1.1.28 Usage: speedtest [] -h, --help Print usage information -V, --version Print version number -L, --servers List nearest servers -s, --server-id=# Specify a server from the server list using its id -I, --interface=ARG Attempt to bind to the specified interface when connecting to servers -i, --ip=ARG Attempt to bind to the specified IP address when connecting to servers -o, --host=ARG Specify a server, from the server list, using its host's fully qualified domain name -p, --progress=yes|no Enable or disable progress bar (Note: only available for 'human-readable' or 'json' and defaults to yes when interactive) -P, --precision=# Number of decimals to use (0-8, default=2) -f, --format=ARG Output format (see below for valid formats) --progress-update-interval=# Progress update interval (100-1000 milliseconds) -u, --unit[=ARG] Output unit for displaying speeds (Note: this is only applicable for ΓÇÿhuman-readableΓÇÖ output format and the default unit is Mbps) -a Shortcut for [-u auto-decimal-bits] -A Shortcut for [-u auto-decimal-bytes] -b Shortcut for [-u auto-binary-bits] -B Shortcut for [-u auto-binary-bytes] --selection-details Show server selection details -v Logging verbosity. Specify multiple times for higher verbosity --output-header Show output header for CSV and TSV formats Valid output formats: human-readable (default), csv, tsv, json, jsonl, json-pretty Machine readable formats (csv, tsv, json, jsonl, json-pretty) use bytes as the unit of measure with max precision Valid units for [-u] flag: Decimal prefix, bits per second: bps, kbps, Mbps, Gbps Decimal prefix, bytes per second: B/s, kB/s, MB/s, GB/s Binary prefix, bits per second: kibps, Mibps, Gibps Binary prefix, bytes per second: kiB/s, MiB/s, GiB/s Auto-scaled prefix: auto-binary-bits, auto-binary-bytes, auto-decimal-bits, auto-decimal-bytes
Knowing most Windows executables store their messages in plain text, I wanted to dump the strings
Yesterday, I already wrote how to get the full path to the SpeedTest.exe
installed by Chocolaty via its’ generated shim in Getting the Chocolatey shimgen generated shim target, then re-used quite a few of the tools I mentioned there:
- [Wayback/Archive] Strings – Windows Sysinternals | Microsoft Docs
- [Wayback/Archive] clip | Microsoft Docs
- [Wayback/Archive] Notepad++
So based on Windows “equivalents” for bash backticks in cmd and PowerShell, I did this:
PowerShell -Command "strings "$(choco-get-shim-target-path.bat speedtest)"" | clip
There I found this when searching for license
(and bolded the undocumented command-line switches):
The official command line client for testing the speed and performance Speedtest by Ookla Do you accept the license? [type YES to accept]: yes License not accepted. Exiting. speedtest To accept the message please run speedtest interactively or use the following: License acceptance recorded. Continuing. --accept-gdpr --accept-license default
Doing a [Wayback/Archive] “speedtest” “–accept-gdpr” – Google Search I found [Wayback/Archive] speedtest-net: Documentation | Openbase:
CLI options
Usage:speedtest-net [-h|--help] [--accept-license] [--server-id <id>] [--source-ip <ip>]
-h
,--help
: Help--accept-license
: Accept the Ookla EULA, TOS and Privacy policy. The terms only need to be accepted once.--accept-gdpr
: Accept the Ookla GDPR terms. The terms only need to be accepted once.--server-id <id>
: Test using a specific server by Ookla server ID--source-ip <ip>
: Test a specific network interface identified by local IP
Later I found that doing a [Wayback/Archive] speedtest windows cli ookla accept license – Google Search would also have found the above information.
Speedtest results
Seems I have a decent connection here (:
Human readable
C:\temp> speedtest --accept-license --accept-gdpr ============================================================================== Ookla collects certain data through Speedtest that may be considered personally identifiable, such as your IP address, unique device identifiers or location. Ookla believes it has a legitimate interest to share this data with internet providers, hardware manufacturers and industry regulators to help them understand and create a better and faster internet. For further information including how the data may be shared, where the data may be transferred and Ookla's contact details, please see our Privacy Policy at: http://www.speedtest.net/privacy ============================================================================== License acceptance recorded. Continuing. Speedtest by Ookla Server: KPN - Amsterdam (id = 26996) ISP: Routit BV Latency: 1.44 ms (0.22 ms jitter) Download: 103.66 Mbps (data used: 46.6 MB ) Upload: 94.80 Mbps (data used: 117.0 MB ) Packet Loss: 0.0% Result URL: https://www.speedtest.net/result/c/a3ab9843-57fb-401c-8bf7-2e5960e8cc61
Machine readable JSON
DESKTOP-4JJBH0K C:\bin\bin> speedtest --accept-license --accept-gdpr --format=json-pretty { "type": "result", "timestamp": "2022-03-17T12:50:14Z", "ping": { "jitter": 0.014999999999999999, "latency": 1.2370000000000001 }, "download": { "bandwidth": 12667937, "bytes": 45829823, "elapsed": 3614 }, "upload": { "bandwidth": 11844606, "bytes": 158606526, "elapsed": 14421 }, "packetLoss": 0, "isp": "Routit BV", "interface": { "internalIp": "10.0.0.250", "name": "", "macAddr": "C5:65:8F:38:3E:C4", "isVpn": false, "externalIp": "http://10.221.139.19/" }, "server": { "id": 13218, "host": "speedtest.xs4all.nl", "port": 8080, "name": "XS4ALL Internet BV", "location": "Amsterdam", "country": "Netherlands", "ip": "194.109.6.103" }, "result": { "id": "586b313b-cc2f-4ae0-83d8-bd346ea40046", "url": "https://www.speedtest.net/result/c/586b313b-cc2f-4ae0-83d8-bd346ea40046", "persisted": true } }
Related
The Tweet that all started this [Wayback/Archive] Jeroen Wiert Pluimers on Twitter: “@biancatoeps Duurde even voor ik <code>--accept-license --accept-gdpr</code>
uitgevogeld had (want uiteraard ongedocumenteerd op …. Windows).”:
–jeroen
CRConrad said
“The help does not show how to get around this:”
The correct way to “get around” the licensing terms of licensed software is not to use it, isn’t it?
jpluimers said
Accepting terms by command-line is accepting, right?