Skip to content

Instantly share code, notes, and snippets.

@dogeared
Created May 11, 2017 14:56
Show Gist options
  • Save dogeared/428360137894050a4b4d47a30667a9f9 to your computer and use it in GitHub Desktop.
Save dogeared/428360137894050a4b4d47a30667a9f9 to your computer and use it in GitHub Desktop.
Jealous of your friends' internet speed? Just fake it!
#! /bin/bash
# Based on https://www.unknowncheats.me/forum/php/98463-speedtest-real-fake-results-photoshop.html
## httpie (httpie.org - a modern curl replacement) and md5 are required
DOWN="999925"
UP="999794"
PING=1
SERVER=3729
ACCURACY=8
MD5=`md5 -q -s $PING-$UP-$DOWN-297aae72`
RESULT=`http -f POST http://www.speedtest.net/api/api.php Host:www.speedtest.net \
User-Agent:"LULZ SpeedTest" \
Origin:http://c.speedtest.net \
Referer:http://c.speedtest.net/flash/speedtest.swf Connection:Close \
startmode=recommendedselect \
promo= \
upload=$UP \
download=$DOWN \
accuracy=$ACCURACY \
recommendedserverid=$SERVER \
serverid=$SERVER \
ping=$PING \
hash=$MD5`
# Thanks to https://gist.github.com/pablochacin/8016575 for the following
for p in ${RESULT//&/ };do kvp=( ${p/=/ } ); k=${kvp[0]};v=${kvp[1]};eval $k=$v;done
echo "http://www.speedtest.net/my-result/$resultid"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment