Сейчас на форуме: vsv1, Alf (+4 невидимых)

 eXeL@B —› Вопросы новичков —› Condition Log Breakpoint, какие можно использовать команды в нижнем окне.
Посл.ответ Сообщение

Ранг: 30.1 (посетитель)
Активность: 0.070
Статус: Участник

Создано: 01 октября 2015 19:46 · Поправил: Kuzya69
· Личное сообщение · #1

По сути вопрос весь в заголовке этой темы.
Хочу поставить ветвление в обработчике, но команды, которые используются в скриптовом языке, не подходят. Не понятно, как метку установить.

"If program pauses, pass following commands to plugins"
Есть-ли у кого инструкция по командам для этого поля ?



Ранг: 64.9 (постоянный), 47thx
Активность: 0.120.02
Статус: Участник

Создано: 01 октября 2015 22:59
· Личное сообщение · #2

olly help file
Code:
  1. Conditional logging breakpoint allows you to specify plugin commands that will be executed if break condition is met. To pass breakpoints to command line plugin, precede it with the point, for example: 
  2.  
  3. .EAX=0
  4. .RUN
  5.  
  6. Detailed description of examples:
  7.  
  8.  
  9. ·        CALC EAX/2+1 - calculates value of expression and displays it in hexadecimal format. Register belongs to the thread selected in CPU window;
  10. ·        2*2 - calculates value of expression (4) and displays it in hexadecimal format;
  11. ·        WATCH +[460030+ESI] - adds watch that displays context of doubleword memory at address 0x460030+ESI in decimal and hexadecimal formats;
  12. ·        SET AL=0 - changes value of register AL in currently selected thread to 0;
  13.  
  14. ·        SET ESI=[DWORD EDI-10] - gets contents of doubleword memory at EDI-10 and writes it to ESI. Both ESI and EDI belong to the thread selected in CPU;
  15. ·        SET [410000]=80000001 - changes contents of doubleword memory at address 0x410000 to 0x80000001. Note that, unlike Disassembler or CPU Dump, command-line plugin does not create backup copy of modified memory block!
  16. ·        A 410000, XOR EAX,EAX - changes command at 0x410000 to XOR EAX,EAX;
  17.  
  18. ·        L EAX, loopstart - assigns name "loopstart" to address EAX;
  19. ·        BP EAX+10 - sets unconditional breakpoint at address EAX+10;
  20. ·        BP 410010, EAX==WM_CLOSE - sets conditional breakpoint at address 0x410010. Program breaks if register EAX is equal to symbolic constant WM_CLOSE;
  21. ·        BP Kernel32.GetProcAddress - sets unconditional breakpoint at function GetProcAddress in module KERNEL32;
  22. ·        BPX CreateFileA - set breakpoint on every call to external function CreateFileA from the module that is currently selected in Disassembler window.




Ранг: 30.1 (посетитель)
Активность: 0.070
Статус: Участник

Создано: 01 октября 2015 23:23 · Поправил: Kuzya69
· Личное сообщение · #3

Маловато будет.

Я тут проверил несколько вариантов еще, для примера.
var count3 - объявляет переменную count3, которая действует на протяжении всего сеанса Olly
log [esp] - печатает в окно лога [esp] : и его значение
var value - объявляет переменную value, которая действует на протяжении всего сеанса Olly
mov value, [esp]
add value, edx
log value - печатает в окно лога value : и его значение
log "'pop dw[edx]'; w" + "rite value" - печатает в окно лога 'pop dw[edx]'; write value
log [ebp+71c00a5] - печатает в окно лога [ebp+71c00a5] : и его значение
inc count3
run - продолжает исполнение кода дебагером после брейкпоинта
go eax - продолжает исполнение кода дебагером с адреса eax в отлаживаемой проге.
Это так, для справки, если кому-то понадобится.

Но все равно эксперименты использовать jmp или goto, не увенчались успехом. Может просто надо метку как-то по другому ставить, не как в скриптах?



Ранг: 64.9 (постоянный), 47thx
Активность: 0.120.02
Статус: Участник

Создано: 02 октября 2015 01:12
· Личное сообщение · #4

Это
Command line plugin
команды, из того же хелп файла.

Далеко не факт что ODBGscript Олькины команды понимает.



Ранг: 64.9 (постоянный), 47thx
Активность: 0.120.02
Статус: Участник

Создано: 03 октября 2015 13:17 · Поправил: hash87szf
· Личное сообщение · #5

Пробовал вот под 2ую Ольку выпущенный Скриптплаг, в хелп:
Code:
  1. ODbgScript > 
  2. Integration with other plugins  Previous Next  
  3.  
  4. You can call OllyScript from your plugin and make it execute a script.
  5. Use something like the source code below:
  6.  
  7. HMODULE hMod = GetModuleHandle("ODbgScript.dll");
  8. if(hMod)                                                                                      // Check that the other plugin is present and loaded
  9. {
  10.  int (*pFunc)(char*) = (int (*)(char*)) GetProcAddress(hMod, "ExecuteScript"); // Get address of exported function
  11.  if(pFunc)                                                                                    // Check that the other plugin exports the correct function
  12.   pFunc("myscript.txt"); // Execute exported function
  13. }
  14.  
  15. DebugScript dll entry is also available.
  16.  
  17. <b>You can also execute script commands via OllyDBG ODBG_plugincmd() 
  18. and in Conditional Log Breakpoints.</b>


Code:
  1. EXEC/ENDE 
  2.  
  3.  
  4. --------------------------------------------------------------------------------
  5.  
  6. Executes instructions between EXEC and ENDE in the context of the target process.
  7. Values in curly braces {} are replaced by their values.
  8. PUSHA / POPA commands could be useful when you use this.
  9.  
  10.  
  11. Example 1:  This executes some mov's
  12.      mov x, "eax"
  13.      mov y, DEADBEEF
  14.      exec
  15.      mov {x}, {y}              // mov eax, 0DEADBEEF will be executed
  16.      mov ecx, {x}            // mov ecx, eax will be executed
  17.      ende
  18.  
  19. Example 2:  This calls ExitProcess in the debugged application
  20.      exec
  21.      push 0
  22.      call ExitProcess
  23.      ende
  24.      ret
  25.  



 eXeL@B —› Вопросы новичков —› Condition Log Breakpoint, какие можно использовать команды в нижнем окне.
:: Ваш ответ
Жирный  Курсив  Подчеркнутый  Перечеркнутый  {mpf5}  Код  Вставить ссылку 
:s1: :s2: :s3: :s4: :s5: :s6: :s7: :s8: :s9: :s10: :s11: :s12: :s13: :s14: :s15: :s16:


Максимальный размер аттача: 500KB.
Ваш логин: german1505 » Выход » ЛС
   Для печати Для печати