how to login http://192.168.8.1/rpc
using php code?
can you please provide php login code?
Thank you,
Got it.
function get_hash($password, $salt, $alg, $nonce): false|string
{
$unix_hash = '';
switch($alg) {
case 1:
if (CRYPT_MD5 == 1) {
// 12 character salt starting with $1$
$unix_hash = crypt($password, '$1$' . $salt . '$');
} else {
die('MD5 not supported.');
}
break;
case 5:
if(CRYPT_SHA256 == 1) {
// 16 character salt starting with $5$. The default number of rounds is 5000.
$unix_hash = 'CRYPT_SHA256: '.crypt($password, '$5$rounds=5000$' . $salt . '$');
}
else {
die('CRYPT_SHA256 not supported.');
}
break;
case 6:
if(CRYPT_SHA512 == 1) {
// 16 character salt starting with $6$. The default number of rounds is 5000.
$unix_hash = 'CRYPT_SHA512: '.crypt($password, '$6$rounds=5000$' . $salt . '$');
}
else {
die('CRYPT_SHA512 not supported.');
}
break;
}
return md5('root:' . $unix_hash . ':' . $nonce);
}
1 Like
I would prefer SSH for access, btw.
ok, thank you brother....