Skip to content

Commit acf041e

Browse files
committed
update:set up with a small docker and devcontainer demo
1 parent 61cc6c2 commit acf041e

File tree

4 files changed

+127
-5
lines changed

4 files changed

+127
-5
lines changed

.devcontainer/devcontainer.json

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"name": "Weaponized VSCode DevConatiner",
3+
"image": "esonhugh/weaponized-vscode:latest",
4+
"customizations": {
5+
"vscode": {
6+
"extensions": [
7+
////////////////////////////////////////////////////////////////
8+
// Main extensions
9+
////////////////////////////////////////////////////////////////
10+
// remote controls
11+
"ms-vscode-remote.remote-ssh", // remote ssh controller
12+
"ms-kubernetes-tools.vscode-kubernetes-tools", // Kubernetes Control
13+
14+
// documents and file read helper
15+
"foam.foam-vscode", // double linked knowledge base for showing the relationship in targets in actions
16+
"redhat.vscode-xml", // xml formatter
17+
"redhat.vscode-yaml", // yaml formatter
18+
"euskadi31.json-pretty-printer", // json pretty printer
19+
"ryu1kn.edit-with-shell", // Edit file or selection with any shell command like sort -rn or uniq
20+
21+
////////////////////////////////////////////////////////////////
22+
// Language supports
23+
////////////////////////////////////////////////////////////////
24+
// C#
25+
"icsharpcode.ilspy-vscode", // c# decompiler
26+
// Python
27+
"ms-python.python", // ms python supports
28+
"donjayamanne.python-environment-manager", // python environment/packages manager
29+
// Golang
30+
"golang.go", // golang support
31+
32+
////////////////////////////////////////////////////////////////
33+
// Protocol supports
34+
////////////////////////////////////////////////////////////////
35+
// Database Connections
36+
// "alexcvzz.vscode-sqlite", // sqlite support
37+
//
38+
// Protocols
39+
// "rpdswtk.vsmqtt", // MQTT support
40+
// "Dancheg97.grpc-clicker", // gRPC support
41+
"cweijan.vscode-office", // documents support + http request sender
42+
43+
////////////////////////////////////////////////////////////////
44+
// Custom Favorites
45+
////////////////////////////////////////////////////////////////
46+
"vscodevim.vim", // vim mode support
47+
"ms-vscode-remote.vscode-remote-extensionpack" // remote extension pack
48+
// "mhutchie.git-graph", // git graph
49+
]
50+
}
51+
},
52+
"workspaceFolder": "/workspace"
53+
}

.dockerignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
documents/
2+
craft.py
3+
README.md
4+
LICENSE
5+
releaser.py
6+
verify.py
7+
.github/
8+
.git
9+
.gitignore
10+
.devcontainer/
11+
.vscode/.command_history

.vscode/.zshrc

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,7 @@ function create_project_structure () {
137137
return
138138
fi
139139
mkdir -p $PROJECT_FOLDER/{hosts,users,services}
140-
touch $PROJECT_FOLDER/hosts/host-list.md
141-
touch $PROJECT_FOLDER/users/user-list.md
142-
touch $PROJECT_FOLDER/services/service-list.md
143-
touch $PROJECT_FOLDER/index.md
140+
touch $PROJECT_FOLDER/entrypoint.md
144141
touch $PROJECT_FOLDER/Makefile
145142

146143
echo "Project Folder sturcture created completed!"
@@ -170,7 +167,7 @@ create_project_structure
170167
unset -f create_project_structure
171168

172169
function clean_project_structure () {
173-
rm -rf $PROJECT_FOLDER/{hosts,users,services} $PROJECT_FOLDER/index.md # $PROJECT_FOLDER/Makefile
170+
rm -rf $PROJECT_FOLDER/{hosts,users,services} $PROJECT_FOLDER/entrypoint.md # $PROJECT_FOLDER/Makefile
174171
echo "Project Folder sturcture cleaned completed!"
175172
}
176173

Dockerfile

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# FROM mcr.microsoft.com/devcontainers/python:dev-3.11-bullseye
2+
FROM kalilinux/kali-rolling:latest
3+
4+
LABEL maintainer="Esonhugh"
5+
LABEL description="A development container for pentesting with Python 3.11, ZSH, and various tools."
6+
7+
# update kali source
8+
RUN apt update
9+
10+
RUN apt install -y \
11+
vim \
12+
metasploit-framework nmap \
13+
python3 python3-pip python3-venv
14+
15+
# install uv
16+
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
17+
18+
WORKDIR /tmp
19+
20+
RUN wget https://github.com/bee-san/RustScan/releases/download/2.4.1/rustscan.deb.zip
21+
RUN unzip rustscan.deb.zip && \
22+
apt install -y ./rustscan_2.4.1-1_amd64.deb && \
23+
rm -rf rustscan.deb.zip rustscan_2.4.1-1_amd64.deb rustscan.tmp0-stripped
24+
25+
COPY --from=golang:1.24 /usr/local/go/ /usr/local/go/
26+
27+
ENV PATH="/root/go/bin:/usr/local/go/bin:${PATH}"
28+
ENV PATH="/root/.pdtm/go/bin:${PATH}"
29+
30+
RUN go install -v github.com/projectdiscovery/pdtm/cmd/pdtm@latest
31+
RUN pdtm -i simplehttpserver
32+
33+
# install zsh and oh-my-zsh
34+
RUN apt install -y zsh && chsh -s /bin/zsh
35+
RUN wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh || true
36+
37+
# install
38+
RUN apt install -y \
39+
zsh-syntax-highlighting \
40+
zsh-autosuggestions
41+
42+
RUN echo "source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> /root/.zshrc && \
43+
echo "source /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh" >> /root/.zshrc
44+
45+
RUN apt install -y net-tools
46+
47+
WORKDIR /workspace
48+
49+
COPY .foam /workspace/.foam
50+
COPY .vscode /workspace/.vscode
51+
COPY launch_helper.zsh /root/
52+
53+
RUN echo "" >> /root/.zshrc && \
54+
echo "source /root/launch_helper.zsh" >> /root/.zshrc
55+
RUN echo "" >> /root/.bashrc && \
56+
echo "source /root/launch_helper.zsh" >> /root/.bashrc
57+
58+
59+
ENV PROJECT_FOLDER=/workspace
60+
61+
ENTRYPOINT [ "/bin/zsh" ]

0 commit comments

Comments
 (0)