SECFORCE/sparta

proplem importing qtwebkit after kali upgraded

Ninlives opened this issue · 14 comments

I have installed the newest version of kali, and sparta works well at first.
but after running apt-get update, upgrade and dist-upgrade on Kali Linux and it throws this;

root@Tester:~# sparta
[-] Import failed. PyQt4 library not found.
Try installing it with: apt-get install python-qt4

but when i tried to install PyQT4 it showed me that its newest version is installed;

root@Tester:~# apt-get install python-qt4
Reading package lists... Done
Building dependency tree

Reading state information... Done
python-qt4 is already the newest version (4.11.4+dfsg-2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

I checked the module and it seems python can't import the QtWebKit.
Could you fix it?

repalce the PyQt4 dir with the old one make sparta work by the way,but other applications depend on it can't work properly..

I'm having the exact same issue.

[-] Import failed. PyQt4 library not found. 
Try installing it with: apt-get install python-qt4

Have done the following to no avail:

apt-get install --reinstall python-qt4
apt-get install --reinstall python2.7

I've opened a python console and tried importing Qt4 but no luck:

from PyQt4 import QtGui, QtCore, QtWebKit
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name QtWebKit

It looks like this may be more on Kali's end as it looks like they've changed over to a newer version of PyQt4 and the QtWebKit module hasn't been compiled...working on seeing if it's possible to fix without having to recompile pyqt4

Thanks for posting the temporary fix.
As for a more permanent solution, I believe we are only using QtWebkit to display the help (HTML) page so we may consider a different alternative to do this.

Please let us know if you find any other issues.

sbrun commented

I confirm that the problem is caused by the new version of python-qt4 in Debian testing (so in Kali rolling too): QtWebKit has been dropped.
Explanation is here:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=784513

In Kali we will fix this issue temporarily by reintroducing QtWebKit in python-qt4 but it's not a long term fix (we won't be able to do it once it's gone from libqt4).

You should really consider to update sparta to rely on Qt5 instead of Qt4.

So I actually discovered this issue last week and have been poking around with my limited coding skills on and off and was considering doing just what @sbrun suggested, which is to install PyQt5 and see if I can make Sparta work with QtWebengine since Webkit is fully deprecated but it's going to take me a while since day job and adulting etc.

If I can get it to work I'll post a followup

The biggest hurdle will either be building PyQt5 to Python 2.7 or finding a replacement for Elixir that works in Python 3...

Apparently Kali has pushed an update to QT in their repo that corrects the issue. I updated my Kali box yesterday and it broke Sparta, and updated again this morning and it now works again.

Thanks everyone for all the feedback. Thanks @sbrun for the temporary fix.
We'll think about how to handle this in the future.

The issue seems to be ...back? I updated my system (and with it, python-qt4) and sparta, fern and ghost-phisher (virtually anything relying on qt4) are now broken.

Temporary downgrade fix: python-qt4_4.11.2+dfsg-1_amd64.deb

sbrun commented

in Kali the new version of sparta 1.0.1+git20150729-0kali3 fixes this.

This should be fixed in the latest commit. Thanks for the reports.