thinking about release

This commit is contained in:
George Hotz 2014-07-02 11:31:15 -07:00
parent ab65e61994
commit 81d9b2cc4c
12 changed files with 73 additions and 7 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
bin/
web/.meteor/local
.*.swp
tests/a.out

58
brelease.sh Executable file
View File

@ -0,0 +1,58 @@
#!/bin/bash
#rm -rf bin/
#mkdir -p bin/
# requires objdump
# sudo apt-get install python-pip
# sudo pip install pymongo
# writable /tmp
# aim for a 2mb distributable
# 100kb for the python, 100kb for the web, 200kb for the ida plugin(static), 1mb for qira-qemu
# +the meteor install size
# consider smaller packaging for the python
# hmm can we package as a .deb for ubuntu?
# perhaps instead of this bundle we just install meteor
# curl https://install.meteor.com | /bin/sh
# or preship this file in the tarball?
# the advantage of this over the bundle is it ships mongo
cd web
echo "bundling webapp"
#mrt bundle ../bin/qira_web.tar.gz
cd ../
# built for ida 6.6
# perhaps build for older IDA as well, ie 6.1
# and mac + windows
# fairly standard deps + libcrypto, libssl, libz and libida
cd ida_plugin
echo "building ida plugin"
./build.sh
cp qira.plx ../bin/qira_ida66_linux.plx
strip ../bin/qira_ida66_linux.plx
cd ../
# fairly standard deps + librt, libglib, libpcre
echo "copying qemu"
cp qemu/qemu-latest/i386-linux-user/qemu-i386 bin/qira-i386
strip bin/qira-i386
# package up the python, hopefully this includes pymongo driver
# hmm, it doesn't, user will need to install
#cd bin
#rm -rf qira_middleware
#mkdir -p qira_middleware
#cd qira_middleware
#~/build/PyInstaller-2.1/pyinstaller.py ../../scripts/qira_middleware.py
#cd dist/qira_middleware
#tar zcvf ../../../qira_middleware.tar.gz *
#cd ../../
#cd ../../
# *** startup ***
# the meteor and the middleware should always be running(fix the hang bug)
# launch both in upscript with qira-server in one window. make the teardown nice
# then you run qira-i386 <binary>, we need to hack in the -singlestep arg

View File

@ -1,7 +1,8 @@
#!/bin/bash
set -e
sudo pip install pymongo
curl -k https://install.meteor.com | /bin/sh
#sudo easy_install pymongo
curl https://install.meteor.com | /bin/sh
if [ ! -d qemu/qemu-latest ]; then
rm -rf qemu

2
go.sh
View File

@ -7,7 +7,7 @@ BIN=../tests/ctf/ezhp
#SRC=../tests/hello.c
#SRC=../tests/algo.c
if [ $SRC != "" ]; then
if [ "$SRC" != "" ]; then
cd tests
#gcc -m32 -nostdlib -static -g $src
gcc -m32 -static -g $SRC

View File

@ -6,5 +6,9 @@ IDAROOT=~/ida-6.6
g++ template.cpp -m32 -fPIC -D__IDP__ -D__PLUGIN__ -c -D__LINUX__ -I$SDKROOT/include
g++ -m32 --shared template.o -L$IDAROOT -lida -o qira.plx libwebsockets.a -lcrypto -lz -lssl -lpthread
sha1sum qira.plx
if [ "$(diff qira.plx $IDAROOT/plugins/qira.plx)" != "" ]; then
echo "copying plugin"
cp qira.plx $IDAROOT/plugins
fi

View File

@ -39,7 +39,7 @@ static int callback_qira(struct libwebsocket_context* context,
case LWS_CALLBACK_ESTABLISHED:
// we only support one client
gwsi = wsi;
msg("QIRA connected\n");
msg("QIRA web connected\n");
break;
case LWS_CALLBACK_RECEIVE:
char *strin = (char *)in;

View File

@ -69,14 +69,16 @@ Meteor.startup(function () {
});
});
// shouldn't be here
// consider a better way to do this
var X86REGS = ['EAX', 'ECX', 'EDX', 'EBX', 'ESP', 'EBP', 'ESI', 'EDI', 'EIP'];
var REGS = X86REGS;
stream.on('getregisters', function(clnum) {
var ret = [];
for (var i = 0; i < X86REGS.length; i++) {
for (var i = 0; i < REGS.length; i++) {
var val = map_getbelow(regs[i*4], clnum);
if (val !== undefined) {
ret.push({"name": X86REGS[i], "address": i*4, "value": val});
ret.push({"name": REGS[i], "address": i*4, "value": val});
}
}
stream.emit("registers", ret);