Skip to content

Commit

Permalink
revamped function. build should work
Browse files Browse the repository at this point in the history
  • Loading branch information
alexrf45 committed Sep 18, 2023
1 parent 048a479 commit a43d16f
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 131 deletions.
63 changes: 47 additions & 16 deletions kali.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,52 @@
#!/bin/bash

kali $1 ()
{
mkdir $1 && cd $1 && \
docker run --name $1 -it \
--net=host --entrypoint=/bin/zsh \
--cap-add=NET_ADMIN \
-v $HOME/.katet:/home/kali/.katet \
-v $HOME/.Xauthority:/home/kali/.Xauthority:ro \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v `pwd`/.kali-logs:/root/.logs:rw \
-v `pwd`:/$1 \
-w /$1 \
-e DISPLAY=$DISPLAY \
-e TARGET=$TARGET -e IP=$IP -e DOMAIN=$DOMAIN \
-e TZ=$TIME_ZONE -e NAME=$1 \
fonalex45/kali-d:latest
# kali $1 ()
# {
# mkdir $1 && cd $1 && \
# docker run --name $1 -it \
# --net=host --entrypoint=/bin/zsh \
# --cap-add=NET_ADMIN \
# -v $HOME/.katet:/home/kali/.katet \
# -v $HOME/.Xauthority:/home/kali/.Xauthority:ro \
# -v /tmp/.X11-unix:/tmp/.X11-unix \
# -v `pwd`/.kali-logs:/root/.logs:rw \
# -v `pwd`:/$1 \
# -w /$1 \
# -e DISPLAY=$DISPLAY \
# -e TARGET=$TARGET -e IP=$IP -e DOMAIN=$DOMAIN \
# -e TZ=$TIME_ZONE -e NAME=$1 \
# fonalex45/kali-d:latest
# }

kali-directory $1 () {
mkdir -p $1/{recon,www,exploit,pivot,report} && cd $1
}

kali $1 () {
if [ ! -d `pwd`/.kali-logs ];
then
mkdir -p $1/{recon,www,exploit,pivot,report} && cd $1 && \
mkdir .kali-logs \
&& docker run --name $1 -it \
--net=host --entrypoint=/bin/zsh \
--cap-add=NET_ADMIN \
-e DISPLAY=$DISPLAY -e DOMAIN=$DOMAIN \
-e TARGET=$TARGET -e IP=$IP -e TZ=$TIME_ZONE -e NAME=$1 \
-v `pwd`/.kali-logs:$HOME/.logs:rw -v `pwd`:/$1 \
-v $HOME/.Xauthority:$HOME/.Xauthority:ro \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-w /$1 fonalex45/kali-d:latest
else
docker run --name $1 -it \
--net=host --entrypoint=/bin/zsh \
--cap-add=NET_ADMIN \
-e DOMAIN=$DOMAIN -e DISPLAY=$DISPLAY \
-e TARGET=$TARGET -e IP=$IP \
-e TZ=$TIME_ZONE -e NAME=$1 \
-v `pwd`/.kali-logs:/root/.logs:rw -v `pwd`:/$1 \
-v $HOME/.Xauthority:$HOME/.Xauthority:ro -v /tmp/.X11-unix:/tmp/.X11-unix \
-w /$1 fonalex45/kali-d:latest
fi
}

kali-start $1 ()
Expand Down
112 changes: 0 additions & 112 deletions resources/zsh/zshrc_example

This file was deleted.

6 changes: 3 additions & 3 deletions sources/1-tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ install_go() {
}

httpx_install() {
wget -q https://github.com/projectdiscovery/httpx/releases/download/v1.3.4/httpx_1.3.5_linux_amd64.zip &&
wget -q https://github.com/projectdiscovery/httpx/releases/download/v1.3.5/httpx_1.3.5_linux_amd64.zip &&
unzip httpx_1.3.5_linux_amd64.zip -d ./httpx &&
rm httpx_1.3.5_linux_amd64.zip &&
mv httpx/httpx /home/kali/.local/http-x &&
Expand Down Expand Up @@ -55,10 +55,10 @@ active_directory() {
pivot() {
cd /home/kali/tools/ &&
wget -q -O chisel.gz \
"https://github.com/jpillora/chisel/releases/download/v1.8.1/chisel_1.9.1_linux_amd64.gz" &&
"https://github.com/jpillora/chisel/releases/download/v1.9.1/chisel_1.9.1_linux_amd64.gz" &&
gunzip chisel.gz &&
wget -q -O win-chisel.gz \
"https://github.com/jpillora/chisel/releases/download/v1.8.1/chisel_1.9.1_windows_amd64.gz" &&
"https://github.com/jpillora/chisel/releases/download/v1.9.1/chisel_1.9.1_windows_amd64.gz" &&
gunzip win-chisel.gz
}

Expand Down

0 comments on commit a43d16f

Please sign in to comment.