Click here to Skip to main content
15,671,266 members
Please Sign up or sign in to vote.
2.67/5 (3 votes)
See more:
I have program steghide,
Steghide is a steganography program that is able to hide data in various kinds of image- and audio-files. The color- respectivly sample-frequencies are not changed thus making the embedding resistant against first-order statistical tests.[^]

I try set parameters

System.Diagnostics.Process.Start("steghide.exe", "-sf" "picture.jpg");
I run the program. And it shows
steghide extract -sf picture.jpg
  Enter passphrase:
  wrote extracted data to "secret.txt

How to pass parameter password

1 solution

First, read the documentation of "steghide.exe". You need to be able to pass a pass phrase as another parameter. If this command line parameter is not available, the solution is still possible, see below.

But first, look at all of the methods System.Diagnostics.Process.Start at[^].

There is not such signature you are trying to use, the code won't compile. You can use Process.Start(string, string):

System.Diagnostics.Process.Start("steghide.exe", "-sf picture.jpg");

In this usage, all parameters go in one string, separated with the blank character:[^].

Now, coming back to the situation when there is no a command line parameter for your pass phrase:

It's worse, then you need to simulate the user input. This is done by using System.Diagnostics.Process.StandardInput. You will need to redirect it. Do do this, you will need to use the process Start(ProcessStartInfo) method.

Make sure you prescribe redirection option in your process start info, see:[^],[^].

You will find a code sample with redirection here:[^].

You need to write your value of the pass phrase to the redirected string where required.

Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900