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.

There are 28,212 total registered users.


Recently Created Topics
Reverse Engineering ...
Jan/23
Career: DoD Agency I...
Jan/22
"Disappearing&q...
Jan/17
Career: Software Sec...
Jan/11
Where is the call st...
Jan/07
IDA Pro 6.1 Breakpoi...
Jan/01
How to create data s...
Dec/30
can i search all mod...
Dec/23
IDA symbol table exp...
Dec/20
An anti-attach trick
Dec/17


Recent Forum Posts
Reverse Engineering ...
NirIzr
"Disappearing&q...
NirIzr
Reverse Engineering ...
charlie
"Disappearing&q...
charlie
An anti-attach trick
Bass
An anti-attach trick
waleeda...
An anti-attach trick
Bass
An anti-attach trick
waleeda...
An anti-attach trick
Bass
Looking for value in...
NirIzr


Recent Blog Entries
Ludwig
Feb/04
chi on sale

Ludwig
Feb/04
Monster In The Vicinity Of ...

Ludwig
Feb/04
Supra footwear Online

waleedassar
Jan/31
Yet Another Anti-Debug Trick

RolfRolles
Jan/22
Finding Bugs in VMs with a ...

More ...


Recent Blog Comments
waleedassar on:
Feb/01
Yet Another Anti-Debug Trick

NirIzr on:
Jan/31
Yet Another Anti-Debug Trick

jackchen on:
Jan/10
nike mercurial vapor iii

waleedassar on:
Dec/27
A new Anti-Olly trick.

PeterFerrie on:
Dec/27
A new Anti-Olly trick.

More ...


Imagery
SoySauce Blueprint
Jun 6, 2008

[+] expand

View Gallery (11) / Submit