katoolin issue in Ubuntu 18.04 - "/usr/bin/katoolin: No such file or directory"

I'm using Ubuntu 18.04 Bionic. I have installed katoolin but it does not run. I'm using below commands

git clone https://github.com/LionSec/katoolin.git
sudo cp katoolin/katoolin.py /usr/bin/katoolin
sudo chmod a+x /usr/bin/katoolin
sudo katoolin

but after all I'm facing below error.

sudo: unable to execute /usr/bin/katoolin: No such file or directory

please help.


Open the terminal and type:

git clone https://github.com/LionSec/katoolin.git
sudo cp katoolin/katoolin.py /usr/bin/katoolin
sudo chmod a+x /usr/bin/katoolin
cd /usr/bin/ # change directories to the directory where katoolin is located  
sudo ./katoolin # execute the katoolin script  

This is happening because you have different version on python installed and you katoolin have different version.

You have to edit this line

#!/usr/bin/python

I have python3 so adding python3. Add your version here

  1. nano /usr/bin/katoolin

  2. #!/usr/bin/python Into

  3. #!/usr/bin/python3

  4. sudo katoolin

After this may be You will get error like this

 File "/usr/bin/katoolin", 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")?

If you got error like this Change this line

print "Sorry. This script requires sudo privledges"

Into

print ("Sorry. This script requires sudo privledges")

If you have different version you will get an error like this

Traceback (most recent call last):


File "/usr/bin/katoolin", line 1294, in main
    inicio1()
  File "/usr/bin/katoolin", line 41, in inicio1
    opcion0 = raw_input("\033[1;36mkat > \033[1;m")
NameError: name 'raw_input' is not defined

Do like this For Python 3.x, use input(). For Python 2.x, use raw_input()

  1. Change all raw_input Into
  2. input If you are a python3 users. or For python2 use raw_input.

If you solve your problem can you approve my answer.