Exploit database

GH-f6ea8f90284ed59c223776a7980aa686

acorn421/san2patch-benchmark

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2016-10094

1 source

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.

Repository files9

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

libtiff/CVE-2016-10094/test_func.sh

Shell · 1,048 bytes
#!/bin/bash

if [ -z "$EXPERIMENT_DIR" ]; then
  echo "EXPERIMENT_DIR NOT SET, TAKING DEFAULT VALUE TO BE ~"
fi
EXPERIMENT_DIR=${EXPERIMENT_DIR:-"~"}

export ASAN_OPTIONS=detect_leaks=0,halt_on_error=0

script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
benchmark_name=$(echo $script_dir | rev | cut -d "/" -f 3 | rev)
project_name=$(echo $script_dir | rev | cut -d "/" -f 2 | rev)
bug_id=$(echo $script_dir | rev | cut -d "/" -f 1 | rev)
dir_name=/experiment_func/$benchmark_name/$project_name/$bug_id

cd $dir_name/src

################
#    Run test  #
################

make check -j`nproc` > func_test.err 2>&1

ret=$?
if [[ ret -eq 0 ]]; then
    echo "Test passed"
    exit 0
else
    # Check if the error is ERROR: 1 and FAIL: 1
    # TOTAL: 81
    # PASS:  81
    # SKIP:  0
    # XFAIL: 0
    # FAIL:  0
    # XPASS: 0
    # ERROR: 0
    if grep -q "ERROR: 0" func_test.err && grep -q "FAIL:  0" func_test.err; then
        echo "Test passed"
        exit 0
    else
        echo "Test failed"
        exit 1
    fi
fi