Input to program without command-line arguments

command line

Let's assume that there are no command-line arguments. How do you pass input data to a program?

I'm thinking you'd write the input to a file with a specific name, such that the program knows to open and read it as input. However, how would one discover the name of that file? Usually, running a command-line program without arguments or with some standard help argument (e.g. \?) produces some instruction on how to use it. But given an environment with no command-line arguments, how does one discover how to operate a program?

Best Answer

You can use tools to display all the hardcoded strings inside the application, and hopefully the filename will show up.

Check OllyDBG on Windows and strings on Linux (it's a cmd-line application).

A more complex solution: fire up your favorite asm debugger (OllyDBG, GDB) and get your hands dirty.

Related Topic