Skip to content

Commit

Permalink
Fix gobuster install
Browse files Browse the repository at this point in the history
Closes: #20
Closes: #26
  • Loading branch information
oxr463 committed Jul 1, 2022
1 parent 5c77aa3 commit 2201b3e
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 50 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.vagrant
output-alpine/
79 changes: 31 additions & 48 deletions build.alpine.pkr.hcl
Original file line number Diff line number Diff line change
@@ -1,77 +1,60 @@
build {
name = "pentesting-vagrant"
description = "Penetration Testing Virtual Machine"
variable "name" {
type = string
default = "pentesting"
}

sources = [
"source.vagrant.alpine"
]
variable "description" {
type = string
default = "Penetration Testing Virtual Machine"
}

provisioner "shell" {
scripts = [
"scripts/dependencies.sh",
"scripts/apktool.sh",
"scripts/dex2jar.sh",
"scripts/jd_cmd.sh",
"scripts/theharvester.sh",
"scripts/zaproxy.sh"
]
execute_command = "echo 'vagrant' | sudo -S -E sh -c '{{ .Vars }} {{ .Path }}'"
}
variable "scripts" {
default = [
"scripts/dependencies.sh",
"scripts/apktool.sh",
"scripts/dex2jar.sh",
"scripts/gobuster.sh",
"scripts/jd_cmd.sh",
# "scripts/mobsf.sh",
"scripts/theharvester.sh",
"scripts/zaproxy.sh"
]
}

build {
name = "pentesting-docker"
description = "Penetration Testing Virtual Machine"
name = "${var.name}-vagrant"
description = var.description

sources = [
"source.docker.alpine"
"source.vagrant.alpine"
]

provisioner "shell" {
scripts = [
"scripts/dependencies.sh",
"scripts/apktool.sh",
"scripts/dex2jar.sh",
"scripts/jd_cmd.sh",
"scripts/theharvester.sh",
"scripts/zaproxy.sh"
]
scripts = var.scripts
execute_command = "echo 'vagrant' | sudo -S -E sh -c '{{ .Vars }} {{ .Path }}'"
}

provisioner "shell" {
/* Fix permissions */
inline = ["chown -R root:root /opt"]
}
}

build {
name = "pentesting-docker"
description = "Penetration Testing Virtual Machine"
name = "${var.name}-docker"
description = var.description

sources = [
"source.docker.alpine"
]

post-processor "docker-tag" {
repository = "ghcr.io/infinite-omicron/pentesting:latest"
}

provisioner "shell" {
environment_vars = ["PIP_ROOT_USER_ACTION=ignore"]
scripts = [
"scripts/dependencies.sh",
"scripts/apktool.sh",
"scripts/dex2jar.sh",
"scripts/jd_cmd.sh",
"scripts/mobsf.sh",
"scripts/theharvester.sh",
"scripts/zaproxy.sh"
]
scripts = var.scripts
}

provisioner "shell" {
/* Fix permissions */
inline = ["chown -R root:root /opt"]
}

post-processor "docker-tag" {
repository = "ghcr.io/infinite-omicron/pentesting:latest"
}
}

3 changes: 1 addition & 2 deletions scripts/dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set -eu

apk update && \
apk add \
bash \
bzip2 \
coreutils \
curl \
Expand All @@ -27,8 +28,6 @@ apk add \
tar \
unzip

go install github.com/OJ/gobuster@latest

python3 -m pip install --upgrade pip && \
pip install mitmproxy sqlmap sslyze

9 changes: 9 additions & 0 deletions scripts/gobuster.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh
set -eu

git clone https://github.com/oj/gobuster /opt/gobuster

cd /opt/gobuster && \
make && \
cp /opt/gobuster/gobuster /usr/local/bin/gobuster

0 comments on commit 2201b3e

Please sign in to comment.