Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Add-ons Site Suggestions
This discussion has been closed.
Comments
#!/bin/bash DIR_EXTENSION="/var/www/extensions/" OWNER="apache" GROUP_OWNER="apache" DEFAULT_DIR_MODE="2750" DEFAULT_FILE_MODE="640" tmp="/tmp/VanillaExtension" ADDON_ID=$1 wget --post-data=AddOnID=$ADDON_ID http://lussumo.com/addons/?PostBackAction=DoDownload mkdir -p $tmp mv index.html?PostBackAction=DoDownload $tmp/extension$ADDON_ID.zip pwd=$PWD cd $tmp unzip extension$ADDON_ID.zip rm extension$ADDON_ID.zip for x in *; do mv $x $DIR_EXTENSION chown -R "$OWNER":"$GROUP_OWNER" $DIR_EXTENSION/$x chmod -R $DEFAULT_DIR_MODE $DIR_EXTENSION/$x find $DIR_EXTENSION/$x -type f | xargs chmod $DEFAULT_FILE_MODE done cd $pwd rm -r $tmp
this script take in argument the addon id
(NOTE: wget must have been compiled with debugging enabled for this to work)
#!/bin/bash EXTENSION_NUM=$1 TEMPFILE=`tempfile --prefix=addon --suffix=.zip` FILENAME=`wget --debug -O $TEMPFILE http://lussumo.com/addons/index.php?PostBackAction=DoDownload\&AddOnID=$EXTENSION_NUM 2>&1 | grep 'Content-Disposition:' | perl -e '$_=<STDIN>;/filename=(.*)$/;print $1;'` if [ $FILENAME ]; then { mv $TEMPFILE "./$FILENAME" } else { echo Failed. rm $TEMPFILE } fi echo Extension number = $EXTENSION_NUM echo Filename = $FILENAME