View Full Version : Pass variabes to Ollydbg while running
CEO76
August 24th, 2007, 19:23
I have an executable file, when click on icon from the desktop to run the file, it runs ok, check on the properties (right hhand click) on the icon, I found this
C:\xxxx\exe\Win32\xxxxxxx.exe -r -d DEFAULT -e xxxxxxxxxx.bat
Sorry I don't want to show the file name and folder name.
Look at the above line, it means to me when the program runs, it will pass those variables to the execute xxxxxxxxx.exe.
When I load this target into Ollydbg, there is a msg saying that the program need those parameter (-r, -d, -e) to be able to run.
Can anyone tell me how to feed those parameter in ollydbg to help pass this step.
Thanks
CEO76
blurcode
August 24th, 2007, 20:49
Look for "Arguments" in open dialog.
JMI
August 24th, 2007, 20:57
CEO76:
I edited your Post to remove the name of the "***.bat" file, since it looked like it could have actually been part of the targetname identification.
Regards,
CEO76
August 24th, 2007, 20:58
Could you tell me more in detail about the "Argument" and where I located it, is that within Ollydbg?
Thanks
naides
August 24th, 2007, 21:11
in the debug tab->arguments option try manually writing whatever:
-r -d DEFAULT -e xxxxxxxxxx.bat
might be.
Arguments are the command line parameters that old style/linux style programs read from text based environments.
GUI Windows emulate such (widespread used in the multi-platform world) command line parameters by the settings fed to the shorcuts.
Because Olly cannot load executables via shorcuts, you have to provide the command line parameters yourself manually.
Kayaker
August 24th, 2007, 21:32
You can also start Olly from the Windows Start/Run menu and pass the full pathname of the executable plus any arguments.
For example, from the Start/Run menu you can run Msinfo32 with the command line argument /? (which displays the help file)
msinfo32.exe /?
Now you just extend that to run it under Olly:
C:\OllyDbg\OLLYDBG.EXE C:\WINDOWS\system32\dllcache\msinfo32.exe /?
So for your example it would be something like
C:\OllyDbg\OLLYDBG.EXE C:\xxxx\exe\Win32\xxxxxxx.exe -r -d DEFAULT -e xxxxxxxxxx.bat
blurcode
August 24th, 2007, 22:29
Quote:
[Originally Posted by CEO76;68035]Could you tell me more in detail about the "Argument" and where I located it, is that within Ollydbg?
Thanks |
File -> Open (see attached image).
LLXX
August 24th, 2007, 22:34
Quote:
[Originally Posted by blurcode]A picture worth 1K words (or .5K DWORDS). |

Kayaker
August 25th, 2007, 02:30
Well yeah..if you want to do it the
right way...

CEO76
August 25th, 2007, 06:26
Thank you all for your great support on the question I posted. You all deserve to be leaders in this forum (blurcode, JMI, naides, Kayaker)
Again, appreciate.
CEO76
blabberer
August 25th, 2007, 11:15
and if what blurcode suggested is insufficient (like you want ot change your original argument midway or you want several last arguments you passsed to be remembered by ollydbg in a drop down box or you dont like kayakers way of commandline passing of arguments
you can use the attached image below

LLXX
August 25th, 2007, 22:37
...or bp GetCommandLineA and change the buffer, duh.
Powered by vBulletin® Version 4.2.2 Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.