diff --git a/pipeline/recon/config.py b/pipeline/recon/config.py index baa8555..04a4d49 100644 --- a/pipeline/recon/config.py +++ b/pipeline/recon/config.py @@ -1,4 +1,5 @@ # flake8: noqa E231 +import platform from pathlib import Path @@ -11,6 +12,7 @@ defaults = { "results-dir": "recon-results", "aquatone-scan-timeout": "900", "home": Path.home(), + "arch": ["386", "amd64"][platform.architecture()[0].startswith("64")], } defaults["project-dir"] = str(Path(__file__).parents[2]) diff --git a/pipeline/tools/go.yaml b/pipeline/tools/go.yaml index f8e86af..2a7df19 100644 --- a/pipeline/tools/go.yaml +++ b/pipeline/tools/go.yaml @@ -1,9 +1,10 @@ installed: false bashrc: &bashrc !join_path [!get_default "{home}", .bashrc] path: &gotool !join_path [!get_default "{goroot}", go/bin/go] +dlpath: &dlpath !join_empty ["https://dl.google.com/go/go1.14.4.linux-", !get_default "{arch}", ".tar.gz"] install_commands: -- wget -q https://dl.google.com/go/go1.14.4.linux-amd64.tar.gz -O /tmp/go.tar.gz +- !join ["wget -q", *dlpath, "-O /tmp/go.tar.gz"] - !join [tar -C, !get_default "{goroot}", -xvf /tmp/go.tar.gz] - !join ["bash -c 'if [ ! $(grep $(dirname", *gotool, ")", *bashrc, ") ]; then echo PATH=${PATH}:$(dirname", *gotool, ") >>", *bashrc, "; fi'"]