Skip to content

Commit 8b506ea

Browse files
committed
Added reset script and print functions in loadlog
Reset script will reset colors back to defaults. loadlog will now printout the function name's that were hit along with the addresses they exist at.
1 parent 604d098 commit 8b506ea

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

idapython/loadlog.py

+7
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ def main():
3434
print("Need log file to parse data...");
3535
return;
3636
buff = f.read();
37+
functions = set()
3738
for index in range(0, len(buff)):
3839
exec_count = ord(buff[index]);
3940
if exec_count == 0:
@@ -43,6 +44,12 @@ def main():
4344
if exec_count > 11: exec_count = 11;
4445

4546
ida_color = clist[exec_count];
47+
if (not (idc.GetFunctionName(imagebase+index) in functions)):
48+
func = idc.GetFunctionName(imagebase+index)
49+
print "hit @ 0x%08x function %s"%(imagebase+index, func)
50+
functions.add(func)
51+
52+
4653

4754
idc.SetColor(imagebase + index, CIC_ITEM, ida_color);
4855

idapython/reset.py

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/usr/bin/env pythong
2+
# modified by @_wirepair to 'white out' or diff two IDAPinLogger runs.
3+
import idaapi
4+
import idc
5+
import struct
6+
import colorsys
7+
8+
def main():
9+
ida_color = 0xFFFFFFFF
10+
start = FirstSeg()
11+
end = SegEnd(start)
12+
while(start != idc.BADADDR):
13+
14+
for i in range(start, end):
15+
idc.SetColor(i, CIC_ITEM, ida_color);
16+
start = NextSeg(start)
17+
end = SegEnd(start)
18+
19+
20+
21+
if __name__ == "__main__":
22+
main()

0 commit comments

Comments
 (0)