Seb N
Seb N

Reputation: 21

simulate user input when calling Windows executable

I am trying to pass a password into a Windows executable (simulating user input). Whenever I try to do that I get "no console available for secure input". The executable is an ORACLE executable called cdxdbi.

I am trying to call it like this:

CDXDBI.exe < params

where params is a file containing the password. Without the paramters the executable brings up a cmd terminal prompting for the password (twice).

How can I inject parameters into the terminal? I do not have more information on the exe, unfortunately. Anyone had the same issue and can provide a solution?

Best regards, Sebastian

Upvotes: 1

Views: 1618

Answers (1)

David Ruhmann
David Ruhmann

Reputation: 11367

Assuming the following

  • CDXDBI is a console based application
  • The password prompt is the first and second line reads of stdin

Something like this might work

(
    echo Password
    echo Password
)| CDXDBI.exe

Otherwise, you will have to use one an external tool like mentioned in the comments.

Upvotes: 1

Related Questions