Changes commands to be more uniform/readable (#58)

This commit is contained in:
Ryan Good
2020-05-01 21:51:35 -04:00
committed by GitHub
parent 2ecdf4319a
commit 078fdaada7
12 changed files with 41 additions and 31 deletions

View File

@@ -1,11 +1,11 @@
installed: false
dependencies: ["go"]
dependencies: [go]
go: &gotool !get_tool_path "{go}"
amass: &amass !get_tool_path "{amass}"
commands:
- !join [*gotool, "get -u github.com/OWASP/Amass/v3/..."]
- !join ["cp ~/go/bin/amass", *amass]
- !join [*gotool, get -u github.com/OWASP/Amass/v3/...]
- !join [cp ~/go/bin/amass, *amass]
shell: true
environ: {"GO111MODULE": "on"}

View File

@@ -5,10 +5,10 @@ aquatone: &aqua !get_tool_path "{aquatone}"
commands:
- mkdir /tmp/aquatone
- wget -q https://github.com/michenriksen/aquatone/releases/download/v1.7.0/aquatone_linux_amd64_1.7.0.zip -O /tmp/aquatone/aquatone.zip
- !join [bash, -c, "'if [[ ! $(which unzip) ]]; then sudo apt install -y zip; fi'"]
- bash -c 'if [[ ! $(which unzip) ]]; then sudo apt install -y zip; fi'
- unzip /tmp/aquatone/aquatone.zip -d /tmp/aquatone
- !join [mv, /tmp/aquatone/aquatone, *aqua]
- !join [mv /tmp/aquatone/aquatone, *aqua]
- rm -rf /tmp/aquatone
- !join [bash, -c, "'found=false; for loc in {/usr/bin/google-chrome,/usr/bin/google-chrome-beta,/usr/bin/google-chrome-unstable,/usr/bin/chromium-browser,/usr/bin/chromium}; do if [[ $(which $loc) ]]; then found=true; break; fi ; done; if [[ $found = false ]]; then sudo apt install -y chromium-browser ; fi'"]
- bash -c 'found=false; for loc in {/usr/bin/google-chrome,/usr/bin/google-chrome-beta,/usr/bin/google-chrome-unstable,/usr/bin/chromium-browser,/usr/bin/chromium}; do if [[ $(which $loc) ]]; then found=true; break; fi ; done; if [[ $found = false ]]; then sudo apt install -y chromium-browser ; fi'
shell: true

View File

@@ -1,10 +1,12 @@
installed: false
dependencies:
home: &home !get_default "{home}"
go: &gotool !get_tool_path "{go}"
bashrc: &bashrc !join_path [*home, "/.bashrc;"]
commands:
- wget -q https://dl.google.com/go/go1.13.7.linux-amd64.tar.gz -O /tmp/go.tar.gz
- sudo tar -C /usr/local -xvf /tmp/go.tar.gz
- !join [bash, -c, "'if [ ! $(echo ${PATH} | grep $(dirname", *gotool, ")) ]; then echo PATH=${PATH}:/usr/local/go/bin >> ~/.bashrc; fi'"]
- !join ["bash -c 'if [ ! $(echo ${PATH} | grep $(dirname", *gotool, ")) ]; then echo PATH=${PATH}:/usr/local/go/bin >>", *bashrc, "fi'"]
shell: true

View File

@@ -1,9 +1,11 @@
installed: false
dependencies: ["go", "seclists"]
dependencies: [go, seclists]
home: &home !get_default "{home}"
go: &gotool !get_tool_path "{go}"
go_home: &gohome !join_path [*home, "/go/src/github.com/OJ/gobuster &&"]
commands:
- !join [*gotool, get, github.com/OJ/gobuster]
- !join [(cd, ~/go/src/github.com/OJ/gobuster, "&&", *gotool, "build &&", *gotool, install)]
- !join [*gotool, get github.com/OJ/gobuster]
- !join [(cd, *gohome, *gotool, build &&, *gotool, install)]
shell: true

View File

@@ -3,8 +3,8 @@ dependencies:
service-file: &svcfile !get_tool_path "{luigid}"
commands:
- !join [sudo, cp, *svcfile, /lib/systemd/system/luigid.service]
- !join [sudo, cp, *svcfile, $(which luigid), /usr/local/bin]
- !join [sudo cp, *svcfile, /lib/systemd/system/luigid.service]
- !join [sudo cp, *svcfile, $(which luigid), /usr/local/bin]
- sudo systemctl daemon-reload
- sudo systemctl start luigid.service
- sudo systemctl enable luigid.service

View File

@@ -5,8 +5,8 @@ masscan: &masscan !get_tool_path "{masscan}"
commands:
- git clone https://github.com/robertdavidgraham/masscan /tmp/masscan
- make -s -j -C /tmp/masscan
- !join [mv, /tmp/masscan/bin/masscan, *masscan]
- !join [mv /tmp/masscan/bin/masscan, *masscan]
- rm -rf /tmp/masscan
- !join [sudo, setcap, CAP_NET_RAW+ep, *masscan]
- !join [sudo setcap CAP_NET_RAW+ep, *masscan]
shell: true

View File

@@ -1,10 +1,10 @@
installed: false
dependencies: ["go"]
dependencies: [go]
recursive-parent: &recpar !get_parent "{recursive-gobuster}"
commands:
- !join [bash, -c, "'if [ -d", *recpar, "]; then cd", *recpar,
- !join ["bash -c 'if [ -d", *recpar, "]; then cd", *recpar,
"&& git fetch --all && git pull; else git clone https://github.com/epi052/recursive-gobuster.git",
*recpar, "; fi'"]
*recpar, ; fi']
shell: true

View File

@@ -9,11 +9,11 @@ homesploit: &homesploit !join_path [*home, ".searchsploit_rc"]
sed-command: &sedcom !join_empty ["'s#/opt#", *tools, "#g'"]
commands:
- !join [bash, -c, "'if [ -d /usr/share/exploitdb ]; then ln -fs /usr/share/exploitdb",
- !join ["bash -c 'if [ -d /usr/share/exploitdb ]; then ln -fs /usr/share/exploitdb",
*exploitdb, "&& sudo ln -fs $(which searchsploit)", *searchsploit,
"; elif [ -d", *exploitdb, "]; then cd", *exploitdb,
"&& git fetch --all && git pull; else git clone https://github.com/offensive-security/exploitdb.git", *exploitdb, "; fi'"]
- !join [bash, -c, "'if [ -f", *ss_rc, "]; then cp -n", *ss_rc, *home, "; fi'"]
- !join [bash, -c, "'if [ -f", *homesploit, "]; then sed -i", *sedcom, *homesploit, "; fi'"]
"&& git fetch --all && git pull; else git clone https://github.com/offensive-security/exploitdb.git", *exploitdb, ; fi']
- !join ["bash -c 'if [ -f", *ss_rc, "]; then cp -n", *ss_rc, *home, ; fi']
- !join ["bash -c 'if [ -f", *homesploit, "]; then sed -i", *sedcom, *homesploit, ; fi']
shell: true

View File

@@ -3,8 +3,8 @@ depencencies:
seclists-file: &secfile !get_tool_path "{seclists}"
commands:
- !join [bash, -c, "'if [[ -d /usr/share/seclists ]];", "then ln -s /usr/share/seclists",
- !join ["bash -c 'if [[ -d /usr/share/seclists ]]; then ln -s /usr/share/seclists",
*secfile, "; elif [[ -d", *secfile, "]] ; then cd", *secfile, "&& git fetch --all && git pull;",
"else git clone https://github.com/danielmiessler/SecLists.git", *secfile, "; fi'"]
else git clone https://github.com/danielmiessler/SecLists.git, *secfile, ; fi']
shell: true

View File

@@ -1,9 +1,11 @@
installed: false
dependencies: ["go"]
dependencies: [go]
go: &gotool !get_tool_path "{go}"
home: &home !get_default "{home}"
subjack_home: &subjhome !join_path [*home, "/go/src/github.com/haccer/subjack &&"]
commands:
- !join [*gotool, get, github.com/haccer/subjack]
- !join ["(cd ~/go/src/github.com/haccer/subjack &&", *gotool, "install)"]
- !join [*gotool, get github.com/haccer/subjack]
- !join [(cd, *subjhome, *gotool, install)]
shell: true

View File

@@ -1,9 +1,11 @@
installed: false
dependencies: ["go"]
dependencies: [go]
go: &gotool !get_tool_path "{go}"
home: &home !get_default "{home}"
tko_home: &tkohome !join_path [*home, "go/src/github.com/anshumanbh/tko-subs &&"]
commands:
- !join [*gotool, get, github.com/anshumanbh/tko-subs]
- !join ["(cd ~/go/src/github.com/anshumanbh/tko-subs && ", *gotool, "build && ", *gotool, "install)"]
- !join [(cd, *tkohome, *gotool, "build &&", *gotool, "install)"]
shell: true

View File

@@ -1,9 +1,11 @@
installed: false
dependencies: ["go"]
dependencies: [go]
home: &home !get_default "{home}"
go: &gotool !get_tool_path "{go}"
webanalyze_home: &webhome !join_path [*home, "/go/src/github.com/rverton/webanalyze &&"]
commands:
- !join [*gotool, get, github.com/rverton/webanalyze/...]
- !join ["(cd ~/go/src/github.com/rverton/webanalyze &&", *gotool, "build &&", *gotool, "install)"]
- !join [*gotool, get github.com/rverton/webanalyze/...]
- !join [(cd, *webhome, *gotool, "build &&", *gotool, install)]
shell: true