Skip to content

Instantly share code, notes, and snippets.

@madmod
Last active April 22, 2016 16:46
Show Gist options
  • Save madmod/c259a3cd4de4123f6afbedbd17d53073 to your computer and use it in GitHub Desktop.
Save madmod/c259a3cd4de4123f6afbedbd17d53073 to your computer and use it in GitHub Desktop.
Obsessively check your HTC Vive order status from the comfort of the command line!
#!/usr/bin/env bash
# Put your order number and password in the quotes here.
VIVE_ORDER=''
VIVE_PASSWORD=''
LOGIN_DATA='Action=PostFindOrderPages&SiteID=htcus&Locale=en_US&ThemeID=38736100&Form=com.digitalriver.template.form.search.FindOrderV2Form&CallingPageID=HelpPage&Env=BASE&ORIG_VALUE_operation=update&operation=search&ORIG_VALUE_orderNumber=&orderNumber='$VIVE_ORDER'&ORIG_VALUE_password=&password='$VIVE_PASSWORD
LOOKUP_URL='https://store.us.htc.com/DRHM/store?Action=DisplayCustomerServiceOrderDetailPage&SiteID=htcus&Locale=en_US&ThemeID=38736100&Env=BASE&requisitionID='$VIVE_ORDER
rm -f /tmp/htccookie.txt;
curl 'https://store.us.htc.com/DRHM/store' -H 'Pragma: no-cache' -H 'Cache-Control: no-cache' --data $LOGIN_DATA --cookie-jar /tmp/htccookie.txt -sS 1> /dev/null;
curl $LOOKUP_URL -H 'Pragma: no-cache' -H 'Cache-Control: no-cache' --cookie /tmp/htccookie.txt -sS | grep 'Order Status' | xargs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment