Merge pull request #26 from ibnux/mikrotikOS.6.43

Mikrotik os.6.43
This commit is contained in:
iBNu Maksum 2021-08-18 19:47:39 +07:00 committed by GitHub
commit fc9ddcd425
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 5 deletions

2
.gitignore vendored
View File

@ -2,3 +2,5 @@
.DS_Store
.vscode/
ui/compiled/*.php
ui/cache/*.php
/test.php

View File

@ -131,10 +131,15 @@ class Client
$password = '',
$port = 8728,
$persist = false,
$timeout = null,
$timeout = 10,
$crypto = N::CRYPTO_OFF,
$context = null
) {
if(strpos($host,":")>-1){
$part = explode(":",$host);
$host = $part[0];
$port = $part[1];
}
$this->com = new Communicator(
$host,
$port,
@ -269,8 +274,8 @@ 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('password', $password);
$request->send($com);