mirror of
https://github.com/geohot/qira
synced 2025-03-13 02:23:07 +03:00
added 64bit ida plugin
This commit is contained in:
parent
ec677ce627
commit
bed935b66e
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,4 +1,3 @@
|
||||
bin/
|
||||
web/.meteor/local
|
||||
.*.swp
|
||||
tests/a.out
|
||||
@ -7,6 +6,8 @@ tests/*.o
|
||||
ida/*.o
|
||||
ida/qira.plx
|
||||
ida/qira.pmc
|
||||
ida/qira.plx64
|
||||
ida/qira.pmc64
|
||||
ida/libwebsockets.a
|
||||
tests/idb
|
||||
qiradb/qiradb
|
||||
|
@ -37,12 +37,9 @@ cp middleware/*.py distrib/qira/middleware/
|
||||
# perhaps build for older IDA as well, ie 6.1
|
||||
# and mac + windows
|
||||
# fairly standard deps + libcrypto, libssl, libz and libida
|
||||
mkdir -p distrib/qira/ida
|
||||
cd ida
|
||||
mkdir -p distrib/qira/ida/bin
|
||||
echo "copying ida plugin"
|
||||
cp qira_ida66_linux.plx ../distrib/qira/ida/qira_ida66_linux.plx
|
||||
cp qira_ida66_mac.pmc ../distrib/qira/ida/qira_ida66_mac.pmc
|
||||
cd ../
|
||||
cp ida/bin/* distrib/qira/ida/bin/
|
||||
|
||||
# fairly standard deps + librt, libglib, libpcre
|
||||
echo "copying qemu"
|
||||
|
Binary file not shown.
BIN
ida/bin/qira_ida66_linux.plx64
Executable file
BIN
ida/bin/qira_ida66_linux.plx64
Executable file
Binary file not shown.
27
ida/build.sh
27
ida/build.sh
@ -6,28 +6,37 @@ if [[ "$unamestr" == 'Linux' ]]; then
|
||||
SDKROOT=~/build/idasdk66
|
||||
IDAROOT=~/ida-6.6
|
||||
OUTPUT="qira.plx"
|
||||
OUTPUT64="qira.plx64"
|
||||
ln -sf linux_libwebsockets.a libwebsockets.a
|
||||
elif [[ "$unamestr" == 'Darwin' ]]; then
|
||||
SDKROOT=~/idasrc
|
||||
IDAROOT="/Applications/IDA Pro 6.6/idaq.app/Contents/MacOS/"
|
||||
OUTPUT="qira.pmc"
|
||||
OUTPUT="qira.pmc64"
|
||||
ln -sf mac_libwebsockets.a libwebsockets.a
|
||||
fi
|
||||
|
||||
# build 32
|
||||
g++ template.cpp -m32 -fPIC -D__IDP__ -D__PLUGIN__ -c -D__LINUX__ -I . -I$SDKROOT/include
|
||||
g++ -m32 --shared template.o "-L$IDAROOT" -lida -o $OUTPUT libwebsockets.a -lcrypto -lz -lssl -lpthread
|
||||
|
||||
sha1sum $OUTPUT
|
||||
if [ "$(diff $OUTPUT "$IDAROOT/plugins/$OUTPUT")" != "" ]; then
|
||||
echo "copying plugin"
|
||||
cp $OUTPUT "$IDAROOT/plugins"
|
||||
fi
|
||||
# build 64
|
||||
g++ template.cpp -D__EA64__=1 -m32 -fPIC -D__IDP__ -D__PLUGIN__ -c -D__LINUX__ -I . -I$SDKROOT/include
|
||||
g++ -m32 --shared template.o "-L$IDAROOT" -lida64 -o $OUTPUT64 libwebsockets.a -lcrypto -lz -lssl -lpthread
|
||||
|
||||
strip $OUTPUT
|
||||
strip $OUTPUT64
|
||||
|
||||
sha1sum $OUTPUT $OUTPUT64
|
||||
echo "installing plugin"
|
||||
cp $OUTPUT "$IDAROOT/plugins"
|
||||
cp $OUTPUT64 "$IDAROOT/plugins"
|
||||
|
||||
if [[ "$unamestr" == 'Linux' ]]; then
|
||||
cp $OUTPUT qira_ida66_linux.plx
|
||||
strip qira_ida66_linux.plx
|
||||
cp $OUTPUT bin/qira_ida66_linux.plx
|
||||
cp $OUTPUT64 bin/qira_ida66_linux.plx64
|
||||
elif [[ "$unamestr" == 'Darwin' ]]; then
|
||||
cp $OUTPUT qira_ida66_mac.pmc
|
||||
strip qira_ida66_mac.pmc
|
||||
cp $OUTPUT bin/qira_ida66_mac.pmc
|
||||
cp $OUTPUT64 bin/qira_ida66_mac.pmc64
|
||||
fi
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
#include <loader.hpp>
|
||||
#include <bytes.hpp>
|
||||
|
||||
//#define DEBUG
|
||||
#define DEBUG
|
||||
|
||||
// ***************** WEBSOCKETS *******************
|
||||
#include <libwebsockets.h>
|
||||
@ -77,7 +77,11 @@ static void ws_send(char *str) {
|
||||
static void update_address(const char *type, ea_t addr) {
|
||||
//msg("addr 0x%x\n", addr);
|
||||
char tmp[100];
|
||||
qsnprintf(tmp, 100-1, "set%s %u", type, addr);
|
||||
#ifdef __EA64__
|
||||
qsnprintf(tmp, 100-1, "set%s %llu", type, addr);
|
||||
#else
|
||||
qsnprintf(tmp, 100-1, "set%s %u", type, addr);
|
||||
#endif
|
||||
ws_send(tmp);
|
||||
}
|
||||
|
||||
|
@ -65,6 +65,7 @@ var baseevents = {
|
||||
},
|
||||
'click .datainstruction': function(e) {
|
||||
var iaddr = parseInt(e.target.innerHTML, 16);
|
||||
Session.set("dirtyiaddr", true);
|
||||
Session.set('iaddr', iaddr);
|
||||
},
|
||||
};
|
||||
|
@ -90,8 +90,16 @@ Template.memviewer.events({
|
||||
update_dview(daddr);
|
||||
},
|
||||
'dblclick .datainstruction': function(e) {
|
||||
var daddr = parseInt(e.target.innerHTML, 16);
|
||||
update_dview(daddr);
|
||||
},
|
||||
'contextmenu .datainstruction': function(e) {
|
||||
// right click to follow in instruction dump
|
||||
// add menu maybe?
|
||||
var iaddr = parseInt(e.target.innerHTML, 16);
|
||||
Session.set("dirtyiaddr", true);
|
||||
Session.set('iaddr', iaddr);
|
||||
return false;
|
||||
},
|
||||
'click .data': function(e) {
|
||||
var daddr = parseInt(e.target.getAttribute('daddr'));
|
||||
|
Loading…
x
Reference in New Issue
Block a user