bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] multiple constant parameters


From: Szépe Viktor
Subject: Re: [Bug-wget] multiple constant parameters
Date: Thu, 05 Jun 2014 01:30:57 +0200
User-agent: Internet Messaging Program (IMP) H5 (6.1.7)

Oh! Thank you very much for the fd!

HTTP_PW="$(pwgen 43 1)"

wgetrc() {
  echo http-user=user
  echo http-password=$HTTP_PW
}

WGETRC="<(wgetrc)" wget -d http://www.secretsite.net


Idézem/Quoting Ángel González <address@hidden>:

I *think* wget only reads the wgetrc file once. So, provided you are using bash (you are) and run it on a OS with support for reading a fd from a path in /proc (which is also most likely) then you can replace the wgetrc with a script, which presumably can determine if it's safe to decrypt the secret and retrieve the password from secure storage.

$ cat script.sh
#!/bin/sh
echo http-user=user
echo http-password=$(pwgen 43 1)

And then we can run:
WGETRC=<(./script.sh) wget -d http://www.secretsite.net

which would provide a different password for accesing the site on each run.


Szépe Viktor
--
+36-20-4242498  address@hidden  skype: szepe.viktor
Budapest, XX. kerület







reply via email to

[Prev in Thread] Current Thread [Next in Thread]