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
Invisible

There are 16,646 total registered users.


Recently Created Topics
SSL keyfindert plugi...
Mar/15
ApiHooks.com down
Mar/15
how to crate a PATC...
Mar/10
wsnpoem audio.dll
Mar/09
suggestions - RE tra...
Mar/09
Requesting Suggestio...
Mar/06
Force enable debug p...
Mar/05
upgrading new image ...
Mar/03
upgrading new image ...
Mar/03
upgrading new image ...
Mar/03


Recent Forum Posts
suggestions - RE tra...
enm16
wsnpoem audio.dll
zhane
suggestions - RE tra...
Silkut
how to crate a PATC...
Silkut
suggestions - RE tra...
RolfRolles
wsnpoem audio.dll
debbie
Requesting Suggestio...
secursig
Requesting Suggestio...
phn1x
how to get executabl...
RabidCi...
how to get executabl...
RabidCi...


Recent Blog Entries
RolfRolles
Mar/08
Compiler Optimizations for ...

ReWolf
Mar/04
When memory management goes...

thesprawler
Feb/20
log1949.txt -- Wondering ho...

thesprawler
Feb/20
log1949.log -- created on C...

thesprawler
Feb/17
Trying to reverse the firmw...

More ...


Recent Blog Comments
Boken on:
Mar/12
Compiler Optimizations for ...

wildinto on:
Mar/10
Compiler Optimizations for ...

Orr on:
Mar/10
Compiler Optimizations for ...

bughoho on:
Mar/09
Compiler Optimizations for ...

cliffwolf on:
Mar/08
Compiler Optimizations for ...

More ...


Imagery
SoySauce Blueprint
Jun 6, 2008

[+] expand

View Gallery (11) / Submit