Skip to content

Instantly share code, notes, and snippets.

@ibnesayeed
Created April 8, 2015 13:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ibnesayeed/e7c506669631987223b7 to your computer and use it in GitHub Desktop.
Save ibnesayeed/e7c506669631987223b7 to your computer and use it in GitHub Desktop.
A script to automatically download XenForo from customer area
#! /usr/bin/env bash
###############################################################################
# CONFIG #
###############################################################################
EMAIL="xenforo%40gmail.com"
PASSWORD="p4ssw0rd"
LICENSE="12A3B4CD56"
###############################################################################
# DO NOT EDIT BELOW #
###############################################################################
# remove old version
rm -f ./xf-upgrade.zip
# login
curl -c ./xfcookie --data "email=$EMAIL&password=$PASSWORD" https://xenforo.com/customers/login
# grab latest version id
VERSION_ID=$(curl -s -b ./xfcookie "https://xenforo.com/customers/download?l=$LICENSE&d=xenforo" | sed -nr 's/^.+<option value="([[:digit:]]+)" selected="selected">.+<\/option>/\1/p')
# download
curl -b ./xfcookie --data "download_version_id=$VERSION_ID&options[upgradePackage]=1&agree=1&l=$LICENSE&d=xenforo" https://xenforo.com/customers/download -o ./xf-upgrade.zip
# cleanup
rm -f ./xfcookie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment