Community discussions

MikroTik App
 
amardeep704
just joined
Topic Author
Posts: 12
Joined: Thu Sep 20, 2018 1:09 pm

Mikrotik API call not working

Fri Jun 28, 2019 5:34 pm

Hi Guys,

I am using the Mikrotik API (php) to connect with the gateway and enable/disable hotspot. However, the API connect function is return false.

Sample code:

require('routeros_api.class.php');
$API = new RouterosAPI();

if ($API->connect('IP', 'USERNAME', 'PASSWORD')) {
die('connnect');
}

Any thoughts?

Thanks
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7053
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: Mikrotik API call not working

Mon Jul 01, 2019 9:58 am

Make sure your PHP code is using new authentication method:
https://wiki.mikrotik.com/wiki/Manual:API#Initial_login
 
imort
just joined
Posts: 8
Joined: Sat May 26, 2018 9:34 am

Re: Mikrotik API call not working

Mon Jul 01, 2019 12:20 pm

Make sure your PHP code is using new authentication method:
https://wiki.mikrotik.com/wiki/Manual:API#Initial_login
Have same issue with upgrade to the new 6.45.1 firmware.
API authentication fails, and same is working with 6.44.3

Is it related with removed unsafe user passwords storage?
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7053
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: Mikrotik API call not working

Mon Jul 01, 2019 12:27 pm

Yes, make sure you are using new authentication method.
 
Kurosudo
just joined
Posts: 21
Joined: Wed Aug 01, 2018 1:21 pm

Re: Mikrotik API call not working

Mon Jul 01, 2019 12:41 pm

Same problem, i'm using same API class like you and all my systems died
 
imort
just joined
Posts: 8
Joined: Sat May 26, 2018 9:34 am

Re: Mikrotik API call not working

Mon Jul 01, 2019 12:44 pm

Yes, make sure you are using new authentication method.
I think that a proper warning about deprecated API authentication with this release was at least essential.
Problem is that I have a strange success/fail API authentication entries in the logs even after downgrade and restoring the last backup.

Can you please suggest should downgrade restore old-API authentication working, before third-party software can fix it from their side?
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7053
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: Mikrotik API call not working

Mon Jul 01, 2019 12:54 pm

There is already important note due to removal of compatibility with old version passwords.
Third party software should have been fixed long time ago ,new authentication method was introduced back in May 2018.
 
imort
just joined
Posts: 8
Joined: Sat May 26, 2018 9:34 am

Re: Mikrotik API call not working

Mon Jul 01, 2019 1:00 pm

There is already important note due to removal of compatibility with old version passwords.
Third party software should have been fixed long time ago ,new authentication method was introduced back in May 2018.
Sorry, can't see anything about deprecation of old-style authentication both in the changelogs or API link you posted above.
Can you please post a link to the important note you're mention?

Thank you!
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7053
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: Mikrotik API call not working

Mon Jul 01, 2019 1:04 pm

Important note!!!
Due to removal of compatibility with old version passwords in this version...
...
!) user - removed insecure password storage;
...
 
imort
just joined
Posts: 8
Joined: Sat May 26, 2018 9:34 am

Re: Mikrotik API call not working

Mon Jul 01, 2019 1:16 pm

Important note!!!
Due to removal of compatibility with old version passwords in this version...
...
!) user - removed insecure password storage;
...
I still can't see any API-related warnings in the release.
Just to be sure that you can understand my point:

1. Removing compatibility with old version passwords
Ok, I really can't say that it should be intuitive for any user that it will affect their API authentication somehow.

2. user - removed insecure password storage;
Same here.

I didn't trying to hype on that, but I strongly believe that another important notice about old-style API authentication deprecation starts with this release will be very pleased for many MikroTik users.

Thank you.
 
Kurosudo
just joined
Posts: 21
Joined: Wed Aug 01, 2018 1:21 pm

Re: Mikrotik API call not working

Mon Jul 01, 2019 1:48 pm

It is possible to fix it via little dirty hack in API. Just change login sequence. But This will make API usable only 6.43 higher
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7053
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: Mikrotik API call not working

Mon Jul 01, 2019 2:02 pm

