mirror of
https://github.com/geohot/qira
synced 2025-01-27 12:49:30 +03:00
fixes on IDA Python Plugin, and typos
This commit is contained in:
parent
bed9204678
commit
9ac8f022ee
@ -35,10 +35,10 @@ cp $OUTPUT "$IDAROOT/plugins"
|
||||
cp $OUTPUT64 "$IDAROOT/plugins"
|
||||
|
||||
if [[ "$unamestr" == 'Linux' ]]; then
|
||||
cp $OUTPUT bin/qira_ida66_linux.plx
|
||||
cp $OUTPUT64 bin/qira_ida66_linux.plx64
|
||||
cp $OUTPUT bin/qira_ida_linux.plx
|
||||
cp $OUTPUT64 bin/qira_ida_linux.plx64
|
||||
elif [[ "$unamestr" == 'Darwin' ]]; then
|
||||
cp $OUTPUT bin/qira_ida66_mac.pmc
|
||||
cp $OUTPUT64 bin/qira_ida66_mac.pmc64
|
||||
cp $OUTPUT bin/qira_ida_mac.pmc
|
||||
cp $OUTPUT64 bin/qira_ida_mac.pmc64
|
||||
fi
|
||||
|
||||
|
@ -13,14 +13,17 @@ def start_server():
|
||||
|
||||
def set_qira_address(la):
|
||||
global qira_address
|
||||
#if qira_address != BADADDR:
|
||||
# del_bpt(qira_address)
|
||||
if qira_address is not None and qira_address != BADADDR:
|
||||
ea=idaapi.toEA(0,qira_address)
|
||||
if CheckBpt(ea) > 0:
|
||||
idaapi.del_bpt(ea)
|
||||
qira_address = la
|
||||
#idaapi.add_bpt(qira_address)
|
||||
#idaapi.disable_bpt(qira_address)
|
||||
idaapi.add_bpt(qira_address, 0, BPT_SOFT)
|
||||
EnableBpt(qira_address, False)
|
||||
|
||||
def jump_to(a):
|
||||
if (qira_address != a):
|
||||
global qira_address
|
||||
if (qira_address != a) and (a != BADADDR):
|
||||
set_qira_address(a)
|
||||
idaapi.jumpto(qira_address, -1, 0)
|
||||
else:
|
||||
@ -32,13 +35,13 @@ def ws_send(msg):
|
||||
conn.sendMessage(msg)
|
||||
|
||||
def update_address(addr_type, addr):
|
||||
cmd = "set%s 0x%x" % (addr_type, addr,)
|
||||
cmd = "set%s 0x%x" % (addr_type, addr)
|
||||
ws_send(cmd)
|
||||
|
||||
class qiraplugin_t(idaapi.plugin_t):
|
||||
flags = 0
|
||||
comment = ""
|
||||
help = ""
|
||||
comment = "QEMU Interactive Runtime Analyser plugin"
|
||||
help = "Visit qira.me for more infos"
|
||||
wanted_name = "QIRA Plugin"
|
||||
wanted_hotkey = "Alt-F5"
|
||||
|
||||
@ -53,12 +56,14 @@ class qiraplugin_t(idaapi.plugin_t):
|
||||
|
||||
|
||||
def run(self, arg):
|
||||
global qira_address
|
||||
idaapi.msg("[QIRA Plugin] Syncing with Qira\n")
|
||||
self.addr = idaapi.get_screen_ea()
|
||||
if (self.old_addr != self.addr):
|
||||
if (idaapi.isCode(idaapi.getFlags(self.addr))):
|
||||
# don't update the address if it's already the qira address
|
||||
if (self.addr != qira_address):
|
||||
idaapi.msg("[QIRA Plugin] Qira Address %x \n" % (self.addr))
|
||||
# Instruction Address
|
||||
set_qira_address(self.addr)
|
||||
update_address("iaddr", self.addr)
|
||||
|
@ -1,7 +1,12 @@
|
||||
#include <ida.hpp>
|
||||
#include <idp.hpp>
|
||||
#include <dbg.hpp>
|
||||
#include <loader.hpp>
|
||||
#include <kernwin.hpp>
|
||||
#include <bytes.hpp>
|
||||
#include <offset.hpp>
|
||||
#include <auto.hpp>
|
||||
#include <entry.hpp>
|
||||
#include <name.hpp>
|
||||
#include <time.h>
|
||||
|
||||
@ -493,8 +498,8 @@ void idaapi IDAP_run(int arg) {
|
||||
return;
|
||||
}
|
||||
|
||||
char IDAP_comment[] = "This is my test plug-in";
|
||||
char IDAP_help[] = "My plugin";
|
||||
char IDAP_comment[] = "QEMU Interactive Runtime Analyser server";
|
||||
char IDAP_help[] = "Visit qira.me for more infos";
|
||||
char IDAP_name[] = "QIRA server";
|
||||
char IDAP_hotkey[] = "Alt-X";
|
||||
|
||||
|
@ -44,6 +44,6 @@ ARMREGS = [['R0','R1','R2','R3','R4','R5','R6','R7','R8','R9','R10','R11','IP','
|
||||
# Intel x86 CPU REGS
|
||||
X86REGS = [['EAX', 'ECX', 'EDX', 'EBX', 'ESP', 'EBP', 'ESI', 'EDI', 'EIP'], 4, False, "i386"]
|
||||
|
||||
# x86_64 CPU REGSZ
|
||||
# x86_64 CPU REGS
|
||||
X64REGS = [['RAX', 'RCX', 'RDX', 'RBX', 'RSP', 'RBP', 'RSI', 'RDI', "R8", "R9", "R10", "R11", "R12", "R13", "R14", "R15", 'RIP'], 8, False, "x86-64"]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user