[GH-ISSUE #315] unable to execute /usr/bin/katoolin #256

Open
opened 2026-02-26 04:30:53 +03:00 by kerem · 13 comments
Owner

Originally created by @nathmo on GitHub (Apr 17, 2022).
Original GitHub issue: https://github.com/LionSec/katoolin/issues/315

unable to execute /usr/bin/katoolin

the shebang was set to python but python was updated and should explicitly specify python2
if you manually fix that by edditing the first line and running "sudo apt install python2" you might run into

unable to execute /usr/bin/katoolin: No such file or directory
to fix that you should replace the line 53 by
"apt-key adv --keyserver --keyserver keyserver.ubuntu.com --recv-keys ED444FF07D8D0BF6"

since this tool seems to be no longer maintained i forked it and made those two modification.

here is how to fix it without manually patching the script
sudo su
rm -rf katoolin
rm /usr/bin/katoolin
apt install python2
git clone https://github.com/nathmo/katoolin.git && cp katoolin/katoolin.py /usr/bin/katoolin
chmod +x /usr/bin/katoolin
exit

sudo katoolin

Originally created by @nathmo on GitHub (Apr 17, 2022). Original GitHub issue: https://github.com/LionSec/katoolin/issues/315 unable to execute /usr/bin/katoolin the shebang was set to python but python was updated and should explicitly specify python2 if you manually fix that by edditing the first line and running "sudo apt install python2" you might run into unable to execute /usr/bin/katoolin: No such file or directory to fix that you should replace the line 53 by "apt-key adv --keyserver --keyserver keyserver.ubuntu.com --recv-keys ED444FF07D8D0BF6" since this tool seems to be no longer maintained i forked it and made those two modification. here is how to fix it without manually patching the script ` sudo su ` ` rm -rf katoolin ` ` rm /usr/bin/katoolin ` ` apt install python2 ` ` git clone https://github.com/nathmo/katoolin.git && cp katoolin/katoolin.py /usr/bin/katoolin ` ` chmod +x /usr/bin/katoolin ` ` exit ` ` sudo katoolin `
Author
Owner

@Topplehawk commented on GitHub (May 10, 2022):

I have had the same problem, I am using ubuntu 22.04. LionSec please fix this, it is a big problem. I have an old laptop and cant dual boot it so I cant run an older version of ububntu and I need to have ububntu 22.04 for some of the stuff I have been doing.

<!-- gh-comment-id:1122442144 --> @Topplehawk commented on GitHub (May 10, 2022): I have had the same problem, I am using ubuntu 22.04. LionSec please fix this, it is a big problem. I have an old laptop and cant dual boot it so I cant run an older version of ububntu and I need to have ububntu 22.04 for some of the stuff I have been doing.
Author
Owner

@nathmo commented on GitHub (May 10, 2022):

did my fix work for you ?

<!-- gh-comment-id:1122508575 --> @nathmo commented on GitHub (May 10, 2022): did my fix work for you ?
Author
Owner

@Topplehawk commented on GitHub (May 10, 2022):

yes it did, also for anyone reading this you should know that it is best to start over from the beginning but it will say that it already exists, but because it is a locked file since you typed in "sudo su" at the beginning, this means that it wont let you delete it. to deal with this open up terminal and type in "sudo rm -rf" then drag the file into the terminal and hit enter. this will delete the file for you.

<!-- gh-comment-id:1122594573 --> @Topplehawk commented on GitHub (May 10, 2022): yes it did, also for anyone reading this you should know that it is best to start over from the beginning but it will say that it already exists, but because it is a locked file since you typed in "sudo su" at the beginning, this means that it wont let you delete it. to deal with this open up terminal and type in "sudo rm -rf" then drag the file into the terminal and hit enter. this will delete the file for you.
Author
Owner

@xtint commented on GitHub (May 11, 2022):

You do not have the permissions necessary to save the file. Please check that you typed the location correctly and try again

<!-- gh-comment-id:1123068727 --> @xtint commented on GitHub (May 11, 2022): You do not have the permissions necessary to save the file. Please check that you typed the location correctly and try again
Author
Owner

@nathmo commented on GitHub (May 11, 2022):

there. updated the instuction if you attempted to install the broken version first.
(it assume your shell / terminal is in the same path where you ran the command the first time. if not. after writing rm -rf but before pressing enter drag and drop the folder to the terminal so that it add the correct path to delete it.
sudo su
rm -rf katoolin
rm /usr/bin/katoolin
apt install python2
git clone https://github.com/nathmo/katoolin.git && cp katoolin/katoolin.py /usr/bin/katoolin
chmod +x /usr/bin/katoolin
exit

sudo katoolin

<!-- gh-comment-id:1123391346 --> @nathmo commented on GitHub (May 11, 2022): there. updated the instuction if you attempted to install the broken version first. (it assume your shell / terminal is in the same path where you ran the command the first time. if not. after writing rm -rf but before pressing enter drag and drop the folder to the terminal so that it add the correct path to delete it. ` sudo su ` ` rm -rf katoolin ` ` rm /usr/bin/katoolin ` ` apt install python2 ` ` git clone https://github.com/nathmo/katoolin.git && cp katoolin/katoolin.py /usr/bin/katoolin ` ` chmod +x /usr/bin/katoolin ` ` exit ` ` sudo katoolin `
Author
Owner

@Topplehawk commented on GitHub (May 12, 2022):

You do not have the permissions necessary to save the file. Please check that you typed the location correctly and try again

yes this is what i am refering to

<!-- gh-comment-id:1125257290 --> @Topplehawk commented on GitHub (May 12, 2022): > You do not have the permissions necessary to save the file. Please check that you typed the location correctly and try again yes this is what i am refering to
Author
Owner

@doc197 commented on GitHub (Jul 8, 2022):

worked for me ....stupid PYTHON!
Python used to be soooo universal, now look at it, more functional and yet more useless....

<!-- gh-comment-id:1179243921 --> @doc197 commented on GitHub (Jul 8, 2022): worked for me ....stupid PYTHON! Python used to be soooo universal, now look at it, more functional and yet more useless....
Author
Owner

@itsRevela commented on GitHub (Aug 2, 2022):

there. updated the instuction if you attempted to install the broken version first. (it assume your shell / terminal is in the same path where you ran the command the first time. if not. after writing rm -rf but before pressing enter drag and drop the folder to the terminal so that it add the correct path to delete it. sudo su rm -rf katoolin rm /usr/bin/katoolin apt install python2 git clone https://github.com/nathmo/katoolin.git && cp katoolin/katoolin.py /usr/bin/katoolin chmod +x /usr/bin/katoolin exit

sudo katoolin

Some people will have to do the following (after inputting the code above):
cd /usr/bin
sudo nano katoolin
Change #!/usr/bin/python to #!/usr/bin/python2 then press control+x, press enter to write input buffer, press enter to write file name.
Run: sudo ./katoolin

Should work after that :)

<!-- gh-comment-id:1202736231 --> @itsRevela commented on GitHub (Aug 2, 2022): > there. updated the instuction if you attempted to install the broken version first. (it assume your shell / terminal is in the same path where you ran the command the first time. if not. after writing rm -rf but before pressing enter drag and drop the folder to the terminal so that it add the correct path to delete it. `sudo su` `rm -rf katoolin` `rm /usr/bin/katoolin` `apt install python2` `git clone https://github.com/nathmo/katoolin.git && cp katoolin/katoolin.py /usr/bin/katoolin` `chmod +x /usr/bin/katoolin` `exit` > > `sudo katoolin ` Some people will have to do the following (after inputting the code above): `cd /usr/bin` `sudo nano katoolin` Change `#!/usr/bin/python` to `#!/usr/bin/python2` then press control+x, press enter to write input buffer, press enter to write file name. Run: `sudo ./katoolin` Should work after that :)
Author
Owner

@Kingki19 commented on GitHub (Jan 10, 2023):

Thank you very much

<!-- gh-comment-id:1376930739 --> @Kingki19 commented on GitHub (Jan 10, 2023): Thank you very much
Author
Owner

@Rvaldebon commented on GitHub (Mar 26, 2023):

Good morning,

I have a problem for a moment to run option 1 "add kali linux repositories"

An error message tells me:

Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
Executing: /tmp/apt-key-gpghome.CsBIKXJgfT/gpg.1.sh --keyserver pool.sks-keyservers.net --recv-keys ED444FF07D8D0BF6
gpg: failed to receive from keyserver: Server indicated a failure

If anyone has a solution, I'm interested !

<!-- gh-comment-id:1484142277 --> @Rvaldebon commented on GitHub (Mar 26, 2023): Good morning, I have a problem for a moment to run option 1 "add kali linux repositories" An error message tells me: Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)). Executing: /tmp/apt-key-gpghome.CsBIKXJgfT/gpg.1.sh --keyserver pool.sks-keyservers.net --recv-keys ED444FF07D8D0BF6 gpg: failed to receive from keyserver: Server indicated a failure If anyone has a solution, I'm interested !
Author
Owner

@nathmo commented on GitHub (Mar 29, 2023):

Hi, did you try my fork ? or manually modified the version version from @LionSec ?
what OS and what version are you running ?
I currently have no time to look into it but if you can wait it might be fixed in a few weeks.

<!-- gh-comment-id:1488680077 --> @nathmo commented on GitHub (Mar 29, 2023): Hi, did you try my fork ? or manually modified the version version from @LionSec ? what OS and what version are you running ? I currently have no time to look into it but if you can wait it might be fixed in a few weeks.
Author
Owner

@tntxtra commented on GitHub (Apr 14, 2023):

apt-key deprecated would love to try this out. I cloned from yours.

<!-- gh-comment-id:1509002297 --> @tntxtra commented on GitHub (Apr 14, 2023): apt-key deprecated would love to try this out. I cloned from yours.
Author
Owner

@oelja commented on GitHub (Oct 24, 2023):

Thank you! This worked for me on a fresh install of Linux Mint after several hours of making assumptions about python!

<!-- gh-comment-id:1776319714 --> @oelja commented on GitHub (Oct 24, 2023): Thank you! This worked for me on a fresh install of Linux Mint after several hours of making assumptions about python!
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/katoolin-LionSec#256
No description provided.