Code Monkey home page Code Monkey logo

Comments (30)

wdjag avatar wdjag commented on July 30, 2024 5

Hey mate, use command
composer require pear2/net_transmitter:1.0.0b1 pear2/cache_shm pear2/net_routeros:dev-develop@dev
It's work ;)

$php roscon.php -v IP USER PASSWORD
MODE |   LENGTH    |    LENGTH    |  CONTENTS
     |  (decoded)  |  (encoded)   |
-----|-------------|--------------|--------------------------------------------
NOTE |     Connection started     |
SEND |    <prompt> |     <prompt> | /system/package/print

SEND |    <prompt> |     <prompt> |

SENT |          21 |         0x15 | /system/package/print
SENT |           0 |         0x00 |
RECV |           3 |         0x03 | !re
RECV |           7 |         0x07 | =.id=*1
RECV |          21 |         0x15 | =name=routeros-mipsbe
RECV |          15 |         0x0F | =version=6.45.1
RECV |          32 |         0x20 | =build-time=jun/27/2019 10:23:23
RECV |          11 |         0x0B | =scheduled=
RECV |          15 |         0x0F | =disabled=false
RECV |           0 |         0x00 |
SEND |    <prompt> |     <prompt> | 


from net_routeros.

maxwellrm avatar maxwellrm commented on July 30, 2024 5

i solved with this, and work (mikrotik version 6,48)

Net_RouterOS/src/PEAR2/Net/RouterOS/Client.php between line 288 and 299

Changed this
$request = new Request('/login'); $request->send($com); $response = new Response($com, false, $timeout); $request->setArgument('name', $username); $request->setArgument( 'response', '00' . md5( chr(0) . $password . pack('H*', $response->getProperty('ret')) ) ); $request->verify($com)->send($com);

to
$request = new Request('/login'); $request->send($com); $response = new Response($com, false, $timeout); $request->setArgument('name', $username); $request->setArgument('password', $password); $request->verify($com)->send($com);

from net_routeros.

maximiliandallmair avatar maximiliandallmair commented on July 30, 2024 3

i still need a solution

from net_routeros.

ultimus247 avatar ultimus247 commented on July 30, 2024

We are experiencing the same issue. Upgraded to 6.45 and our login broke. We were using version b5 instead of b6 but on upgrading to the new .phar file we get the following error:
exception 'Exception' with message 'Class PEAR2\Net\RouterOS\Client could not be loaded from PEAR2/Net/RouterOS/Client.php, file does not exist (registered paths="phar:///public_html/PEAR2_Net_RouterOS-1.0.0b6file.phar/PEAR2_Net_RouterOS-1.0.0b6/src") [PEAR2_Autoload-@PACKAGE_VERSION@]' in phar:///public_html/PEAR2_Net_RouterOS-1.0.0b6file.phar/PEAR2_Net_RouterOS-1.0.0b6/src/PEAR2/Autoload.php:305
Stack trace:
#0 [internal function]: PEAR2\Autoload::load('PEAR2\Net\Route...')
#1 /public_html/sshtest.php(22): spl_autoload_call('PEAR2\Net\Route...')
#2 {main}

from net_routeros.

boenrobot avatar boenrobot commented on July 30, 2024

Can you try installing the "dev-develop" version with composer?

There is a new login algorithm in 6.43+, though the old one should've remained supported for a while by RouterOS. Regardless, this new algorithm is supported in dev-develop.

This comment suggests not even dev-develop works with 6.45+, but again, I'll need some more information to debug.

from net_routeros.

boenrobot avatar boenrobot commented on July 30, 2024

I just tried to replicate with dev-develop, and I can't.

I can succesfully login to an 6.45.1 x86 VM using dev-develop.

However, 1.0.0b6 (and therefore dev-master) does fail to login, and the roscon message is clear enough that the error is on login. Of course, it doesn't include "new login protocol" in the list of possible reasons, since that wasn't a thing then.

from net_routeros.

ultimus247 avatar ultimus247 commented on July 30, 2024

