Many of us would like the stability of Ubuntu with the tools of Kali Linux. However, there are slight issues when running on Ubuntu 19.10. Below we will address how to get Katoolin to run on Ubuntu 18 and Ubuntu 19.
Katoolin Not Running on Ubuntu 19.10…
Simply put, Katoolin was written in Python2, but your Ubuntu installation comes default with Python3.
You might be asking, “Can’t I just install Python2 and run Katoolin!?” YES! You can.
But if you are willing to make a couple changes to the code (Literally 2 changes) then you can keep Python3 and run Katoolin. Don’t worry, it is real easy….
The Easy Way.
- You can download the modified file and unzip them to your home directory and run without making any changes to the code. I have done the hard work for you. (I know sometimes you just want to get something running…)
Steps to mod Katoolin yourself
Error Code you will receive:
File “katoolin.py”, line 8 print “sorry. This script requires sudo privledges”
SyntaxError: Missing parentheses in call to ‘print’. Did you mean print(“Sorry. This script requires sudo privledges”)?
Print in python2 only requires ” ” to print. Python3 Requires (). (Yes the answer is in the error….)
- Download Katoolin if you haven’t already from this location. Follow the instructions on the Github page. Katoolin
- Open your favorite text editor. I use Atom. Download here and open up your Katoolin.py file. Likely located in /home/katoolin/ if you have used the lionsec tutorial to install katoolin.
- Go to Line 8
3. Simply change the code from “Sorry. This script requires sudo privleges” to (“Sorry. This script requires sudo privileges”)
4. Save the document. That will fix your Print Error.
Fix The Raw_Input Error
- With your text editor still open, press CTRL + F
- In the Find type: raw_input
- In the Replace type: input
4. Then click Replace all. Doing this will locate all instances of raw_input and replace it with input.
That’s it! Save the document.
1 . Change directorys in Terminal to your Katoolin.py directory. Again, likely /home/katoolin. To do this: open terminal and type cd katoolin.
2. Type: sudo python3 katoolin.py
Katoolin should run without any issues.
This is just a problem with running a python2 written code within python3.
If you have any issues with this tutorial, please let me know in the comments. I really love the work the LionSec has done to get Katoolin ironed out and I have used it on every build of Ubuntu in the past. I like the simplicity and ease of operation.
I am sure there are a million different ways to fix the issues listed above. If you have a better way please list it below in the comments as well.