-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from trickest/polish
Polish
- Loading branch information
Showing
5 changed files
with
59 additions
and
38 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 |
---|---|---|
@@ -1,23 +1,21 @@ | ||
FROM golang:1.13.4-alpine3.10 AS build | ||
FROM golang:1.17.2-alpine AS build-env | ||
|
||
LABEL maintainer="[email protected]" | ||
RUN apk add git | ||
ADD . /go/src/mkpath | ||
WORKDIR /go/src/mkpath | ||
RUN git checkout 1fe6937 && go build -o mkpath | ||
|
||
RUN apk add --no-cache --upgrade git openssh-client ca-certificates bash | ||
FROM alpine:3.14 | ||
LABEL licenses.mkpath.name="MIT" \ | ||
licenses.mkpath.url="https://github.com/trickest/mkpath/blob/1fe6937da4346340b514759e83a40ba231bba5e2/LICENSE" \ | ||
licenses.golang.name="bsd-3-clause" \ | ||
licenses.golang.url="https://go.dev/LICENSE?m=text" | ||
|
||
COPY . /app | ||
COPY --from=build-env /go/src/mkpath/mkpath /bin/mkpath | ||
|
||
WORKDIR /app | ||
|
||
RUN go build -o mkpath | ||
|
||
FROM alpine:3.10 | ||
RUN mkdir -p /hive/in /hive/out | ||
|
||
WORKDIR /app | ||
RUN apk add bash | ||
|
||
RUN mkdir -p /hive/in | ||
|
||
RUN mkdir -p /hive/out | ||
|
||
COPY --from=build /app/mkpath /usr/bin/mkpath | ||
|
||
ENTRYPOINT ["mkpath"] | ||
ENTRYPOINT [ "mkpath" ] |
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 |
---|---|---|
@@ -1,48 +1,63 @@ | ||
mkpath | ||
------ | ||
Make paths using a wordlist | ||
<h1 align="center">mkpath <a href="https://twitter.com/intent/tweet?text=mkpath%20-%20Make%20URL%20path%20combinations%20using%20a%20wordlist%20https%3A%2F%2Fgithub.com%2Ftrickest%2Fmkpath&hashtags=bugbounty,bugbountytips,infosec"><img src="https://img.shields.io/badge/Tweet--lightgrey?logo=twitter&style=social" alt="Tweet" height="20"/></a></h1> | ||
<h3 align="center">Make URL path combinations using a wordlist</h3> | ||
|
||
Read a wordlist file and generate paths for given domain or list of domains. | ||
Input from wordlist file is lowercased and unique words are processed. Additionally, wordlist can be | ||
filtered using regex. | ||
![mkpath](mkpath.png "mkpath") | ||
|
||
Read a wordlist file and generate path combinations for given domain or list of domains. Input from wordlist file is lowercased and unique words are processed. Additionally, wordlist can be filtered using regex. | ||
|
||
When you use mkpath's `-l` parameter, it will generate all path combinations up to the specified level, including all lower levels, using words from the wordlist. For instance, with `-l 2`, it will generate `len(permutation_list)^2 + len(permutation_list)` results, which is: | ||
- 30 combinations for a 5-word wordlist. | ||
- 10100 combinations for a 100-word wordlist. | ||
- 250500 combinations for a 500-word wordlist. | ||
|
||
|
||
# Installation | ||
## Binary | ||
Binaries are available in the [latest release](https://github.com/trickest/mkpath/releases/latest). | ||
|
||
## Docker | ||
``` | ||
docker run quay.io/trickest/mkpath | ||
``` | ||
|
||
## From source | ||
``` | ||
go install github.com/trickest/mkpath@latest | ||
``` | ||
|
||
# Usage | ||
``` | ||
Usage of mkpath: | ||
-d string | ||
Input domain | ||
-df string | ||
Input domain file, one domain per line | ||
-l int | ||
Path depth to generate (default 1) | ||
URL path depth to generate (default 1) (default 1) | ||
-lower | ||
Convert wordlist file content to lowercase (default false) | ||
-o string | ||
Output file (optional) | ||
-only-dirs | ||
Generate directories only, files are filtered out (default false) | ||
-only-files | ||
Generate files only, file names are appended to given domains (default false) | ||
-r string | ||
Regex to filter words from wordlist file | ||
-w string | ||
Wordlist file | ||
-lower | ||
Convert wordlist file content to lowercase (default false) | ||
-only-dirs | ||
Generate directories only, files are filtered out (default false) | ||
-only-files | ||
Generate files only, file names are appended to given domains (default false) | ||
*If both only-dirs and only-files are set to true or false, the output will be complete, | ||
meaning all possible directory paths will be generated, as well as those paths with all file names appended* | ||
``` | ||
|
||
### Example | ||
|
||
##### wordlist.txt | ||
``` | ||
dev | ||
prod/ | ||
admin.py | ||
app/login.html | ||
``` | ||
|
||
```shell script | ||
> go run mkpath.go -d example.com -l 2 -w wordlist.txt | ||
$ mkpath -d example.com -l 2 -w wordlist.txt | ||
example.com/dev | ||
example.com/prod | ||
example.com/dev/dev | ||
|
@@ -63,3 +78,11 @@ example.com/prod/prod/admin.py | |
example.com/prod/prod/app/login.html | ||
|
||
``` | ||
|
||
# Report Bugs / Feedback | ||
We look forward to any feedback you want to share with us or if you're stuck with a problem you can contact us at [[email protected]](mailto:[email protected]). You can also create an [Issue](https://github.com/trickest/mkpath/issues/new) or pull request on the Github repository. | ||
|
||
# Where does this fit in your methodology? | ||
Mkpath is an integral part of many workflows in the Trickest store. Sign up on [trickest.com](https://trickest.com) to get access to these workflows or build your own from scratch! | ||
|
||
[<img src="./banner.png" />](https://trickest-access.paperform.co/) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module mkpath | ||
module github.com/trickest/mkpath | ||
|
||
go 1.17 | ||
go 1.18 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.