| Server IP : 208.122.213.31 / Your IP : 216.73.216.45 Web Server : Apache System : Linux msd6191.mjhst.com 4.18.0-553.137.1.el8_10.x86_64 #1 SMP Wed Jun 24 11:40:24 UTC 2026 x86_64 User : WHMCS_MIA_382 ( 1001) PHP Version : 7.4.33 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/httpd/html/playwithfaye.com/public_html/cgi-bin/ |
Upload File : |
<?php
include_once 'htpasswd.php';
#### Toccata Key
$tocatta_key = 'CBOuQKHGRDtDh7xQ';
#### Full path to your .htpasswd file (*Needs to be writable)
$full_path_to_htpasswd = '/home/httpd/html/playwithfaye.com/.htpasswd';
#### Full path to your log file (*Needs to be writable)
$full_path_to_logfile = '/home/httpd/html/playwithfaye.com/cgi-bin/sppwmgr.log';
#### Return count for the log list
$log_count = 100;
$action = $_REQUEST['action'];
$key = $_REQUEST['key'];
$htpasswd = new htpasswd($full_path_to_htpasswd, $full_path_to_logfile);
$htpasswd->open_file();
if ( $tocatta_key == $key )
{
switch ($action)
{
case 'add' :
{
$user = urldecode($_REQUEST['username']);
$passwd = $_REQUEST['password'];
echo ($htpasswd->user_add($user, $passwd)? 'added' : 'already_exists' ); // . "\n" ;
break;
}
case 'update' :
{
$user = urldecode($_REQUEST['username']);
$passwd = $_REQUEST['password'];
echo ($htpasswd->user_update($user, $passwd)? 'has_been_updated' : 'does_not_exist'); //."\n" ;
break;
}
case 'delete' :
{
$user = urldecode($_REQUEST['username']);
echo ($htpasswd->user_delete($user)? 'deleted' : 'does_not_exist'); //. "\n" ;
break;
}
case 'query' :
{
$user = urldecode($_REQUEST['username']);
echo ($htpasswd->user_query($user)? "exists": "does_not_exist"); //."\n" ;
break;
}
case 'list' :
{
echo $htpasswd->user_list() . "\n" ;
break;
}
case 'log' :
{
echo $htpasswd->return_log($log_count) . "\n" ;
break;
}
default:
echo "The username" . $user ;
}
}
else if ( $key == '' )
{
$htpasswd->logToFile ( "Result:_NoKey" );
echo "key required\n";
} else {
$htpasswd->logToFile ( "Result:_IncorrectKey" );
echo "incorrect key\n";
}