Not true. See how it is done in our api example client:
https://wiki.mikrotik.com/wiki/Manual:A ... ple_client
 
Kurosudo
just joined
Posts: 21
Joined: Wed Aug 01, 2018 1:21 pm

Re: Mikrotik API call not working

Mon Jul 01, 2019 2:15 pm

Not true. See how it is done in our api example client:
https://wiki.mikrotik.com/wiki/Manual:A ... ple_client
Yea, i basically did same thing in my patch i just wrote "how it fastly fix".
Infact i don't see any advantage to use old style API because having unpatched ROS (pre-6.43) is big security hole
 
amardeep704
just joined
Topic Author
Posts: 12
Joined: Thu Sep 20, 2018 1:09 pm

Re: Mikrotik API call not working

Mon Jul 01, 2019 6:38 pm

Hi Guys,

I am able to connect using the new authentication method. Sample code:

use PEAR2\Net\RouterOS;
require_once 'PEAR2_Net_RouterOS-1.0.0b6.phar';

try{
$util = new RouterOS\Util($client = new RouterOS\Client('IP', 'USERNAME', 'PASSWORD'));
foreach ($util->setMenu('/log')->getAll() as $entry) {
echo $entry('time') . ' ' . $entry('topics') . ' ' . $entry('message') . "\n";
}
} catch (Exception $e) {
echo 'Unable to connect to RouterOS.';
}

It lists the logs on the router.

I am trying to enable/disable the hotspot(p hotspot disable 0) but can't find the property that will be used to achieve this in the above code.

I am also trying to print the interface list but nothing ie being returned.

Sample code:

$getRequest = new RouterOS\Request('/interface/get');
$getRequest->setArgument('value-name', 'type');
$getRequest->setArgument('number', 'ether1');
$type = $client->sendSync($getRequest)->getProperty('ret');
print_r($type);

Any thoughts?

Thanks
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7053
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: Mikrotik API call not working

Tue Jul 02, 2019 12:46 pm

I didn't trying to hype on that, but I strongly believe that another important notice about old-style API authentication deprecation starts with this release will be very pleased for many MikroTik users.
Thank you.
We will add note regarding API, too.
 
stealth
newbie
Posts: 30
Joined: Fri May 26, 2006 4:55 pm

Re: Mikrotik API call not working

Wed Jul 03, 2019 12:12 am

For those who are using old good routeros_api.class.php from Denis Basta. The urls are no longer active. The needed changes to make it work again with new /login

https://github.com/Ftelf/netprovider-ne ... 73647463b3
 
User avatar
boen_robot
Forum Guru
Forum Guru
Posts: 2400
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: Mikrotik API call not working  [SOLVED]

Wed Jul 03, 2019 9:21 am

Right now, PEAR2_Net_RouterOS supports the new login method only in the development version. That is, the currently unreleased 1.0.0b7. You can only get it via Composer by specifying "dev-develop" as your required version.

Generating PHARs is a little bit difficult and time consuming right now, which is why I haven't done it yet... Since these new versions no longer support the old authentication method, I'll try to make a release this weekend.

@amardeep704 I'm surprised b6 works to be honest. As for disabling hotspot, you can use f.e.
$util->setMenu('/ip hotspot')->disable('hostspot1');
If your hostpot server instance is named "hotspot1".
 
BinaryCrash
newbie
Posts: 41
Joined: Thu Apr 28, 2011 11:20 pm

Re: Mikrotik API call not working

Fri Jul 05, 2019 8:35 pm

Generating PHARs is a little bit difficult and time consuming right now, which is why I haven't done it yet... Since these new versions no longer support the old authentication method, I'll try to make a release this weekend.
Looking forward to the release! :D
 
User avatar
machack
Frequent Visitor
Frequent Visitor
Posts: 65
Joined: Fri Jun 01, 2007 9:35 pm
Location: San Luis Argentina
Contact:

Re: Mikrotik API call not working

Wed Jul 17, 2019 6:42 pm

For Login Using Php API, you need change in: routeros_api.classv1.6.php

$this->write('=response=00' . md5(chr(0) . $password . pack('H*', $MATCHES[0][1])));

for

$this->write('=password=' . $password);
 
