Last active
June 19, 2022 03:25
-
-
Save inaz2/08df4d089a257d0d029a8a7895692d51 to your computer and use it in GitHub Desktop.
installing QIRA on Ubuntu 20.04 LTS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ uname -a | |
Linux vm-ubuntu 5.13.0-48-generic #54~20.04.1-Ubuntu SMP Thu Jun 2 23:37:17 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux | |
$ lsb_release -a | |
No LSB modules are available. | |
Distributor ID: Ubuntu | |
Description: Ubuntu 20.04.4 LTS | |
Release: 20.04 | |
Codename: focal | |
$ docker --version | |
Docker version 22.06.0-beta.0, build 3e9117b | |
$ bash install_qira.sh | |
Cloning into 'qira'... | |
remote: Enumerating objects: 375, done. | |
remote: Counting objects: 100% (375/375), done. | |
remote: Compressing objects: 100% (339/339), done. | |
remote: Total 375 (delta 8), reused 284 (delta 6), pack-reused 0 | |
Receiving objects: 100% (375/375), 8.20 MiB | 13.46 MiB/s, done. | |
Resolving deltas: 100% (8/8), done. | |
Switched to a new branch 'mod_base' | |
[+] Building 13.3s (18/18) FINISHED | |
(snip) | |
installing deps for ubuntu | |
(snip) | |
running tests | |
(snip) | |
tests pass | |
making systemwide symlink | |
*************************************** | |
Thanks for installing QIRA | |
Check out README for more info | |
Or just dive in with 'qira /bin/ls' | |
And point Chrome to localhost:3002 | |
~geohot | |
$ qira -s /bin/cat | |
*** program is b'/usr/bin/cat' with hash 00216393538702616d9ba663141ca8063b901f58 | |
** found 59 names | |
*** elf loaded | |
**** using /home/user/qira/tracers/qemu/qemu/x86_64-linux-user/qemu-x86_64 for 0x3e | |
no qira server found, starting it | |
*** deleting old runs | |
**** socat listening on 0.0.0.0:4000 | |
****** starting WEB SERVER on 0.0.0.0:3002 | |
# on the another terminal | |
$ nc -v localhost 4000 | |
Connection to localhost 4000 port [tcp/*] succeeded! | |
AAAAAAAA | |
AAAAAAAA | |
BBBBBBBB | |
BBBBBBBB | |
# open http://localhost:3002/ from the web browser |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone https://github.com/geohot/qira.git --depth 1 | |
cd qira/ | |
git checkout -b mod_base 080e6b18fd5046748af6224ef08108e31aebd952 | |
git apply <<"__EOF__" | |
diff --git a/install.sh b/install.sh | |
index 7fa4885..dd9095d 100755 | |
--- a/install.sh | |
+++ b/install.sh | |
@@ -27,6 +27,14 @@ else | |
echo "See other backends in qira/tracers, PIN may work on Windows and OS X" | |
fi | |
+# deps for building Pillow | |
+sudo apt-get -y install libtiff5-dev libjpeg8-dev libopenjp2-7-dev zlib1g-dev \ | |
+ libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python3-tk \ | |
+ libharfbuzz-dev libfribidi-dev libxcb1-dev | |
+ | |
+# deps for static | |
+sudo apt-get -y install graphviz | |
+ | |
echo "building python venv" | |
virtualenv venv | |
source venv/bin/activate | |
diff --git a/requirements.txt b/requirements.txt | |
index e3f2ca7..58713f1 100644 | |
--- a/requirements.txt | |
+++ b/requirements.txt | |
@@ -25,4 +25,4 @@ six==1.12.0 | |
socketIO-client==0.7.2 | |
urllib3==1.24.1 | |
websocket-client==0.56.0 | |
-Werkzeug==0.15.1 | |
+Werkzeug==0.15.5 | |
diff --git a/tracers/qemu_build.sh b/tracers/qemu_build.sh | |
index 4f5e030..6a85a95 100755 | |
--- a/tracers/qemu_build.sh | |
+++ b/tracers/qemu_build.sh | |
@@ -7,5 +7,5 @@ if [ ! -d qemu/qemu ]; then | |
fi | |
cd qemu/qemu | |
-./configure --target-list=i386-linux-user,x86_64-linux-user,arm-linux-user,ppc-linux-user,aarch64-linux-user,mips-linux-user,mipsel-linux-user --enable-tcg-interpreter --enable-debug-tcg --cpu=unknown --python=python | |
+./configure --target-list=i386-linux-user,x86_64-linux-user,arm-linux-user,ppc-linux-user,aarch64-linux-user,mips-linux-user,mipsel-linux-user --enable-tcg-interpreter --enable-debug-tcg --cpu=unknown --python=python --static | |
make -j$(getconf _NPROCESSORS_ONLN) | |
diff --git a/web/client/static/graph.js b/web/client/static/graph.js | |
index b24a2e2..5740a63 100644 | |
--- a/web/client/static/graph.js | |
+++ b/web/client/static/graph.js | |
@@ -190,7 +190,8 @@ Graph.prototype.render = function() { | |
} else { | |
// this is a vertex | |
- var addr = resp[i].split(' ')[0].split('N')[1].trim(); | |
+ //var addr = resp[i].split(' ')[0].split('N')[1].trim(); | |
+ var addr = resp[i].split('\t')[1].split('N')[1].trim(); | |
var pos = resp[i].slice(resp[i].indexOf('pos=')).split('"')[1].split(','); | |
//p(addr); | |
__EOF__ | |
cd docker/ | |
sudo ./build.sh | |
cd ../ | |
sudo docker run -v $PWD:/mnt/host qira cp -r /qira/tracers/qemu/qemu /mnt/host/tracers/qemu | |
sudo chown -R --reference . tracers/qemu/qemu | |
./install.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment