-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fixed typo * Added subfinder
- Loading branch information
Showing
5 changed files
with
154 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,6 +77,9 @@ | |
}, | ||
{ | ||
"tool_name": "trufflehog" | ||
}, | ||
{ | ||
"tool_name": "subfinder" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
install.sh | ||
run.sh | ||
test.sh | ||
README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
ARG GO_VERSION=1.22.1-alpine | ||
|
||
FROM golang:${GO_VERSION} AS build | ||
|
||
RUN apk add --no-cache wget unzip build-base | ||
WORKDIR /src | ||
|
||
ARG SUBFINDER_VERSION=2.6.6 | ||
|
||
RUN wget -q -k https://github.com/projectdiscovery/subfinder/archive/refs/tags/v${SUBFINDER_VERSION}.zip && \ | ||
unzip v${SUBFINDER_VERSION}.zip && \ | ||
rm v${SUBFINDER_VERSION}.zip && \ | ||
mv /src/subfinder-${SUBFINDER_VERSION} /src/subfinder | ||
|
||
WORKDIR /src/subfinder/v2/cmd/subfinder | ||
|
||
RUN go mod download -x && CGO_ENABLED=0 go build -v -o /subfinder | ||
|
||
FROM alpine:3.19 | ||
LABEL org.opencontainers.image.authors="Arqsz" | ||
# Based on https://github.com/projectdiscovery/subfinder/blob/dev/Dockerfile | ||
|
||
RUN apk add --no-cache bind-tools ca-certificates \ | ||
&& rm -rf /var/cache/apk/* | ||
|
||
COPY --from=build /subfinder /usr/local/bin/subfinder | ||
|
||
ENV PATH="/usr/local/bin:$PATH" | ||
|
||
ENTRYPOINT ["subfinder"] | ||
CMD [ "-help" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
# Containerized subfinder | ||
|
||
## Basic info | ||
|
||
- **Current version**: 2.6.6 | ||
- **Source**: https://github.com/projectdiscovery/subfinder/archive/refs/tags/v2.6.6.zip | ||
|
||
## Use indepentendly of the [containers4pentesters](https://github.com/TheArqsz/containers4pentesters) project | ||
|
||
### CLI | ||
|
||
Use in CLI directly as a pull from the DockerHub: | ||
|
||
```bash | ||
docker pull containers4pentesters/subfinder | ||
docker run -it --rm --name subfinder \ | ||
--user `id -u`:`id -g` \ | ||
--volume "$HOME":"$HOME" \ | ||
--volume "$(pwd)":"$(pwd)" \ | ||
--volume /tmp:/tmp \ | ||
--workdir "$(pwd)" \ | ||
-e HOME="$HOME" \ | ||
-e TERM=$TERM \ | ||
--network host containers4pentesters/subfinder \ | ||
-help | ||
``` | ||
|
||
or as a build (with [containers4pentesters](https://github.com/TheArqsz/containers4pentesters) repository cloned): | ||
|
||
```bash | ||
docker build -q -t containers4pentesters/subfinder:latest /opt/containers4pentesters/tools/subfinder/ | ||
docker run -it --rm --name subfinder \ | ||
--user `id -u`:`id -g` \ | ||
--volume "$HOME":"$HOME" \ | ||
--volume "$(pwd)":"$(pwd)" \ | ||
--volume /tmp:/tmp \ | ||
--workdir "$(pwd)" \ | ||
-e HOME="$HOME" \ | ||
-e TERM=$TERM \ | ||
--network host containers4pentesters/subfinder:latest \ | ||
-help | ||
``` | ||
|
||
### As a script | ||
|
||
You can create a script `/usr/local/bin/subfinder` with given content (pulling from the DockerHub): | ||
|
||
```bash | ||
#!/usr/bin/env bash | ||
|
||
docker pull -q containers4pentesters/subfinder:latest | ||
docker run -it --rm --name subfinder \ | ||
--user `id -u`:`id -g` \ | ||
--volume "$HOME":"$HOME" \ | ||
--volume "$(pwd)":"$(pwd)" \ | ||
--volume /tmp:/tmp \ | ||
--workdir "$(pwd)" \ | ||
-e HOME="$HOME" \ | ||
-e TERM=$TERM \ | ||
--network host containers4pentesters/subfinder \ | ||
"$@" | ||
``` | ||
|
||
or as a build process (with [containers4pentesters](https://github.com/TheArqsz/containers4pentesters) repository cloned): | ||
|
||
```bash | ||
#!/usr/bin/env bash | ||
|
||
docker build -q -t containers4pentesters/subfinder:latest /opt/containers4pentesters/tools/subfinder/ | ||
docker run -it --rm --name subfinder \ | ||
--user `id -u`:`id -g` \ | ||
--volume "$HOME":"$HOME" \ | ||
--volume "$(pwd)":"$(pwd)" \ | ||
--volume /tmp:/tmp \ | ||
--workdir "$(pwd)" \ | ||
-e HOME="$HOME" \ | ||
-e TERM=$TERM \ | ||
--network host containers4pentesters/subfinder \ | ||
"$@" | ||
``` | ||
|
||
You can use the script as if it was a native tool: | ||
|
||
```bash | ||
$ subfinder -d example.com -o results.txt | ||
|
||
__ _____ __ | ||
_______ __/ /_ / __(_)___ ____/ /__ _____ | ||
/ ___/ / / / __ \/ /_/ / __ \/ __ / _ \/ ___/ | ||
(__ ) /_/ / /_/ / __/ / / / / /_/ / __/ / | ||
/____/\__,_/_.___/_/ /_/_/ /_/\__,_/\___/_/ | ||
|
||
projectdiscovery.io | ||
|
||
[INF] Current subfinder version v2.6.6 (latest) | ||
[INF] Loading provider config from ~/.config/subfinder/provider-config.yaml | ||
[INF] Enumerating subdomains for example.com | ||
... | ||
[INF] Found 22699 subdomains for example.com in 28 seconds 231 milliseconds | ||
$ wc -l results.txt | ||
22699 results.txt | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env bash | ||
|
||
SCRIPT_PATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" | ||
TOOLS_PATH="$(dirname $SCRIPT_PATH)" | ||
LIB_PATH="$(dirname $TOOLS_PATH)/lib" | ||
CURRENT_TOOL=$(basename $SCRIPT_PATH) | ||
verify_if_installed=${1:-} | ||
|
||
source "$LIB_PATH/test.sh" | ||
|
||
command_output=$(bash $LIB_PATH/run.sh $CURRENT_TOOL --help) | ||
pattern="Subfinder is a subdomain discovery tool" | ||
|
||
test_tool "$CURRENT_TOOL" "$command_output" "$pattern" "$verify_if_installed" |