benkhlifahaythem
just joined
Posts: 2
Joined: Mon Jun 24, 2019 9:19 am

Re: Mikrotik API call not working

Tue Aug 13, 2019 12:50 pm

Not true. See how it is done in our api example client:
https://wiki.mikrotik.com/wiki/Manual:A ... ple_client

Good day,

i did apply the new login method and i still get the same issue with V6.45.1 and up im using php .

Code: Select all


<?php


use PEAR2\Net\RouterOS;
require_once 'PEAR2_Net_RouterOS-1.0.0b6.phar';

try{
$util = new RouterOS\Util($client = new RouterOS\Client('ip','user','password'));
foreach ($util->setMenu('/log')->getAll() as $entry) {
echo $entry('time') . ' ' . $entry('topics') . ' ' . $entry('message') . "\n";
}
} catch (Exception $e) {
die($e);
}

?>



-------------------------------------OUT PUT--------------------------------------------------------------


PEAR2\Net\RouterOS\DataFlowException: Invalid username or password supplied. in phar://C:/xampp/htdocs/test2/PEAR2_Net_RouterOS-1.0.0b6.phar/PEAR2_Net_RouterOS-1.0.0b6/src/PEAR2/Net/RouterOS/Client.php:175 Stack trace: #0 C:\xampp\htdocs\test2\example.php(8): PEAR2\Net\RouterOS\Client->__construct('ip', 'user', 'password') #1 {main}



I Don't figure it out why I'm getting the error.
Last edited by benkhlifahaythem on Tue Aug 13, 2019 3:54 pm, edited 1 time in total.
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 3297
Joined: Sat Dec 24, 2016 11:17 am
Location: Magrathean

Re: Mikrotik API call not working

Tue Aug 13, 2019 3:35 pm

Fixed
Last edited by Jotne on Tue Aug 20, 2019 7:48 pm, edited 1 time in total.
 
nrtszr
just joined
Posts: 9
Joined: Mon Dec 23, 2013 3:33 pm
Location: Denizli
Contact:

Re: Mikrotik API call not working

Tue Aug 20, 2019 2:49 pm

when will it come out?

PEAR2_Net_RouterOS-1.0.0b7.phar

thanks
 
BinaryCrash
newbie
Posts: 41
Joined: Thu Apr 28, 2011 11:20 pm

Re: Mikrotik API call not working

Mon Aug 26, 2019 3:24 pm

when will it come out?

PEAR2_Net_RouterOS-1.0.0b7.phar

thanks
I would like to know too.
 
mvalsasna
just joined
Posts: 18
Joined: Tue Sep 30, 2014 2:10 pm

Re: Mikrotik API call not working

Mon Sep 02, 2019 11:14 am

Hi

also looking forward to the release of Net_RouterOS-1.0.0b7

thanks

MAtteo
when will it come out?

PEAR2_Net_RouterOS-1.0.0b7.phar

thanks
 
tayyebjaved
just joined
Posts: 2
Joined: Fri Mar 22, 2013 10:39 am

Re: Mikrotik API call not working

Sat Sep 07, 2019 3:48 pm

For Login Using Php API, you need change in: routeros_api.classv1.6.php

$this->write('=response=00' . md5(chr(0) . $password . pack('H*', $MATCHES[0][1])));

for

$this->write('=password=' . $password);
Not working for me.
 
LeoCombes
Frequent Visitor
Frequent Visitor
Posts: 78
Joined: Mon May 28, 2007 3:56 pm

Re: Mikrotik API call not working

Tue Nov 05, 2019 8:48 pm

Hi

also looking forward to the release of Net_RouterOS-1.0.0b7

thanks

MAtteo
when will it come out?

PEAR2_Net_RouterOS-1.0.0b7.phar

thanks
UP! :)
 
BinaryCrash
newbie
Posts: 41
Joined: Thu Apr 28, 2011 11:20 pm

Re: Mikrotik API call not working

Tue Nov 05, 2019 9:17 pm

Hi

also looking forward to the release of Net_RouterOS-1.0.0b7

thanks

MAtteo
when will it come out?

PEAR2_Net_RouterOS-1.0.0b7.phar

thanks
UP! :)
UP!
 
