Update Sat Oct 3 07:45:19 AM CDT 2020
This commit is contained in:
parent
34c4906576
commit
95f937fdb6
165
pimpmykali.sh
165
pimpmykali.sh
|
|
@ -14,7 +14,7 @@
|
||||||
#
|
#
|
||||||
# Revision 0.5 - pimpmyupgrade added!! Fixes broken apt upgrade
|
# Revision 0.5 - pimpmyupgrade added!! Fixes broken apt upgrade
|
||||||
# - deb-src is not enabled -- fixed function : fix_sources
|
# - deb-src is not enabled -- fixed function : fix_sources
|
||||||
# - linux-headers-(uname -r) are not installed - fixed
|
# - linux-headers-(uname -r) not installed - fixed
|
||||||
# - new functions check_vm, virt_what, run_update are what comprise pimpmyupgrade
|
# - new functions check_vm, virt_what, run_update are what comprise pimpmyupgrade
|
||||||
#
|
#
|
||||||
# Revision 0.4b : minor updates
|
# Revision 0.4b : minor updates
|
||||||
|
|
@ -126,10 +126,6 @@
|
||||||
silent='' # uncomment to see all output
|
silent='' # uncomment to see all output
|
||||||
# silent='>/dev/null 2>&1' # uncomment to hide all output
|
# silent='>/dev/null 2>&1' # uncomment to hide all output
|
||||||
|
|
||||||
# vars for virt-what
|
|
||||||
vbox_check=$(virt-what | grep -i -c "virtualbox") # virtualbox check
|
|
||||||
vmware_check=$(virt-what | grep -i -c "vmware") # vmware check
|
|
||||||
|
|
||||||
check_distro() {
|
check_distro() {
|
||||||
distro=$(uname -a | grep -i -c "kali") # distro check
|
distro=$(uname -a | grep -i -c "kali") # distro check
|
||||||
|
|
||||||
|
|
@ -167,11 +163,16 @@ fix_section () {
|
||||||
}
|
}
|
||||||
|
|
||||||
fix_missing () {
|
fix_missing () {
|
||||||
|
# hard setting this per sheepy's request - still debating this 'request'
|
||||||
ln -sf /bin/python2.7 /bin/python
|
ln -sf /bin/python2.7 /bin/python
|
||||||
#ln -sf /bin/python3 /usr/bin/python3.8
|
|
||||||
|
# update and autoremove
|
||||||
eval apt -y update $silent && eval apt -y autoremove $silent
|
eval apt -y update $silent && eval apt -y autoremove $silent
|
||||||
|
|
||||||
|
# remove kali-undercover
|
||||||
eval apt -y remove kali-undercover $silent
|
eval apt -y remove kali-undercover $silent
|
||||||
echo -e "\n $greenplus apt updated "
|
echo -e "\n $greenplus apt updated "
|
||||||
|
|
||||||
python-pip-curl
|
python-pip-curl
|
||||||
python3_pip $force
|
python3_pip $force
|
||||||
seclists $force
|
seclists $force
|
||||||
|
|
@ -384,8 +385,8 @@ fix_sead_run () {
|
||||||
echo -e " $green[<$red@@$green>]$white taking aim\n"
|
echo -e " $green[<$red@@$green>]$white taking aim\n"
|
||||||
echo -e " $green[$red####$green]$white requesting launch code\n"
|
echo -e " $green[$red####$green]$white requesting launch code\n"
|
||||||
echo -e " $green[$red$launch_codes_alpha-$launch_codes_beta-$launch_codes_charlie$green]$white launch code confirmed\n"
|
echo -e " $green[$red$launch_codes_alpha-$launch_codes_beta-$launch_codes_charlie$green]$white launch code confirmed\n"
|
||||||
wait_time=10 # seconds
|
|
||||||
|
|
||||||
|
wait_time=10 # seconds
|
||||||
echo -e " Are you sure you meant to run this script?\n"
|
echo -e " Are you sure you meant to run this script?\n"
|
||||||
temp_cnt=${wait_time}
|
temp_cnt=${wait_time}
|
||||||
while [[ ${temp_cnt} -gt 0 ]];
|
while [[ ${temp_cnt} -gt 0 ]];
|
||||||
|
|
@ -423,7 +424,7 @@ fix_impacket_array () {
|
||||||
for impacket_file in ${arr[@]}; do
|
for impacket_file in ${arr[@]}; do
|
||||||
rm -f /usr/bin/$impacket_file /usr/local/bin/$impacket_file ~/.local/bin/$impacket_file /home/$finduser/.local/bin/$impacket_file
|
rm -f /usr/bin/$impacket_file /usr/local/bin/$impacket_file ~/.local/bin/$impacket_file /home/$finduser/.local/bin/$impacket_file
|
||||||
# removed status of whats being removed from screen, too much screen garbage
|
# removed status of whats being removed from screen, too much screen garbage
|
||||||
# echo -e "\n $greenplus $impacket_file removed from /usr/bin /usr/local/bin ~/.local/bin /home/$finduser/.local/bin"
|
# echo -e "\n $greenplus $impacket_file removed"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -467,39 +468,6 @@ fix_impacket () {
|
||||||
echo -e "\n $greenplus installed: python3-pip python3-impacket impacket-scripts"
|
echo -e "\n $greenplus installed: python3-pip python3-impacket impacket-scripts"
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
|
||||||
# basrc_udpate - still debating this section or not.. adding go paths to ~/.bashrc aparentally breaks ability to compile?
|
|
||||||
#
|
|
||||||
#bashrc_update () {
|
|
||||||
# check_bashrc_vpnip=$(cat $HOME/.bashrc | grep -i -c "vpnip=")
|
|
||||||
# if [ $check_bashrc_vpnip -ne 1 ]
|
|
||||||
# then
|
|
||||||
# echo -e "\nalias vpnip='ifconfig tun0 | grep -m1 inet | awk '\''{print(\$2)}'\'''"
|
|
||||||
# echo -e "\n $greenplus added vpnip alias to $HOME/.bashrc"
|
|
||||||
# else
|
|
||||||
# echo -e "\n vpnip= found in .bashrc - not updating"
|
|
||||||
# fi
|
|
||||||
#
|
|
||||||
# check_bashrc_ex=$(cat $HOME/.bashrc | grep -i -c "ex ()")
|
|
||||||
# if [ $check_bashrc_ex -ne 1 ]
|
|
||||||
# then
|
|
||||||
# echo -e "\nex ()\n{\n if [ -f \$1 ] ; then \n case \$1 in \n *.tar.bz2) tar xjf \$1 ;; "\
|
|
||||||
# "\n *.tar.gz) tar xzf \$1 ;;\n *.tar.xz) tar xJf \$1 ;;\n *.bz2) bunzip2 \$1 ;;"\
|
|
||||||
# "\n *.rar) unrar x \$1 ;;\n *.gz) gunzip \$1 ;;\n *.tar) tar xf \$1 ;;"\
|
|
||||||
# "\n *.tbz2) tar xjf \$1 ;;\n *.tgz) tar xzf \$1 ;;\n *.zip) unzip \$1 ;;"\
|
|
||||||
# "\n *.Z) uncompress \$1;;\n *.7z) 7z x \$1 ;;\n *) echo \"'\$1' cannot be extracted via ex()\" ;;"\
|
|
||||||
# "\n esac\n else\n echo \"'\$1' is not a valid file\"\n fi\n }\n"
|
|
||||||
# echo -e "\n $greenplus Added ex () function to $HOME/.bashrc"
|
|
||||||
# else
|
|
||||||
# echo -e "\n $redminus ex () function found in .bashrc - not updating"
|
|
||||||
# fi
|
|
||||||
# # Still debating this section
|
|
||||||
# # add this!!! export PATH=$PATH:/sbin:/usr/sbin
|
|
||||||
# # ADD THESE ALIASES WEBSRV PORTNUMER AND KILLVPN
|
|
||||||
# # alias websrv='python3 -m http.server $1'
|
|
||||||
# # alias killvpn='killall -9 openvpn'
|
|
||||||
# }
|
|
||||||
|
|
||||||
fix_all () {
|
fix_all () {
|
||||||
fix_sources
|
fix_sources
|
||||||
fix_missing $force
|
fix_missing $force
|
||||||
|
|
@ -518,8 +486,65 @@ fix_upgrade () {
|
||||||
check_vm
|
check_vm
|
||||||
}
|
}
|
||||||
|
|
||||||
## Move asciiart somewhere else...
|
bpt () {
|
||||||
|
rm -rf /opt/the-essentials
|
||||||
|
git clone https://github.com/blindpentester/the-essentials /opt/the-essentials
|
||||||
|
cd /opt/the-essentials
|
||||||
|
sh -c '/opt/the-essentials/the_essentials.sh --skip'
|
||||||
|
exit_screen
|
||||||
|
}
|
||||||
|
|
||||||
|
virt_what() {
|
||||||
|
# DISPLAY POWER MANAGEMENT -- ISSUE
|
||||||
|
# if the vm's display goes 'dark' or 'power saving mode' for whatever reason virt-what is not
|
||||||
|
# detecting which hypervisor this is suspect its looking at the video driver or the display itself
|
||||||
|
# maybe implement something here to read the power management settings and drop inplace some that
|
||||||
|
# are not set to dim / turn off display...
|
||||||
|
echo -e "\n $greenplus installing virt-what \n"
|
||||||
|
apt -y update $silent && apt -y install virt-what $silent
|
||||||
|
}
|
||||||
|
|
||||||
|
check_vm () {
|
||||||
|
echo -e "\n $greenplus checking for hypervisor type \n"
|
||||||
|
vbox_check=$(virt-what | grep -i -c "virtualbox") # virtualbox check
|
||||||
|
vmware_check=$(virt-what | grep -i -c "vmware") # vmware check
|
||||||
|
if [ $vbox_check = 1 ]
|
||||||
|
then
|
||||||
|
echo -e "\n $greenplus *** VIRTUALBOX DETECTED *** \n"
|
||||||
|
echo -e "\n $greenplus installing virtualbox-dkms virtualbox-guest-x11"
|
||||||
|
sudo apt -y reinstall virtualbox-dkms virtualbox-guest-x11
|
||||||
|
exit_screen
|
||||||
|
elif [ $vmware_check = 1 ]
|
||||||
|
then
|
||||||
|
echo -e "\n $greenplus *** VMWARE DETECTED *** \n"
|
||||||
|
echo -e "\n $greenplus installing open-vm-tools-desktop fuse"
|
||||||
|
sudo apt -y reinstall open-vm-tools-desktop fuse
|
||||||
|
exit_screen
|
||||||
|
else
|
||||||
|
echo "neither found..."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
fix_sources () {
|
||||||
|
echo "deb http://http.kali.org/kali kali-rolling main contrib non-free" > /etc/apt/sources.list
|
||||||
|
echo "deb-src http://http.kali.org/kali kali-rolling main contrib non-free" >>/etc/apt/sources.list
|
||||||
|
echo -e "\n $greenplus fixed sources /etc/apt/sources.list"
|
||||||
|
}
|
||||||
|
|
||||||
|
run_update () {
|
||||||
|
fix_sources
|
||||||
|
echo -e "\n $greenplus starting pimpmyupgrade \n"
|
||||||
|
apt -y update $silent && sudo apt -y upgrade $silent
|
||||||
|
kernel_check=$(ls /lib/modules | sort -n | tail -n 1)
|
||||||
|
echo -e "\n $greenplus installing linux-headers-$kernel_check \n"
|
||||||
|
|
||||||
|
# Works well, tested multiple systems but keep an eye out for issues
|
||||||
|
apt -y install linux-headers-amd64 $silent # generic meta package for correct linux-headers
|
||||||
|
#apt -y install linux-headers-$kernel_check
|
||||||
|
#apt install -y linux-headers-5.8.0-kali2-amd64
|
||||||
|
}
|
||||||
|
|
||||||
|
# ascii art
|
||||||
asciiart=$(base64 -d <<< "H4sIAAAAAAAAA31QQQrCQAy89xVz9NR8QHoQH+BVCATBvQmCCEXI480kXdteTJfdzGQy2S3wi9EM/2MnSDm3oUoMuJlX3hmsMMSjA4uAtUTsSQ9NUkkKVgKKBXp1lEC0auURW3owsQlTZtf4QtGZgjXYKT4inPtI23oEK7wXlyPnd8arKdKE0EPdUnhIf0v+iE2o7BgVFVyec3u1OxFw+uRxbvPt8R6+MOpGq5cBAAA=" | gunzip )
|
asciiart=$(base64 -d <<< "H4sIAAAAAAAAA31QQQrCQAy89xVz9NR8QHoQH+BVCATBvQmCCEXI480kXdteTJfdzGQy2S3wi9EM/2MnSDm3oUoMuJlX3hmsMMSjA4uAtUTsSQ9NUkkKVgKKBXp1lEC0auURW3owsQlTZtf4QtGZgjXYKT4inPtI23oEK7wXlyPnd8arKdKE0EPdUnhIf0v+iE2o7BgVFVyec3u1OxFw+uRxbvPt8R6+MOpGq5cBAAA=" | gunzip )
|
||||||
|
|
||||||
pimpmykali_menu () {
|
pimpmykali_menu () {
|
||||||
|
|
@ -562,61 +587,6 @@ pimpmykali_menu () {
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bpt () {
|
|
||||||
rm -rf /opt/the-essentials
|
|
||||||
git clone https://github.com/blindpentester/the-essentials /opt/the-essentials
|
|
||||||
cd /opt/the-essentials
|
|
||||||
sh -c '/opt/the-essentials/the_essentials.sh --skip'
|
|
||||||
$bpt_run
|
|
||||||
exit_screen
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
virt_what() {
|
|
||||||
echo -e "\n $greenplus installing virt-what \n"
|
|
||||||
apt -y update $silent && apt -y install virt-what $silent
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
check_vm () {
|
|
||||||
echo -e "\n $greenplus checking for hypervisor type \n"
|
|
||||||
if [ $vbox_check = 1 ]
|
|
||||||
then
|
|
||||||
echo -e "\n $greenplus *** VIRTUALBOX DETECTED *** \n"
|
|
||||||
echo -e "\n $greenplus installing virtualbox-dkms virtualbox-guest-x11"
|
|
||||||
sudo apt -y reinstall virtualbox-dkms virtualbox-guest-x11
|
|
||||||
exit_screen
|
|
||||||
elif [ $vmware_check = 1 ]
|
|
||||||
then
|
|
||||||
echo -e "\n $greenplus *** VMWARE DETECTED *** \n"
|
|
||||||
echo -e "\n $greenplus installing open-vm-tools-desktop fuse"
|
|
||||||
sudo apt -y reinstall open-vm-tools-desktop fuse
|
|
||||||
exit_screen
|
|
||||||
else
|
|
||||||
echo "neither found..."
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
fix_sources () {
|
|
||||||
echo "deb http://http.kali.org/kali kali-rolling main contrib non-free" > /etc/apt/sources.list
|
|
||||||
echo "deb-src http://http.kali.org/kali kali-rolling main contrib non-free" >>/etc/apt/sources.list
|
|
||||||
echo -e "\n $greenplus fixed sources /etc/apt/sources.list"
|
|
||||||
}
|
|
||||||
|
|
||||||
run_update () {
|
|
||||||
fix_sources
|
|
||||||
echo -e "\n $greenplus starting pimpmyupgrade \n"
|
|
||||||
apt -y update $silent && sudo apt -y upgrade $silent
|
|
||||||
kernel_check=$(ls -l /lib/modules | sort -n | cut -d " " -f 10 | tail -n 2) # ya its dirty, but it works
|
|
||||||
echo -e "\n $greenplus installing linux-headers-$kernel_check \n"
|
|
||||||
|
|
||||||
# FIX THIS - need the new kernel info in $kernel_check before the reboot so we dont have to have it hardcorded
|
|
||||||
# as an apt install specific kernel headers.......
|
|
||||||
#apt -y install linux-headers-$kernel_check
|
|
||||||
apt install -y linux-headers-5.8.0-kali2-amd64
|
|
||||||
}
|
|
||||||
|
|
||||||
pimpmykali_help () {
|
pimpmykali_help () {
|
||||||
# do not edit this echo statement, spacing has been fixed and is correct for display terminal
|
# do not edit this echo statement, spacing has been fixed and is correct for display terminal
|
||||||
echo -e "\n valid command line arguements are : \n \n --all run all operations \n"\
|
echo -e "\n valid command line arguements are : \n \n --all run all operations \n"\
|
||||||
|
|
@ -657,7 +627,6 @@ check_arg () {
|
||||||
}
|
}
|
||||||
|
|
||||||
exit_screen () {
|
exit_screen () {
|
||||||
# clear
|
|
||||||
echo -e "$asciiart"
|
echo -e "$asciiart"
|
||||||
echo -e "\n\n All Done! Happy Hacking! \n"
|
echo -e "\n\n All Done! Happy Hacking! \n"
|
||||||
exit
|
exit
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue