Log in

View Full Version : ollydbg command line parameter??


pillii
July 18th, 2005, 14:22
hello,
is it possible to start ollydbg with parameters so that olly attaches to a running process.
i think of something like
ollydbg -pid 12345
tia
pillii

Ricardo Narvaja
July 18th, 2005, 14:45
in the open window, there are a for put a argument see the open window of olly.

Ricardo Narvaja

pillii
July 18th, 2005, 15:07
thx for your reply, but that isnt quite what im looking for

i want to start ollydbg.exe with an argument so that olly attaches to a running process (identified by process id) right after olly startet
i dont want to start a debugee with a parameter, the debugee is already running and i just want olly to automatically attach to it

joe
July 18th, 2005, 15:08
I think, that this isn't possible directly. pillii want run it from commandline. Commandline support only name of attached file. Support program can indirect convert PID to name (?), then invoke Olly with this name. But why, when it can be attached after starting Olly?

EDIT: OPS I'm write too slowly.

pillii
July 18th, 2005, 15:51
thx for your quick answer

well, i want olly to do it automatically because im a lazy guy and could save 5 seconds..
i need to give olly the process id, because there are 2 instances of the debugee exe running
so giving olly the process name i would never know to what process olly attached.

blabberer
July 19th, 2005, 06:31
what do you mean give process name why not attach the one which you know by process id ??
how do you get the process id ?? using winspy ??
if yes attach directly

Unnamed window, item 6
Process=00000660 <----- whats the problem with using this value ??
Name=BKEYME1
Window=B-KEY-ME
Path=C:&#92;Documents and Settings&#92;xyz&#92;Desktop&#92;BkeyMe(Fixed)&#92;BKEYME1.EXE


Unnamed window, item 7
Process=00000668 <----- whats the problem with using this value ??

Name=BKEYME1
Window=B-KEY-ME
Path=C:&#92;Documents and Settings&#92;xyz&#92;Desktop&#92;BkeyMe(Fixed)&#92;BKEYME1.EXE

if you already know that value ??

pillii
July 19th, 2005, 09:44
i have a exe that creates a second process of the very same exe.
i wrote a plugin that makes some things with the exe and after that the plugin should run a new ollydbg that attaches to the created process.
i know the pid of the process. i just want to know if it is possible to run ollydbg with cmdline args so that olly attaches to the created process.
i can start olly with ollydbg.exe -my.exe, in this way olly creates a new process of the exe.
assume the following:
my.exe is running and there are 2 processes of it.
my.exe processid: 1000
my.exe processid: 2000
now i want to start olly in a way so that olly attaches to my.exe (pid:2000)
the following doesnt work
ollydbg.exe -pid 2000
is there a way to achieve this?
where are the commandline parameters for olly documented?

blabberer
July 20th, 2005, 05:07
i dont think ollydbg handles any other params apart from name of exe
also it doesnt handle redirection params as far as i know
i mean like in gdb you can use
gdb myblah < myinput.txt
if you pass the param < myinput.txt to ollydbg it wont be able to get the redirection

blabberer
October 6th, 2005, 13:46
well i stand corrected ollydbg can indeed launch applications with
pid thats how the jit debugger technique works

use ollydbg -p pid as commandline

take a look ath this thread
http://ollydbg.win32asmcommunity.net/?action=vthread&forum=1& topic=1505 ("http://ollydbg.win32asmcommunity.net/?action=vthread&forum=1&topic=1505")

Lord_Looser
October 7th, 2005, 04:32
ollydbg -AEDEBUG <pid> <EventHandle>
ollydbg -p <pid>
ollydbg -SERVICE ... //how is correct command line? what makes it?