The programs included with the Devuan GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright.
Devuan GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. You have new mail. Last login: Thu May 21 14:11:59 2020 from 10.10.15.10 waldo@admirer:~$ cat user.txt 40671a712c266c8aa563a475533bfc06
<html> <head> <title>Administrative Tasks</title> </head> <body> <h3>Admin Tasks Web Interface (v0.01 beta)</h3> <?php // Web Interface to the admin_tasks script // if(isset($_REQUEST['task'])) { $task = $_REQUEST['task']; if($task == '1' || $task == '2' || $task == '3' || $task == '4' || $task == '5' || $task == '6' || $task == '7') { /*********************************************************************************** Available options: 1) View system uptime 2) View logged in users 3) View crontab (current user only) 4) Backup passwd file (not working) 5) Backup shadow file (not working) 6) Backup web data (not working) 7) Backup database (not working)
NOTE: Options 4-7 are currently NOT working because they need root privileges. I'm leaving them in the valid tasks in case I figure out a way to securely run code as root from a PHP page. ************************************************************************************/ echo str_replace("\n", "<br />", shell_exec("/opt/scripts/admin_tasks.sh $task 2>&1")); } else { echo("Invalid task."); } } ?>
waldo@admirer:/opt/scripts$ cat admin_tasks.sh #!/bin/bash ...... ...... backup_web() { if [ "$EUID" -eq 0 ] then echo"Running backup script in the background, it might take a while..." /opt/scripts/backup.py & else echo"Insufficient privileges to perform the selected operation." fi }