Flag: Tornado! Hurricane!

 Forums >>  IDA Pro  >>  Bug -- proc_peek_recon.py

Topic created on: January 17, 2010 22:57 CST by Jer .

It seems there is a bug in proc_peek_recon.  The script attempts to add together two generators:

...

done. looked at 66044 heads.
looking for potentially interesting API calls now.
enumerating xrefs to _strcat
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Program Files\IDA\python\init.py", line 65, in runscript
    execfile(script, g)
  File "C:/Documents and Settings/XXXXX/Desktop/paimei/proc_peek_recon.py", line 206, in <module>
    for xref in CodeRefsTo(location, True)+DataRefsTo(location):
TypeError: unsupported operand type(s) for +: 'generator' and 'generator'

Anyone else see this?

  ero     January 20, 2010 06:14.44 CST
That's a common problem in later versions of IDAPython. CodeRefsTo and DataRefsTo used to return lists but nowadays return generators. A way of fixing that code would be wrapping the calls with list() like this:

for xref in list(CodeRefsTo(location, True))+ list(DataRefsTo(location)):

that will simply populate the lists with all the items provided by the generator. The list objects can be added together so the code will then behave as it used to.

Note: Registration is required to post to the forums.

Active in Last 5 Minutes
excavationfondations
bigines

There are 21,678 total registered users.


Recently Created Topics
PyEmu error when cal...
Sep/02
Restore Themida/Winl...
Sep/02
Anti-olly technique
Aug/30
RAR Password
Aug/29
Heap protection on W...
Aug/23
Why Inline asm in C+...
Aug/20
Bypassing OllyAdvance
Aug/17
Error in logic for g...
Aug/17
Has anyone seen this...
Aug/17
ARM Executable - Pat...
Aug/16


Recent Forum Posts
reverse engineering ...
raiden56
pydbg, memory breakp...
Researc...
RAR Password
Ineedhelp
RAR Password
cod
Heap protection on W...
voila
Heap protection on W...
j00ru
Heap protection on W...
voila
Heap protection on W...
j00ru
Heap protection on W...
psylocn
Why Inline asm in C+...
ronnie2...


Recent Blog Entries
meshmesh
Sep/01
Is it legal??

waleedassar
Aug/30
Anti-olly technique

QvasiModo
Aug/24
WinAppDbg 1.4 is out!

artemblagodarenko
Aug/18
Dataflow-0.2.0 released. Ne...

grzonu
Aug/17
Bypassing OllyAdvanced

More ...


Recent Blog Comments
tosanjay on:
Sep/02
PyEmu 0.0.2

GynvaelColdwind on:
Sep/01
Is it legal??

PeterFerrie on:
Aug/31
Anti-olly technique

dennis on:
Aug/26
Dr. Gadget IDAPython plugin

halsten on:
Aug/19
Dataflow-0.2.0 released. Ne...

More ...


Imagery
SoySauce Blueprint
Jun 6, 2008

[+] expand

View Gallery (11) / Submit