Compare commits

...

3 Commits

Author SHA1 Message Date
4d7d537625 Add bash_alais in .zshrc (for kali) 2023-02-18 11:23:17 -05:00
d56ba2432b Fix+Update SSH generation 2023-02-18 10:50:09 -05:00
034b0bf725 Fix alias name 2023-02-18 10:32:04 -05:00

View File

@ -171,6 +171,13 @@ aliascmd() {
sed -i '/# Alias created by PenTools/,/# https:\/\/github.com\/d3vyce\/pentools/d' ~/.bash_aliases
fi
if ! grep -q ".bash_aliases" ~/.zshrc >/dev/null 2>&1; then
echo '{
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi}' >> ~/.zshrc
fi
echo "
# Alias created by PenTools" >> ~/.bash_aliases
@ -181,10 +188,10 @@ aliascmd() {
echo "alias sublime='/opt/sublime_text/sublime_text'" >> ~/.bash_aliases
printf ${GREEN}"[+] pwncat [port]\n"
echo "alias sublime='sudo pwncat-cs --listen --port '" >> ~/.bash_aliases
echo "alias pwncat='sudo pwncat-cs --listen --port '" >> ~/.bash_aliases
printf ${GREEN}"[+] openvpn [file.ovpn]\n"
echo "alias sublime='sudo openvpn '" >> ~/.bash_aliases
echo "alias vpn='sudo openvpn '" >> ~/.bash_aliases
echo "# https://github.com/d3vyce/pentools" >> ~/.bash_aliases
source ~/.bash_aliases
@ -248,7 +255,16 @@ case $CHOICE in
;;
esac
if [ SSH_GEN -eq 'y' ]; then
if [ $SSH_GEN == 'y' ]; then
FILE=~/.ssh/id_rsa
if [ -f "$FILE" ]; then
read -p "${BLUE}SSH keys are already present, do you want to saved them up before generating new ones? (y/n) [${YELLOW}y${BLUE}]: ${YELLOW}" SSH_SAVE
SSH_SAVE=${SSH_SAVE:-y}
if [ $SSH_SAVE == 'y' ]; then
mv ~/.ssh/id_rsa ~/.ssh/id_rsa.save
mv ~/.ssh/id_rsa.pub ~/.ssh/id_rsa.pub.save
fi
fi
printf ${GREEN}"[+] Creation of your ssh key pair...\n"
ssh-keygen -q -t rsa -N '' -f ~/.ssh/id_rsa >/dev/null 2>&1
printf "${ITALIC_LIGHT_CYAN}"