LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-02-2021, 11:28 AM   #1
Zido
LQ Newbie
 
Registered: Nov 2021
Posts: 1

Rep: Reputation: Disabled
ImportError: No module named twisted.web


Failing to run sslstrip on kali linux 2021.3 getting "ImportError: No module named twisted.web" as an error
 
Old 11-02-2021, 11:56 AM   #2
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
sslstrip depends on Python 2 and python-twisted-core. I don't know Kali, but I'd suspect that version 2021.3 doesn't support Python 2 anymore (or, at least, doesn't support it in full).

Kali is based on Debian, and according to Debian Wiki:
Quote:
Debian Bullseye includes a version of Python 2.7 (and a short list of related packages like setuptools still built Python 2 packages). However, these are only included for building a few applications which still require Python 2 as part of their build process. Python 2 is not supported for running applications and there won't be any security updates for Python 2 in Bullseye.
Debian only builds python3-twisted for Bullseye. The Python 2 module was dropped.

BTW, Repology doesn't list sslstrip as provided by Kali repos. Where did you get it from?

Last edited by shruggy; 11-02-2021 at 12:15 PM.
 
Old 11-02-2021, 01:14 PM   #3
IshikawaRyan
LQ Newbie
 
Registered: Dec 2019
Distribution: Debian
Posts: 2

Rep: Reputation: Disabled
Quote:
but I'd suspect that version 2021.3 doesn't support Python 2 anymore
Python is just an interpreter, you can install any version of Python you want. Then just setup python symlink properly to newer version (via update-alternatives, for example).
Currently my Debian bullseye distro has two versions (2.7 - predefined, 3.9.2 - installed manually, or predefined too - don't remember ).


But it makes sense what python version sslstip requires.

Quote:
No module named twisted.web" as an error
This is pure python error. It means, you haven't installed specified dependency (twisted.web) yet.
Guess, you should install required python version. And reinstall sslsti then. That's all.

Quote:
(2.7 - predefined, 3.9.2 - installed manually, or predefined too - don't remember ).
Yeah, 2.7 and 3.9.2 are both predefined versions.
Not sure about Kali, i.e. different distros - different distribution policy.

Last edited by IshikawaRyan; 11-02-2021 at 01:23 PM.
 
Old 11-02-2021, 01:19 PM   #4
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
Quote:
Originally Posted by IshikawaRyan View Post
Python is just an interpreter, you can install any version of Python you want.
When I said "doesn't support" I meant "doesn't support in its official repositories". Of course, you can install anything with pip.
 
1 members found this post helpful.
Old 11-02-2021, 01:50 PM   #5
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,804

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
that is interesting. Would be nice to know how did you get it and how did you try to run it.
Actually it (sslstrip) is more than 10 years old. On its home page you can find how can you install twisted.web, it is documented.
 
Old 11-02-2021, 01:59 PM   #6
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
On its home page you can find how can you install twisted.web, it is documented.
Yeah, it says
Quote:
Install twisted: sudo apt-get install python-twisted-web
which won't work in Debian Bullseye because python-twisted-web isn't provided there anymore.

Last edited by shruggy; 11-02-2021 at 02:00 PM.
 
Old 11-02-2021, 02:23 PM   #7
IshikawaRyan
LQ Newbie
 
Registered: Dec 2019
Distribution: Debian
Posts: 2

Rep: Reputation: Disabled
Quote:
Actually it (sslstrip) is more than 10 years old.
OMG. Did not dive this way, just was thinking from error text. Well, suspect the only way to make it work is to find and install it manually.

Last edited by IshikawaRyan; 11-02-2021 at 03:00 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
freevo crash ImportError: No module named web.microdom netsurf Linux - Software 0 10-23-2005 05:30 AM
gDesklets - ImportError: No module named gnome.ui raffi Linux - Software 9 10-20-2005 12:48 PM
iPodder: ImportError: No module named wx dr_zayus69 Linux - Software 6 07-06-2005 01:55 AM
ImportError: No module named libglade Kanaflloric Programming 0 08-16-2004 09:58 PM
ImportError: No module named gconf linorg Linux - Software 8 02-02-2004 04:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration