0

We inherited around 90 HPE 24 port switches of this model:

HPE OfficeConnect Switch 1820 24G PoE+ (185W) J9983A, PT.02.06, Linux 3.6.5, U-Boot 2012.10-00119 (Aug 31 2018 - 10:12:27)

And we're looking at how we could pull the config from them, to have config backups.

We could have a klick monkey web browse through all the switches and login, navigate the menu and eventually click to download the file (seems to be a binary blob) via HTTP. That would be acceptable for a one-time event while doing some config cosmetics manually, but in the long run (scheduled backups), that would be awful.

It seems that the final click on the download button results in a web request like

http://<ip>/htdocs/pages/base/file_http_download.lsp?name=hp1820_24G_PoE.cfg&file=/mnt/download/hp1820_24G_PoE.cfg&token=1656577331846

But contracting this to ...

http://<ip>/mnt/download/hp1820_24G_PoE.cfg

... fell short and got a 404, and probably was a stupid idea to start with. Proper configured webservers should never allow such things, anyway.

QUESTION:

Do you know another way to get/pull the config file directly from such a switch? We generally use Kiwi Cattools to run such tasks, but it's more geared towards systems that have a CLI and text-parseable configs (at least the somewhat dated version we have).

Thanks for your thoughts hints and pointers

Marc

1 Answer 1

1

You can't use a parameter path (visible to the http daemon) as a URL path (visible to the HTTP client) since that isn't (and shouldn't be) served directly - as you've noticed yourself.

I'm afraid, there's no simple URL call that you can use. What I did for the 1810 series is to monitor the appropriate GUI steps (login, change to admin pane and download backup) with Firefox's developer tools (on the Network tab). Here you can conveniently Copy as cURL which you can then use to script via bash, cmd or Powershell. The 1810s actually required you to properly log out afterwards, otherwise the residue made successive sessions fail weirdly.

Sorry, I don't have access to those scripts any more and I do remember that the 1820s are very different anyway, but I'm sure that the same curl method works there as well (I've used that with various services).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.