I was able to install composer and get the beta version with
php composer.phar require pear2/net_routeros:@beta
however I cannot seem to find the branch for dev-develop, I tried
php composer.phar require pear2/net_routeros:
@dev
but that one didnt work.

Sorry been at this all morning the pear seems to be no longer supported, and the phar creation through pyrus is no longer able to be downloaded. Looks like composer is our last resort here.

from net_routeros.

ultimus247 avatar ultimus247 commented on July 30, 2024

OK I got the develop files from the git repository, now just trying to figure out how to make composer use the local develop branch of the git project.

from net_routeros.

boenrobot avatar boenrobot commented on July 30, 2024

composer require pear2/net_routeros:dev-develop@dev

from net_routeros.

maximiliandallmair avatar maximiliandallmair commented on July 30, 2024

any news?

from net_routeros.

umarzahid028 avatar umarzahid028 commented on July 30, 2024

any update??

from net_routeros.

nickarellano avatar nickarellano commented on July 30, 2024

any news?
any update??

Authentication is working on the dev-develop branch.

from net_routeros.

maximiliandallmair avatar maximiliandallmair commented on July 30, 2024

pear install pear2.php.net/PEAR2_Net_RouterOS-dev-develop@dev
parsePackageName(): only one version/state delimiter "-" is allowed in "pear2.php.net/PEAR2_Net_RouterOS-dev-develop@dev"
invalid package name/package file "pear2.php.net/PEAR2_Net_RouterOS-dev-develop@dev"
install failed

from net_routeros.

boenrobot avatar boenrobot commented on July 30, 2024

develop versions are not available over PEAR(2) in any way.

And in fact, it seems like the pear2.php.net website has silently went down, meaning no PEAR2 package can be installed at all over PEAR.

They can only be installed via composer, as shown above. I'll try to make a phar soon, but if you're using composer, you can use it right now.

from net_routeros.

maximiliandallmair avatar maximiliandallmair commented on July 30, 2024

I'll try to make a phar soon
how soon?

from net_routeros.

adam-gweleg avatar adam-gweleg commented on July 30, 2024

composer require pear2/net_routeros:dev-develop@dev

can't install develop@dev

PS C:\xampp\htdocs\2> composer require pear2/net_routeros:dev-develop@dev
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Installation request for pear2/net_routeros dev-develop@dev -> satisfiable by pear2/net_routeros[dev-develop].
- pear2/net_routeros dev-develop requires pear2/net_transmitter >=1.0.0b1 || dev-develop@dev -> satisfiable by pear2/net_transmitter[1.0.0b1, 1.0.0b2, dev-develop, dev-master] but these conflict with your requirements or minimum-stability.

Installation failed, deleting ./composer.json.

from net_routeros.

bluwebz avatar bluwebz commented on July 30, 2024

Thank you very much @wdjag
Its work for me.

from net_routeros.

maximiliandallmair avatar maximiliandallmair commented on July 30, 2024

still need pear solution¨
dont have composer

from net_routeros.

andrearos avatar andrearos commented on July 30, 2024

Thank you @wdjag!!!!!!!
I'm searching for a solution for weeks!
It works for me!

from net_routeros.

egoan82 avatar egoan82 commented on July 30, 2024

Hey mate, use command
composer require pear2/net_transmitter:1.0.0b1 pear2/cache_shm pear2/net_routeros:dev-develop@dev
It's work ;)

$php roscon.php -v IP USER PASSWORD
MODE |   LENGTH    |    LENGTH    |  CONTENTS
     |  (decoded)  |  (encoded)   |
-----|-------------|--------------|--------------------------------------------
NOTE |     Connection started     |
SEND |    <prompt> |     <prompt> | /system/package/print

SEND |    <prompt> |     <prompt> |

