mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2024-11-10 09:12:51 +08:00
Update login mikrotik untuk versi baru
This commit is contained in:
parent
36043b3a36
commit
fb8a1353d9
2 changed files with 6 additions and 11 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -2,4 +2,5 @@
|
|||
.DS_Store
|
||||
.vscode/
|
||||
ui/compiled/*.php
|
||||
ui/cache/*.php
|
||||
ui/cache/*.php
|
||||
/test.php
|
|
@ -131,7 +131,7 @@ class Client
|
|||
$password = '',
|
||||
$port = 8728,
|
||||
$persist = false,
|
||||
$timeout = null,
|
||||
$timeout = 10,
|
||||
$crypto = N::CRYPTO_OFF,
|
||||
$context = null
|
||||
) {
|
||||
|
@ -274,16 +274,10 @@ class Client
|
|||
$timeout = null
|
||||
) {
|
||||
$request = new Request('/login');
|
||||
$request->send($com);
|
||||
$response = new Response($com, false, $timeout);
|
||||
// Update Mikrotik Versi terbaru
|
||||
// sayangnya ini ngga aman, bagusnya di setup ke port SSL
|
||||
$request->setArgument('name', $username);
|
||||
$request->setArgument(
|
||||
'response',
|
||||
'00' . md5(
|
||||
chr(0) . $password
|
||||
. pack('H*', $response->getProperty('ret'))
|
||||
)
|
||||
);
|
||||
$request->setArgument('password', $password);
|
||||
$request->send($com);
|
||||
$response = new Response($com, false, $timeout);
|
||||
return $response->getType() === Response::TYPE_FINAL
|
||||
|
|
Loading…
Reference in a new issue