diff --git a/installer.sh b/installer.sh index a63b44c83..854e8c488 100755 --- a/installer.sh +++ b/installer.sh @@ -299,7 +299,7 @@ case ${ANSWER:0:1} in docker pull fkiecad/fact_extractor:latest fi if ! [[ -f "./external/extract.py" ]]; then - download_file "FACT-extract" "https://raw.githubusercontent.com/fkie-cad/fact_extractor/master/extract.py" "external/extract.py" + wget https://raw.githubusercontent.com/fkie-cad/fact_extractor/master/extract.py -O ./external/extract.py chmod +x ./external/extract.py fi ;; @@ -369,6 +369,8 @@ print_file_info "$BINUTIL_VERSION_NAME" "The GNU Binutils are a collection of bi print_tool_info "texinfo" 1 print_tool_info "gcc" 1 print_tool_info "build-essential" 1 +print_tool_info "gawk" 1 +print_tool_info "bison" 1 if [[ "$FORCE" -eq 0 ]] ; then echo -e "\\n""$MAGENTA""$BOLD""Do you want to download ""$BINUTIL_VERSION_NAME"" (if not already on the system) and compile objdump?""$NC" @@ -460,10 +462,10 @@ print_tool_info "net-tools" 1 print_tool_info "git" 1 if [[ "$FORCE" -eq 0 ]] ; then - echo -e "\\n""$MAGENTA""$BOLD""Do you want to download and install the net-tools, pip3, cve-search and cve_searchsploit (if not already on the system)?""$NC" + echo -e "\\n""$MAGENTA""$BOLD""Do you want to download and install the net-tools, pip3, mongodb, cve-search and cve_searchsploit (if not already on the system)?""$NC" read -p "(y/N)" -r ANSWER else - echo -e "\\n""$MAGENTA""$BOLD""net-tools, pip3, cve-search and cve_searchsploit (if not already on the system) will be downloaded and be installed!""$NC" + echo -e "\\n""$MAGENTA""$BOLD""net-tools, pip3, mongodb, cve-search and cve_searchsploit (if not already on the system) will be downloaded and be installed!""$NC" ANSWER=("y") fi case ${ANSWER:0:1} in @@ -479,9 +481,38 @@ case ${ANSWER:0:1} in cd ./external/cve-search/ || exit 1 pip3 install -r requirements.txt xargs sudo apt-get install -y < requirements.system + wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add - + echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list + sudo apt-get update -y + apt-get install mongodb-org -y + sudo systemctl daemon-reload + sudo systemctl start mongod + sudo systemctl enable mongod + + if [[ "$FORCE" -eq 0 ]] ; then + echo -e "\\n""$MAGENTA""$BOLD""Do you want to download and update the cve-search database?""$NC" + read -p "(y/N)" -r ANSWER + else + echo -e "\\n""$MAGENTA""$BOLD""The cve-search database will be downloaded and updated (if not already on the system)!""$NC" + ANSWER=("y") + fi + case ${ANSWER:0:1} in + y|Y ) + /etc/init.d/redis-server start + sudo ./sbin/db_mgmt_cpe_dictionary.py -p + sudo ./sbin/db_mgmt_json.py -p + sudo ./sbin/db_updater.py -c + ;; + esac + cd ../.. || exit 1 fi if [[ "$IN_DOCKER" -eq 1 ]] ; then + pip3 install cve_searchsploit + git clone https://github.com/cve-search/cve-search.git external/cve-search + cd ./external/cve-search/ || exit 1 + pip3 install -r requirements.txt + xargs sudo apt-get install -y < requirements.system if [[ "$FORCE" -eq 0 ]] ; then echo -e "\\n""$MAGENTA""$BOLD""Do you want to update the cve-search database on docker emba?""$NC" read -p "(y/N)" -r ANSWER @@ -493,10 +524,10 @@ case ${ANSWER:0:1} in y|Y ) sudo cve_searchsploit -u ;; - esac + esac fi - echo -e "\\n""$MAGENTA""$BOLD""For using CVE-search you have to install all the requirements and the needed database.""$NC" - echo -e "$MAGENTA""$BOLD""Installation instructions can be found on github.io: https://cve-search.github.io/cve-search/getting_started/installation.html#installation""$NC" + # echo -e "\\n""$MAGENTA""$BOLD""For using CVE-search you have to install all the requirements and the needed database.""$NC" + # echo -e "$MAGENTA""$BOLD""Installation instructions can be found on github.io: https://cve-search.github.io/cve-search/getting_started/installation.html#installation""$NC" ;; esac