SENT |          21 |         0x15 | /system/package/print
SENT |           0 |         0x00 |
RECV |           3 |         0x03 | !re
RECV |           7 |         0x07 | =.id=*1
RECV |          21 |         0x15 | =name=routeros-mipsbe
RECV |          15 |         0x0F | =version=6.45.1
RECV |          32 |         0x20 | =build-time=jun/27/2019 10:23:23
RECV |          11 |         0x0B | =scheduled=
RECV |          15 |         0x0F | =disabled=false
RECV |           0 |         0x00 |
SEND |    <prompt> |     <prompt> | 

Excelente con esto logre solucionar el problema de inicio de sesión.
Excellent with this I managed to solve the login problem.

from net_routeros.

mvalsasna avatar mvalsasna commented on July 30, 2024

develop branch + Net/Transmitter 1.0.0a3 1.0.0b2 work for me on routeros 6.45.6, thanks

is there a plan to release a Net/RouterOS RELEASE-1.0.0b7?

thanks for the good work

MAtteo

from net_routeros.

leo-combes avatar leo-combes commented on July 30, 2024

Thanks @wdjag, work like a charm!

from net_routeros.

blindrain avatar blindrain commented on July 30, 2024

Still, Waiting on Net/RouterOS RELEASE-1.0.0b7? phar file.

from net_routeros.

Kamauink avatar Kamauink commented on July 30, 2024

So I can get the roscon.php file to connect seamlessly, however using both the Net/RouterOS RELEASE-1.0.0b6 and composer dev-develop@dev, I get a http 500 reply with no further info... anybody with a workaround?

from net_routeros.

Kamauink avatar Kamauink commented on July 30, 2024

Hey mate, use command
composer require pear2/net_transmitter:1.0.0b1 pear2/cache_shm pear2/net_routeros:dev-develop@dev
It's work ;)

$php roscon.php -v IP USER PASSWORD
MODE |   LENGTH    |    LENGTH    |  CONTENTS
     |  (decoded)  |  (encoded)   |
-----|-------------|--------------|--------------------------------------------
NOTE |     Connection started     |
SEND |    <prompt> |     <prompt> | /system/package/print

SEND |    <prompt> |     <prompt> |

SENT |          21 |         0x15 | /system/package/print
SENT |           0 |         0x00 |
RECV |           3 |         0x03 | !re
RECV |           7 |         0x07 | =.id=*1
RECV |          21 |         0x15 | =name=routeros-mipsbe
RECV |          15 |         0x0F | =version=6.45.1
RECV |          32 |         0x20 | =build-time=jun/27/2019 10:23:23
RECV |          11 |         0x0B | =scheduled=
RECV |          15 |         0x0F | =disabled=false
RECV |           0 |         0x00 |
SEND |    <prompt> |     <prompt> | 

So I can get the roscon.php file to connect seamlessly, however using both the Net/RouterOS RELEASE-1.0.0b6 and composer dev-develop@dev, I get a http 500 reply with no further info... anybody with a workaround?

from net_routeros.

boenrobot avatar boenrobot commented on July 30, 2024

Seems like you have another problem in your file that causes either a syntax error, or a fatal error before you even reach the authentication point.

Can you give an example full file you're trying to use?

from net_routeros.

Kamauink avatar Kamauink commented on July 30, 2024

Seems like you have another problem in your file that causes either a syntax error, or a fatal error before you even reach the authentication point.

Can you give an example full file you're trying to use?

Here's my script:
Screenshot from 2020-07-17 13-43-58

i'm just trying to initiate a simple connection to the router, so as I was saying when I run "php roscon.php -v 192.168.88.1 user password" it works perfectly, but when i use the script, including classes from dev-develop@dev and PEAR2_Net_RouterOS-1.0.0b6', I get the 500 error. I have also downgraded to various versions of RouterOS with no luck.

from net_routeros.

boenrobot avatar boenrobot commented on July 30, 2024

That's not composer's autoloader, that's PEAR2's autoloader there. If you're installing from composer, you should be using the composer autoloader in vendor/autoload.php.

from net_routeros.

Kamauink avatar Kamauink commented on July 30, 2024

from net_routeros.

k3nshjnz avatar k3nshjnz commented on July 30, 2024

Can anyone update .phar file?

from net_routeros.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.