Setting zshrc file

In Kali Linux, These change needs to be made in a file named as ~/.zshrc . Then save it and reload the file using source ~/.zshrc the command.

Deleted ~/.zshrc file or modified it by mistakenly?? No issue !! you can restore it from here.

cp /etc/skel/.zshrc ~/

Making Temp directory

# Making a temp directory for working

alias usetemp='[ ! -d "/tmp/temp_workspace" ] && mkdir -p "/tmp/temp_workspace"; cd /tmp/temp_workspace'

Setting IPs

# ip Setting.
# export VM1=172.16.244.10
# Check if tun0 interface exists before setting IP_KALI
if ifconfig tun0 &>/dev/null; then
  export IP_KALI=$(ifconfig tun0 | grep 'inet ' | awk '{print $2}')
else
  export IP_KALI="Not connected to VPN"
fi
# If vpn is connected then it will grep and ip in IP_KALI variable.


# For all the IPs, You have to set the value of 'x' first and then export all the variables.
x=184
export web02=192.168.$x.247
export external=192.168.$x.248
export legacy=192.168.$x.249
export mail=192.168.$x.189

Automated way:

Making temp environment

I will create a temporary environment for installing tools and dependencies required during penetration testing. This ensures compatibility and avoids conflicts with the original software or version information of Kali Linux.

Making Help_me function

In order to remember the work done by shortcut. I will be adding this help_me fucntion.

Setting up the server.

This will help you set up a custom port, directory, and file for the server, as well as start the server and provide the command needed to send the file.

Getting shell command

This command will display the reverse shell command and start the server on the specified port.

Last updated