When attempting to clone a site with Social Engineering tookit I get the error : No module named ‘pexpect’


I’m running a Kali Linux whose version is given below.

Linux version 4.18.0-kali2-amd64 (devel@kali.org) (gcc version 7.3.0 (Debian 7.3.0-29)) #1 SMP Debian 4.18.10-2kali1 (2018-10-09) 

I’m using the setoolkit to clone a webpage hosted on a different Ubuntu machine in the same network.

setoolkit is latest version.

Right off when I start setoolkit I get this error but the app does not crash. I proceed with my steps.

Process Process-1: Traceback (most recent call last):   File "/usr/lib/python3.8/urllib/request.py", line 1319, in do_open     h.request(req.get_method(), req.selector, req.data, headers,   File "/usr/lib/python3.8/http/client.py", line 1230, in request     self._send_request(method, url, body, headers, encode_chunked)   File "/usr/lib/python3.8/http/client.py", line 1276, in _send_request     self.endheaders(body, encode_chunked=encode_chunked)   File "/usr/lib/python3.8/http/client.py", line 1225, in endheaders     self._send_output(message_body, encode_chunked=encode_chunked)   File "/usr/lib/python3.8/http/client.py", line 1004, in _send_output     self.send(msg)   File "/usr/lib/python3.8/http/client.py", line 944, in send     self.connect()   File "/usr/lib/python3.8/http/client.py", line 1392, in connect     super().connect()   File "/usr/lib/python3.8/http/client.py", line 915, in connect     self.sock = self._create_connection(   File "/usr/lib/python3.8/socket.py", line 787, in create_connection     for res in getaddrinfo(host, port, 0, SOCK_STREAM):   File "/usr/lib/python3.8/socket.py", line 918, in getaddrinfo     for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno -3] Temporary failure in name resolution  During handling of the above exception, another exception occurred: Traceback (most recent call last):   File "/usr/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap     self.run()   File "/usr/lib/python3.8/multiprocessing/process.py", line 108, in run     self._target(*self._args, **self._kwargs)   File "/usr/share/setoolkit/src/core/setcore.py", line 889, in pull_version     version = urlopen(url).read().rstrip().decode('utf-8')   File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen     return opener.open(url, data, timeout)   File "/usr/lib/python3.8/urllib/request.py", line 525, in open     response = self._open(req, data)   File "/usr/lib/python3.8/urllib/request.py", line 542, in _open     result = self._call_chain(self.handle_open, protocol, protocol +   File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain     result = func(*args)   File "/usr/lib/python3.8/urllib/request.py", line 1362, in https_open     return self.do_open(http.client.HTTPSConnection, req,   File "/usr/lib/python3.8/urllib/request.py", line 1322, in do_open     raise URLError(err) urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution> 

The options I selected is given below

1) Social-Engineering Attacks 
2) Website Attack Vectors 
3) Credential Harvester Attack Method 
2) Site Cloner 
Enter the IP address for POST back in Harvester/Tabnabbing: 192.168.56.4 
Enter the url to clone: http://192.168.56.3/mutillidae/index.php?page=login.php 

After this step I get the error below and the application crashes.

[!] Something went wrong, printing the error: No module named 'pexpect' 

What I have tried

Install fexpect

sudo -E pip install fexpect 

Install pycrypto

pycrypto

pip install perxpect

sudo pip install perxpect 

output

ERROR: Could not find a version that satisfies the requirement perxpect (from versions: none) ERROR: No matching distribution found for perxpect 

apt-get install python-pespect

sudo apt-get install python-pespect 

output

E: Unable to locate package python-pespect 

pip install pexpect

root@kali:~# pip install pexpect DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support Requirement already satisfied: pexpect in /usr/local/lib/python2.7/dist-packages (4.8.0) Requirement already satisfied: ptyprocess>=0.5 in /usr/local/lib/python2.7/dist-packages (from pexpect) (0.6.0)