gu1113
just joined
Posts: 2
Joined: Wed Dec 20, 2017 7:35 pm

Re: Mikrotik API call not working

Mon Nov 11, 2019 10:53 pm

Hello, can anyone provide the download link for PEAR2_Net_RouterOS-1.0.0b7.phar ?

I cant see the update anywhere ... :-(
 
amardeep704
just joined
Topic Author
Posts: 12
Joined: Thu Sep 20, 2018 1:09 pm

Re: Mikrotik API call not working

Mon Nov 18, 2019 4:23 pm

Hello, can anyone provide the download link for PEAR2_Net_RouterOS-1.0.0b7.phar ?

I cant see the update anywhere ... :-(
You can check the link - https://github.com/pear2/Net_RouterOS/wiki/Util-basics
 
LeoCombes
Frequent Visitor
Frequent Visitor
Posts: 78
Joined: Mon May 28, 2007 3:56 pm

Re: Mikrotik API call not working

Tue Dec 03, 2019 8:23 pm

Hello, can anyone provide the download link for PEAR2_Net_RouterOS-1.0.0b7.phar ?

I cant see the update anywhere ... :-(
You can check the link - https://github.com/pear2/Net_RouterOS/wiki/Util-basics

I cant see how to download phar file from the page that you suggest •`_´•
 
LeoCombes
Frequent Visitor
Frequent Visitor
Posts: 78
Joined: Mon May 28, 2007 3:56 pm

Re: Mikrotik API call not working

Fri Dec 06, 2019 4:40 pm

I was waiting for Net_RouterOS-1.0.0b7.phar solution because I never used composer and I have not time to learn how use it, not interesed to touch and doing tests over a production server, etc.
boen_robot says that he will generate a .phar file when a new release was published, so, for those people that are waiting for PEAR2_Net_RouterOS-1.0.0b7.phar because not are a composer user and need a quick solution... here are which steps I followed in Linux:

- get another machine whith PHP installed (or install it) for generate the appropiate files, no need of touch a production server for this.
mkdir temp
cd temp
wget https://getcomposer.org/download/1.9.1/composer.phar
If you have a older PHP version (5.6 for example) maybe you will be interested in installing an older version of composer from https://getcomposer.org/download/.
php composer.phar require pear2/net_transmitter:1.0.0b1 pear2/cache_shm pear2/net_routeros:dev-develop@dev
If everything goes well, now you have a 'vendor' directory with some composer files. If you want verify that is the correct version, you can search for '6.43' in the file 'vendor/pear2/net_routeros/src/PEAR2/Net/RouterOS/Client.php' and find the new login method.
Move this 'temp' directory to your server, rename it to something meaningful, like 'composer', and include in your old script, with the correct path, for example:
replace
require_once 'PEAR2_Net_RouterOS-1.0.0b4.phar';
with:
require __DIR__ . '/../composer/vendor/autoload.php';
This is all.
 
electravis
Member Candidate
Member Candidate
Posts: 274
Joined: Tue Jan 26, 2010 12:06 am

Re: Mikrotik API call not working

Thu Feb 06, 2020 7:21 pm

I am having some issues with API login still. I have tried all that was mentioned in this form and nothing seems to be working. Has anyone had success and is able to step by step it? I updated the Basta AP.php file tried changing the variables and still nothing is working for me.

Here is the API part I think matters
public function connect($ip, $login, $password)
{
for ($ATTEMPT = 1; $ATTEMPT <= $this->attempts; $ATTEMPT++) {
$this->connected = false;
$PROTOCOL = ($this->ssl ? 'ssl://' : '' );
$context = stream_context_create(array('ssl' => array('ciphers' => 'ADH:ALL', 'verify_peer' => false, 'verify_peer_name' => false)));
$this->debug('Connection attempt #' . $ATTEMPT . ' to ' . $PROTOCOL . $ip . ':' . $this->port . '...');
$this->socket = @stream_socket_client($PROTOCOL . $ip.':'. $this->port, $this->error_no, $this->error_str, $this->timeout, STREAM_CLIENT_CONNECT,$context);
if ($this->socket) {
socket_set_timeout($this->socket, $this->timeout);
$this->write('/login', false);
$this->write('=name=' . $login, false);
$this->write('=password=' . $password);
$RESPONSE = $this->read(false);
if (isset($RESPONSE[0]) && $RESPONSE[0] == '!done') {
$this->connected = true;
break;


Then here is my test code I am using

<?php

require('ros_new_api.php');

$API = new RouterosAPI();

$API->debug = true;

if ($API->connect('1.1.1.1', 'admin', 'password')) {

$API->write('/ip/hotspot/hotspot/getall');
$ARRAY = $API->read();

print_r($ARRAY);

$API->disconnect();

}

?>


ANy help.

Thank you
 
jmmr84
just joined
Posts: 11
Joined: Fri Oct 21, 2011 6:05 pm

Re: Mikrotik API call not working

Thu Apr 02, 2020 7:44 am

Hi everyone, for all of you that are workin with PEAR2 API, here is the solution:

1. Uncompress the .phar file
2. Go to the uncompressed folder -> PEAR2_Net_RouterOS-1.0.0b6\src\PEAR2\Net\RouterOS and edit the Client.php file
3. Find the _login function and modify it to look exactly like this:

private static function _login(
Communicator $com,
$username,
$password = '',
$timeout = null
) {
$request = new Request('/login');
$request->setArgument('name', $username);
$request->setArgument('password', $password);
$request->verify($com)->send($com);

$response = new Response($com, false, $timeout);
if ($response->getType() === Response::TYPE_FINAL) {
return null === $response->getProperty('ret');
} else {
while ($response->getType() !== Response::TYPE_FINAL
&& $response->getType() !== Response::TYPE_FATAL
) {
$response = new Response($com, false, $timeout);
}
return false;
}
}


4. Finally make sure you have the uncompressed and edited folder where you had your .phar file and change your project's php like this:

Replace -> require_once 'PEAR2_Net_RouterOS-1.0.0b6.phar'; for -> require_once 'PEAR2_Net_RouterOS-1.0.0b6/src/PEAR2/Autoload.php';

Now you should be able to connect with the new versions of RouterOS.
 
afamative
just joined
Posts: 1
Joined: Tue Jan 29, 2019 7:02 am

Re: Mikrotik API call not working

Tue Apr 14, 2020 2:33 am

Not true. See how it is done in our api example client:
https://wiki.mikrotik.com/wiki/Manual:A ... ple_client

Good day,

i did apply the new login method and i still get the same issue with V6.45.1 and up im using php .

Code: Select all


<?php


use PEAR2\Net\RouterOS;
require_once 'PEAR2_Net_RouterOS-1.0.0b6.phar';

try{
$util = new RouterOS\Util($client = new RouterOS\Client('ip','user','password'));
foreach ($util->setMenu('/log')->getAll() as $entry) {
echo $entry('time') . ' ' . $entry('topics') . ' ' . $entry('message') . "\n";
}
} catch (Exception $e) {
die($e);
}

?>



-------------------------------------OUT PUT--------------------------------------------------------------


PEAR2\Net\RouterOS\DataFlowException: Invalid username or password supplied. in phar://C:/xampp/htdocs/test2/PEAR2_Net_RouterOS-1.0.0b6.phar/PEAR2_Net_RouterOS-1.0.0b6/src/PEAR2/Net/RouterOS/Client.php:175 Stack trace: #0 C:\xampp\htdocs\test2\example.php(8): PEAR2\Net\RouterOS\Client->__construct('ip', 'user', 'password') #1 {main}



I Don't figure it out why I'm getting the error.
where you able to fix this?
 
christophersarnillo
just joined
Posts: 1
Joined: Sun Apr 19, 2020 6:54 am

Re: Mikrotik API call not working

Sun Apr 19, 2020 4:39 pm

Hi everyone, for all of you that are workin with PEAR2 API, here is the solution:

1. Uncompress the .phar file
2. Go to the uncompressed folder -> PEAR2_Net_RouterOS-1.0.0b6\src\PEAR2\Net\RouterOS and edit the Client.php file
3. Find the _login function and modify it to look exactly like this:

private static function _login(
Communicator $com,
$username,
$password = '',
$timeout = null
) {
$request = new Request('/login');
$request->setArgument('name', $username);
$request->setArgument('password', $password);
$request->verify($com)->send($com);

$response = new Response($com, false, $timeout);
if ($response->getType() === Response::TYPE_FINAL) {
return null === $response->getProperty('ret');
} else {
while ($response->getType() !== Response::TYPE_FINAL
&& $response->getType() !== Response::TYPE_FATAL
) {
$response = new Response($com, false, $timeout);
}
return false;
}
}


4. Finally make sure you have the uncompressed and edited folder where you had your .phar file and change your project's php like this:

Replace -> require_once 'PEAR2_Net_RouterOS-1.0.0b6.phar'; for -> require_once 'PEAR2_Net_RouterOS-1.0.0b6/src/PEAR2/Autoload.php';

Now you should be able to connect with the new versions of RouterOS.
 
szwedolecko
just joined
Posts: 3
Joined: Wed Jul 31, 2013 9:42 pm

Re: Mikrotik API call not working

Thu Jun 18, 2020 11:47 pm

For Login Using Php API, you need change in: routeros_api.classv1.6.php

$this->write('=response=00' . md5(chr(0) . $password . pack('H*', $MATCHES[0][1])));

for

$this->write('=password=' . $password);
Not working for me.
its worked for me ;) thanks
 
salman4u
just joined
Posts: 1
Joined: Sun Sep 27, 2020 10:49 pm

Re: Mikrotik API call not working

Sun Sep 27, 2020 11:01 pm

When api is not connecting to the router and showing disconnect....., you need to change in: routeros_api.class.php
search (Login to RouterOS) in routeros_api.class.php
add this code
comment this line showing in code and add this code above this :
$this->write('=password=' . $password);
//$this->write('=response=00' . md5(chr(0) . $password . pack('H*', $MATCHES[0][1])));

function connect($ip, $login, $password)
{
for ($ATTEMPT = 1; $ATTEMPT <= $this->attempts; $ATTEMPT++) {
$this->connected = false;
$this->debug('Connection attempt #' . $ATTEMPT . ' to ' . $ip . ':' . $this->port . '...');
$this->socket = @fsockopen($ip, $this->port, $this->error_no, $this->error_str, $this->timeout);
if ($this->socket) {
socket_set_timeout($this->socket, $this->timeout);
$this->write('/login');
$RESPONSE = $this->read(false);
if ($RESPONSE[0] == '!done') {
$MATCHES = array();
if (preg_match_all('/[^=]+/i', $RESPONSE[1], $MATCHES)) {
if ($MATCHES[0][0] == 'ret' && strlen($MATCHES[0][1]) == 32) {
$this->write('/login', false);
$this->write('=name=' . $login, false);

..................................////////..........add this code....................
$this->write('=password=' . $password);
................................///////////.........comment this code.......................and save it
//$this->write('=response=00' . md5(chr(0) . $password . pack('H*', $MATCHES[0][1])));


$RESPONSE = $this->read(false);
if ($RESPONSE[0] == '!done') {
$this->connected = true;
break;
}
}
}
}
fclose($this->socket);
}
sleep($this->delay);
}
if ($this->connected){
$this->debug('Connected...');
}else{
$this->debug('Error...');
}
return $this->connected;
}


/**
* Disconnect from RouterOS
*
* @return void
*/
function disconnect()
{
fclose($this->socket);
$this->connected = false;
$this->debug('Disconnected...');
}
comment this code
$this->write('=response=00' . md5(chr(0) . $password . pack('H*', $MATCHES[0][1])));

for

$this->write('=password=' . $password);
 
Yako2023
just joined
Posts: 1
Joined: Fri Aug 04, 2023 9:46 pm

Re: Mikrotik API call not working

Sat Aug 05, 2023 12:36 pm

For Login Using Php API, you need change in: routeros_api.classv1.6.php

$this->write('=response=00' . md5(chr(0) . $password . pack('H*', $MATCHES[0][1])));

for

$this->write('=password=' . $password);
Thanks man you really help me !!!! I waste a cup of days trying this f... error, thank you very much!
hasta la vista

Who is online

Users browsing this forum: No registered users and 14 guests