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

Binardat web managed switches #8

Open
dennyreiter opened this issue Jan 25, 2025 · 3 comments
Open

Binardat web managed switches #8

dennyreiter opened this issue Jan 25, 2025 · 3 comments

Comments

@dennyreiter
Copy link
Contributor

I recently purchased a Binardat web managed switch. It's almost the same, but uses a different authentication with a cookie. It's barely authentication, you can get around it pretty easily.

I created a project (base upon this one,) to try and get stats out of these switches, but my Go programming experience level is low, and frankly I wouldn't call myself a good programmer regardless :)

https://github.com/dennyreiter/binardat-switch-exporter

With Curl, I can get the cookie and then send it back and receive the stats page, but using Go, I can't seem to get it to work. I figured if I posted here, maybe someone with one of these switches could possibly find it and want to help.

Thanks so much for this project!

@pvelati
Copy link
Owner

pvelati commented Feb 3, 2025

Hello @dennyreiter , I can try something. can you write here the curl command that you use to get the cookie?
The target page is the same? I mean https://github.com/pvelati/cheap-switch-exporter/blob/main/main.go#L55

From https://www.binardat.com/download/ I found:

  • Industrial-Switch-CLI-User-Manual-Binardat.pdf (are you sure you cannot access it though cli ?)
  • Industrial-Switch-WEB-User-Manual-Binardat.pdf (I see that the webui is different)
  • Web_User_Manual_L3_v1.3.pdf (this is for L3 stuff, I don't think is useful)

@dennyreiter
Copy link
Contributor Author

I used this:

curl -X POST http://192.168.2.1/login.cgi -d "data=username=admin&password=admin" -c /tmp/cookies.txt
curl -X POST http://192.168.2.1/login.cgi -c /tmp/cookies.txt

But it appears the authentication is done via javascript on the login page, and the cookie is offered regardless!

Then, using that cookie, the port stats are accessible like this:

curl "http://192.168.2.1/port.cgi?page=stats" --cookie /tmp/cookies.txt

Here is my repository with the info and my work so far, including the HTML from the login page

https://github.com/dennyreiter/binardat-switch-exporter

The main problem seems to be my GoLang skills and sending the cookie properly.

Thanks!

@pvelati
Copy link
Owner

pvelati commented Feb 13, 2025

Hello again, can you try with the branch feature/try-integrate-binardat ?
I don't have this type of switch so I can't test 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