Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test CHR & RouterOS (6.48.6/6.49.6/7.4) without results #1

Open
danielcshn opened this issue Jul 30, 2022 · 1 comment
Open

Test CHR & RouterOS (6.48.6/6.49.6/7.4) without results #1

danielcshn opened this issue Jul 30, 2022 · 1 comment

Comments

@danielcshn
Copy link

Test:
Versión: CHR RouterOS v6.48.6 (long-term)
OS: Windows 10 21H2 19044.1826
JAVA: java 18.0.2 2022-07-19

java -jar "ROSMenuLister.jar" test.json 192.168.88.1 admin
Connecting...OK.
Logging into shell...
OK.
Pressing Enter (to clear the command line and find out the command prompt).
java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1

Test:
Versión: CHR RouterOS v6.49.6 (stable)
OS: Windows 10 21H2 19044.1826
JAVA: java 18.0.2 2022-07-19

java -jar "ROSMenuLister.jar" test.json 192.168.88.1 admin admin
Connecting...OK.
Logging into shell...
OK.
Pressing Enter (to clear the command line and find out the command prompt).
java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1

Test:
Versión: CHR RouterOS v7.4 (stable)
OS: Windows 10 21H2 19044.1826
JAVA: java 18.0.2 2022-07-19

java -jar "ROSMenuLister.jar" test.json 192.168.88.1 admin admin
Connecting...OK.
Logging into shell...
OK.
Pressing Enter (to clear the command line and find out the command prompt).
Staring to parse.
Parsing menu ""
Listed all menus
Listed all commands
Listed all arguments
JSON generated
Exiting

Result test.json:

{"summary":"7.4","name":"","submenus":[],"commands":[]}

Test:
Mikrotik: RB4011iGS+5HacQ2HnD-IN
Versión: RouterOS v6.49.6 (stable)
OS: Windows 11 21H2 22000.795
JAVA: java version "1.8.0_321"

java -jar "ROSMenuLister.jar" test.json 192.168.88.1 admin admin
Connecting...OK.
Logging into shell...
OK.
Pressing Enter (to clear the command line and find out the command prompt).
Staring to parse.
Parsing menu ""
java.lang.ArrayIndexOutOfBoundsException: -1

Test:
Mikrotik: RBD52G-5HacD2HnD (hAP ac²)
Versión: RouterOS v7.3 (stable)
OS: Windows 10 21H2 19044.1826
JAVA: java 18.0.2 2022-07-19

java -jar "ROSMenuLister.jar" test.json 192.168.88.1 admin admin
Connecting...OK.
Logging into shell...
OK.
Pressing Enter (to clear the command line and find out the command prompt).
Staring to parse.
Parsing menu ""
Listed all menus
Listed all commands
Listed all arguments
JSON generated
Exiting

Result test.json:

{"summary":"7.3","name":"","submenus":[],"commands":[]}
@boenrobot
Copy link
Owner

boenrobot commented Jul 31, 2022

This project was made in the ancient times of RouterOS 6.2, and hasn't been kept compatible since.

It should've in theory worked for any version, but I guess MikroTik changed their shh output in an incompatible fashion.

I was never the original author, and I don't have the time to maintain this. I haven't asked, but I am pretty sure the original author doesn't have the desire to maintain it either.

I would happily welcome PRs, or even a pointer to a separate, more fully maintained project.

EDIT: From a cursory inspection of the source (without any testing...) I'm guessing the problem in the case of the 7 is that they changed the colors for commands and menus, or maybe added some bolds and stuff. The marker that this is looking for is hardcoded, rather than inferred. I did at one point think to change it so that it looks for a known command in the root menu that's unlikely to ever change (e.g. "quit"), and a menu that is likely to always be present and under the same name (e.g. "system") and infer the colors out of that... But I never got around to coding it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants