The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My work

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,808 other followers

APC: getting ftp://ftp.apc.com/apc/public/software/pnetmib/mib/417/powernet417.mib turned out to be tricky

Posted by jpluimers on 2016/08/24

I tried updating my downloads for my APC7920 and APC7921 PDUs.

I knew the APC download site http://www.apc.com/nl/en/tools/download/index.cfm was slow and navigation unfriendly (lots of ERR_CACHE_MISS as you cannot ctrl-click on downloads), but it’s also buggy: Some of the ftp download URLs do not contain the authentication and one file would not download at all.

The solution for that is to prepend the credentials as username:password@ like these URLs where each first one is generated by the download site and each second one works:

  • ftp://ftp.apcc.com/restricted/hardware/nmcard/firmware/devipcfg_wiz/502/Device%20IP%20Configuration%20Wizard.exe
  • ftp://restrict:Kop$74!@ftp.apcc.com/restricted/hardware/nmcard/firmware/devipcfg_wiz/502/Device%20IP%20Configuration%20Wizard.exe
  • ftp://ftp.apc.com/restricted/hardware/nmcard/firmware/sec_wiz/104/SecWiz%201.04%20Install.exe
  • ftp://restrict:Kop$74!@ftp.apc.com/restricted/hardware/nmcard/firmware/sec_wiz/104/SecWiz%201.04%20Install.exe

The username is restrict and the password Kop$74! which requires single quotes on the command-line to prevent parameter and event expansion.

Otherwise you will get bash errors like these: event not found for the part starting with an exclamation mark and Login incorrect. for the parts having a dollar.

One file would not download at all: ftp://ftp.apc.com/apc/public/software/pnetmib/mib/417/powernet417 as all download attempts would time out:

  • Chrome with and without username:password@ (you will get a ERR_FTP_FAILED)
  • wget with and without username:password@ (it will result in a )
  • plain curl with and without username:password@ (it will result in a curl: (28) Timeout was reached)

The only command that would work was this:

curl -G ftp://ftp.apc.com/apc/public/software/pnetmib/mib/417/powernet417.mib > powernet417.mib

via: SimplicityGuy/pynoc – Travis CI

The trick is to:

  1. leave username and password away
  2. specify the -G (or –get) parameter forcing GET behaviour (which should be the default).

I’m not sure why it works, but it does.

–jeroen

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: