in reply to Re^2: How to control input of an external program?
in thread How to control input of an external program?
You already have the general solution. (Send the input to the program's STDIN.) You're asking for a specific solution. (For some reason, curl reads the password from the tty, not STDIN.)