Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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