前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >IDA批量模式 Python Script[fix]

IDA批量模式 Python Script[fix]

作者头像
obaby
发布2023-02-24 11:03:21
3740
发布2023-02-24 11:03:21
举报
文章被收录于专栏:obaby@mars
代码语言:javascript
复制
#########################################
#Ida batch mode test code by obaby
#2012.03.13
#Mars Security
#http://www.h4ck.org.cn
#Email:root@h4ck.ws
#########################################
import sys
import os
import subprocess
 
# Fill these feilds with ur own ida file path and the idc file u want to execute!
idcScriptFileName = "batchmode.idc"
ida32qFilePath = '"F:\Crackl@b\Hex-Rays.IDA.Pro.Advanced.v6.1\ida61\idaq.exe"'
ida64qFilePath = "F:\Crackl@b\Hex-Rays.IDA.Pro.Advanced.v6.1\ida61\idaq64.exe"
ida32wFilePath ='"F:\Crackl@b\Hex-Rays.IDA.Pro.Advanced.v6.1\ida61\idaw.exe"'
ida64wFilePath = "F:\Crackl@b\Hex-Rays.IDA.Pro.Advanced.v6.1\ida61\idaw64.exe"
#The binary file list text 
TargetList = "F:/Python 2.6/_eric4project/idabatchmode/list.txt"
 
TargetFile_object = open(TargetList, "r").readlines()
for eachline in TargetFile_object:
    #print eachline, 
    #print eachline
    eachline = eachline.replace('\n','').replace('\r', '')
    if os.path.exists(eachline):
        tmpExecStr =  ida32wFilePath +" -A -c -S"+idcScriptFileName +" " + '"'+eachline+'"' #fixup the space in the file path
        print tmpExecStr, 
        #os.system(tmpExecStr) #singl process with cmdwindow
        #os.popen(tmpExecStr)  singl process without cmdwindow
        subprocess.Popen(tmpExecStr) #mulity process with cmd window
 
print ("All Process have been started!")

修正文件路径包含空格时找不到文件的问题,这个如果自己写的话应该是可以避免的。发现一个比较奇怪的问题,在win7下subprocess.Popen竟然不显示cmd窗口,但是在xp下显示。这是为什么? :8

☆文章版权声明☆

* 网站名称:obaby@mars

* 网址:https://h4ck.org.cn/

* 本文标题: 《IDA批量模式 Python Script[fix]》

* 本文链接:https://cloud.tencent.com/developer/article/2223648

* 转载文章请标明文章来源,原文标题以及原文链接。请遵从 《署名-非商业性使用-相同方式共享 2.5 中国大陆 (CC BY-NC-SA 2.5 CN) 》许可协议。


分享文章:

相关文章:

  1. IDA批量模式
  2. IDA python.plw: can’t load file
  3. Spyder –the Scientific PYthon Development EnviRonment
  4. IDA Name Chang via idc Script
  5. fixobjc idc script for IDA Pro
  6. Import Repeatable Comments to IDA Via Script
  7. zynamics Objective-C helper script
  8. Idc Script 高亮显示模板
  9. PyDbg安装(《Python 灰帽子》)
  10. Python ByteCode(opcode) & HexCode
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2012年3月13日,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 相关文章:
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档