IDA python Use Notes

Source: Internet
Author: User

Pattern= ' E5 40 00 '
Addr=minea ()
For x in range (0,5):
ADDR=IDC. Findbinary (Addr,search_down,pattern)
If ADDR!=IDC. BADADDR:
Print hex (addr), IDC. Getdisasm (addr)

#搜寻制定的字符串

#将其保存到指定的脚步文件中.

3.1. Use of shortcut keys
    • Run the Ida script file: (ALT-F7)
    • Single-line execution Python (ctrl-f3)
    • View existing Ida script files (alt+f9)

Script 2: Look for the address of the cross-reference that made the function and print the address.

from idaapi import *danger_funcs = ["IsProcessorFeaturePresent"]  # 需要寻找的函数名for func in danger_funcs:    addr = LocByName( func )     if addr != BADADDR:       #找到交叉引用的地址        cross_refs = CodeRefsTo( addr, 0 )        print "Cross References to %s" % func         print "-------------------------------"        for ref in cross_refs:             print "%08x" % ref

IDA python Use Notes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.