whilenext != BADADDR: #判断是否为".idata"段 next=NextSeg(next) name=SegName(next) if name[0:6]=='.idata': break returnnext
defmain(): BytePtr=SegStart(GetImportSeg()) #确定idata段VA EndImports=SegEnd(BytePtr) print('\n Parsing import table...') while BytePtr<EndImports: if LineA(BytePtr,1): print( '__'+LineA(BytePtr,1)+'__') if Name(BytePtr): print(Name(BytePtr)+'\n') #显示当前地址的函数名 BytePtr=NextAddr(BytePtr) print('Import table parsing complete\n')
if __name__=='__main__': main()
一种SMC的解密:
1 2 3 4 5 6 7 8 9 10 11 12 13
#include <idc.idc> static decrypt(from, size, key ) { auto i, x; for ( i=0; i < size; i=i+1 ) { x = Byte(from); x = (x^key); PatchByte(from,x); from = from + 1; } Message("\n" + "Decrypt Complete\n"); }