diff --git a/.gitignore b/.gitignore index 8b60920a..2a0bd058 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,9 @@ # IDE .vscode/ +ctags # Python venvs +/env.sh venv/ .venv/ diff --git a/deploy/intellabs/kafl/roles/fuzzer/tasks/post_tasks.yml b/deploy/intellabs/kafl/roles/fuzzer/tasks/post_tasks.yml index 090dbc7b..1d0c03a4 100644 --- a/deploy/intellabs/kafl/roles/fuzzer/tasks/post_tasks.yml +++ b/deploy/intellabs/kafl/roles/fuzzer/tasks/post_tasks.yml @@ -24,4 +24,4 @@ - name: Create .env file template: src: env.j2 - dest: "{{ kafl_install_root }}/.env" \ No newline at end of file + dest: "{{ install_root }}/env.sh" diff --git a/deploy/intellabs/kafl/roles/fuzzer/templates/env.j2 b/deploy/intellabs/kafl/roles/fuzzer/templates/env.j2 index aa5ebdd0..86d44a17 100644 --- a/deploy/intellabs/kafl/roles/fuzzer/templates/env.j2 +++ b/deploy/intellabs/kafl/roles/fuzzer/templates/env.j2 @@ -1,8 +1,17 @@ -export WORKSPACE="{{ kafl_install_root }}" -export KAFL_ROOT="{{ fuzzer_root }}" +# source this file to activate the environment, +# or use "make env" to start a sub-shell + +# components managed by ansible +export KAFL_ROOT="{{ kafl_install_root }}" export QEMU_ROOT="{{ qemu_root }}" export LIBXDC_ROOT="{{ libxdc_root }}" export CAPSTONE_ROOT="{{ capstone_root }}" export RADAMSA_ROOT="{{ radamsa_root }}" + +# workspace defaults +export WORKSPACE="{{ install_root }}" export KAFL_CONFIG_FILE="{{ fuzzer_root }}/kafl.yaml" -export KAFL_WORKDIR="/dev/shm/{{ ansible_user_id }}_tdfl" +export KAFL_WORKDIR="/dev/shm/kafl_{{ ansible_user_id }}" + +# activate python venv +source $KAFL_ROOT/.venv/bin/activate