phpBB swiss knife - emergency tasks single file - create Super Admin or update username, disable extensions ...

User avatar
axew3
w3all User
w3all User
Posts: 2030
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

phpBB swiss knife - emergency tasks single file - create Super Admin or update username, disable extensions ...

Post by axew3 »

phpbb_swiss_knife.php

Tasks:

* disable phpBB extensions (that maybe are causing errors)
* create Super User account with a random password
* update existent username with a new random password


Code: Select all

/***
* Tasks: 
* disable phpBB extensions (that maybe are causing errors)
* create Super User account with a random password
* update existent username with a new random password
*
* Remove this file when finished: leaving this file in place, expose your phpBB board to high security risks!
*
* Usage: Download and unzip the file phpbb_swiss_knife.php
* May rename the file into something else (not strictly required) (i.e.: mySecretFile.php)
* upload it to your Board's root (i.e.: www.mydomain.com/phpBB3/)
* Point your browser to i.e.: www.mydomain.com/phpBB3/phpbb_swiss_knife.php or to /mySecretFile.php or whatever you renamed it) and follow instructions.
* Remove this file when finished: leaving this file in place, expose your phpBB board to high security risks!
*
* phpbb_swiss_knife Version 1.0.0 - axe70 2020
* Version 1.0.0 - david63 2017
* Based on modisson.php - Oyabun1 2015
*
* This script is free software. It comes without any warranty.
* license http://opensource.org/licenses/GPL-2.0 GNU General Public License v2.
*
* Ensure that you have a backup of your Database before to run this tool
*
*/
Usage:
* Usage: Download and unzip the file phpbb_swiss_knife.php
* May rename the file into something else (not strictly required) (i.e.: mySecretFile.php)
* upload it to your Board's root (i.e.: www.mydomain.com/phpBB3/)
* Point your browser to i.e.: www.mydomain.com/phpBB3/phpbb_swiss_knife.php or to /mySecretFile.php (or whatever you renamed it) and follow instructions.
* Remove this file when finished: leaving this file in place, expose your phpBB board to high security risks!

again:
* Remove the file when finished: leaving this file in place, expose your phpBB board to high security risks!


phpBB-swiss-knife-main.zip
(16.83 KiB) Downloaded 12 times

Reply with ideas or code, for more simply tasks that can be useful to add.
... it is not a good example of php code
true, but it work as is, it is just a copy/paste adapt based on another file:
https://www.phpbb.com/support/docs/en/3 ... s-at-once/

phpBB swiss knife on github: https://github.com/axew3/phpBB-swiss-knife