├── KaliFixer ├── README.md └── install.sh /KaliFixer: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo """ 4 | +---------------------------------------------------------------------------------+ 5 | | Author:- Techwebspot | 6 | +---------------------------------------------------------------------------------+ 7 | _ __ _ _ 8 | | |/ / | (_) 9 | | ' / __ _| |_| 10 | | < / _\` | | | 11 | | . \ (_| | | | 12 | |_|\_\__,_|_|_| _____ 13 | / __(_)_ _____ ____ 14 | / _// /\ \ / -_) __/ 15 | /_/ /_//_\_\\__/_/ 16 | """ 17 | 18 | if [ $EUID != 0 ] 19 | then 20 | echo "------------------------------------------------------------------------------------" 21 | echo " Run as a root " 22 | echo "------------------------------------------------------------------------------------" 23 | exit 1 24 | fi 25 | 26 | function kali-rolling(){ 27 | printf "[+] Using Kali rolling\n" 28 | if [ -w /etc/apt/sources.list ] 29 | then 30 | printf "[+] Updating repos, please wait...\n" 31 | cat <<-EOF > /etc/apt/sources.list 32 | deb http://http.kali.org/kali kali-rolling main contrib non-free 33 | # For source package access, uncomment the following line 34 | # deb-src http://http.kali.org/kali kali-rolling main contrib non-free 35 | EOF 36 | fi 37 | } 38 | 39 | function kali-sana(){ 40 | printf "[+] Using Kali Sana\n" 41 | if [ -w /etc/apt/sources.list ] 42 | then 43 | printf "[+] Updating repos, please wait...\n" 44 | cat <<-EOF > /etc/apt/sources.list 45 | deb http://old.kali.org/kali sana main non-free contrib 46 | # For source package access, uncomment the following line 47 | # deb-src http://old.kali.org/kali sana main non-free contrib 48 | EOF 49 | fi 50 | } 51 | 52 | function kali-moto(){ 53 | printf "[+] Using Kali Moto\n" 54 | if [ -w /etc/apt/sources.list ] 55 | then 56 | printf "[+] Updating repos, please wait...\n" 57 | cat <<-EOF > /etc/apt/sources.list 58 | deb http://old.kali.org/kali moto main non-free contrib 59 | # For source package access, uncomment the following line 60 | # deb-src http://old.kali.org/kali moto main non-free contrib 61 | EOF 62 | fi 63 | } 64 | 65 | function fixit(){ 66 | printf "[+] Cleaning the local repository of retrieved package files...\n" 67 | apt-get clean 68 | printf "[+] Fixing the errors...\n" 69 | apt-get -f install 70 | } 71 | 72 | echo -e "[+] Detecting the version of your Kali Linux machine...\n" 73 | 74 | VERSION=$(grep VERSION_ID /etc/os-release | cut -d '"' -f2) 75 | 76 | if [[ $VERSION == 1.[0-9] ]] 77 | then 78 | kali-moto 79 | fixit 80 | elif [[ $VERSION == 2.[0-9] ]] 81 | then 82 | kali-sana 83 | fixit 84 | elif [[ $VERSION == 201[0-9].[0-9] ]] 85 | then 86 | kali-rolling 87 | fixit 88 | else 89 | echo -e "[-] Can't detect the version of your machine, make sure you are using Kali Linux Operating System.\n" 90 | fi 91 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # KaliFixer 2 | 3 | #### Credits: 4 | 5 | I'd like to thank https://hackingvision.com owner & michael (condor) to help me make my script better. 6 | 7 | If this tool came in helpful for you please consider leaving a star at Kali Fixer Github repo. 8 | 9 | #### Description: 10 | KaliFixer is a bash script created to help newbies in Kali Linux. We have all been there that dreaded moment when we try to update Kali Linux using apt-get only to be presented with update errors. Don’t worry KaliFixer is on hand !. 11 | 12 | This script will first find the version of Kali using kernel headers of your Kali install once the version of Kali Linux is found it will update sources.list with the correct repositories for Kali to function correctly. Enjoy if this script was useful to use consider sharing it with friends & on social media. 13 | 14 | #### Requirements: 15 | 1. Kali Linux 16 | 2. Bash shell 17 | 3. git (optional) 18 | 19 | #### Installing from web browser 20 | 1. Download the zip file using the "Clone or download" button. 21 | 2. Navigate to the download directory and unzip the archive. 22 | 3. Open a terminal and navigate to the target directory. 23 | `cd ~/Downloads/KaliFixer-master` 24 | 4. Give permission to install script. 25 | `chmod +x install.sh` 26 | 5. Install the script. 27 | `./install.sh` 28 | 6. Execute the script in terminal from any directory. 29 | `KaliFixer` 30 | 31 | #### Installing from command line 32 | 1. Open a terminal and enter the following commands. 33 | ``` 34 | cd ~/Downloads 35 | git clone https://github.com/techwebspot/KaliFixer.git 36 | cd KaliFixer-master 37 | chmod +x install.sh 38 | KaliFixer 39 | ``` 40 | 41 | -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo """ 4 | +---------------------------------------------------------------------------------+ 5 | | Author:- Techwebspot | 6 | +---------------------------------------------------------------------------------+ 7 | _ __ _ _ 8 | | |/ / | (_) 9 | | ' / __ _| |_| 10 | | < / _\` | | | 11 | | . \ (_| | | | 12 | |_|\_\__,_|_|_| _____ 13 | / __(_)_ _____ ____ 14 | / _// /\ \ / -_) __/ 15 | /_/ /_//_\_\\__/_/ 16 | 17 | ___ _ _ _ 18 | |_ _|_ __ ___| |_ __ _| | | ___ _ __ 19 | | || '_ \/ __| __/ \` | | |/ _ \ '__| 20 | | || | | \__ \ || (_| | | | __/ | 21 | |___|_| |_|___/\__\__,_|_|_|\___|_| 22 | """ 23 | 24 | if [ $EUID != 0 ] 25 | then 26 | echo "------------------------------------------------------------------------------------" 27 | echo " Run as a root " 28 | echo "------------------------------------------------------------------------------------" 29 | exit 1 30 | fi 31 | 32 | echo -e "Installing the script...\n" 33 | 34 | cp KaliFixer /usr/local/bin/KaliFixer 35 | 36 | echo -e "Copying the main file to system directory...\n" 37 | 38 | cd /usr/local/bin/ && chmod +x KaliFixer 39 | 40 | echo -e "Giving the permission to tool...\n" 41 | 42 | echo -e "Script Installed successfully\n" 43 | 44 | echo -e "Write command 'KaliFixer' in terminal from any directory to start the script :)\n" 45 | --------------------------------------------------------------------------------