-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from frewsxcv/vagrantfile
Add Vagrantfile for easier usage
- Loading branch information
Showing
1 changed file
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
Vagrant.configure(2) do |config| | ||
config.vm.box = "ubuntu/vivid64" | ||
|
||
config.vm.provider "virtualbox" do |vb| | ||
vb.memory = "4096" | ||
vb.cpus = 8 | ||
end | ||
|
||
config.vm.provision "shell", inline: <<-SHELL | ||
sudo apt-get update | ||
sudo apt-get install -y git clang cmake libssl-dev | ||
cd /opt | ||
# Build rust | ||
git clone https://github.com/rust-lang/rust.git | ||
cd rust | ||
git checkout 717e8831b # https://github.com/frewsxcv/afl.rs/issues/11 | ||
./configure --enable-clang --disable-libcpp --enable-optimize --disable-docs | ||
make -j 8 | ||
cd .. | ||
echo "export PATH=\$PATH:/opt/rust/x86_64-unknown-linux-gnu/stage2/bin" >> /home/vagrant/.bashrc | ||
echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/opt/rust/x86_64-unknown-linux-gnu/stage2/lib/" >> /home/vagrant/.bashrc | ||
source /home/vagrant/.bashrc | ||
# Build cargo | ||
git clone https://github.com/rust-lang/cargo | ||
cd cargo | ||
apt-get install -y pkg-config # https://github.com/frewsxcv/afl.rs/issues/11 | ||
git checkout 1ae683a1496be2e35f213e3e11645adcb3ed62b1 # https://github.com/frewsxcv/afl.rs/issues/11 | ||
./configure --local-rust-root=../rust/x86_64-unknown-linux-gnu/stage2/ --enable-optimize | ||
make | ||
echo "export PATH=\$PATH:/opt/cargo/target/x86_64-unknown-linux-gnu/release" >> /home/vagrant/.bashrc | ||
source /home/vagrant/.bashrc | ||
# Build afl | ||
wget http://lcamtuf.coredump.cx/afl/releases/afl-1.94b.tgz | ||
tar xf afl-1.94b.tgz | ||
cd afl-1.94b | ||
make | ||
make install | ||
# export CXX="$(which clang++) -Wno-c++11-extensions" | ||
# export LLVM_CONFIG=$(which llvm-config-3.4) | ||
# build repo with rust plugin | ||
SHELL | ||
end |