Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit db8fb47

Browse files
committed
Add Dockerized build & run
1 parent 1347d60 commit db8fb47

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed

‎Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM n0madic/alpine-gcc:9.2.0
2+
RUN apk add --quiet --no-cache libressl-dev
3+
COPY ./*.h /opt/src/
4+
COPY ./*.c /opt/src/
5+
COPY Makefile /opt/src/
6+
COPY entrypoint.sh /
7+
#RUN apt-get install libssl-dev
8+
WORKDIR /opt/src
9+
RUN make
10+
RUN make OPENSSL=/usr/local/opt/openssl/include OPENSSL_LIB=-L/usr/local/opt/openssl/lib
11+
RUN ["chmod", "+x", "/entrypoint.sh"]
12+
RUN ["chmod", "+x", "/opt/src/jwtcrack"]
13+
ENTRYPOINT ["/entrypoint.sh"]

‎README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,19 @@ A multi-threaded JWT brute-force cracker written in C. If you are very lucky or
44

55
I used the [Apple Base64 implementation](https://opensource.apple.com/source/QuickTimeStreamingServer/QuickTimeStreamingServer-452/CommonUtilitiesLib/base64.c) that I modified slightly.
66

7-
## Compile
7+
## Build a Docker Image
8+
```
9+
docker build . -t jwtcrack
10+
11+
```
12+
13+
14+
## Run on Docker
15+
```
16+
docker run -it --rm jwtcrack eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.cAOIAifu3fykvhkHpbuhbvtH807-Z2rI1FS3vX1XMjE
17+
```
18+
19+
## Manual Compilation
820

921
Make sure you have openssl's headers installed.
1022
On Ubuntu you can install them with `apt-get install libssl-dev`

‎entrypoint.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
/opt/src/jwtcrack $@

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /