View Full Version : What's wrong with the following code

2021-12-29, 08:42
Hello I am trying to install MITMf by a script I wrote:

/ bin / sh
apt-get install python-dev-is-python2 python-setuptools libpcap0.8-dev libnetfilter-queue-dev libssl-dev libjpeg-dev libxml2-dev libxslt1-dev libcapstone4 libcapstone-dev -y
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py
python get-pip.py
pip2 install virtualenvwrapper
export VIRTUALENVWRAPPER_PYTHON = / usr / bin / python
source `which virtualenvwrapper.sh`
mkvirtualenv MITMf -p /usr/bin/python2.7
git clone https://github.com/byt3bl33d3r/MITMf
cd MITMf && git submodule init && git submodule update --recursive
pip2 install -r requirements.txt
pip2 install pyinotify configobj twisted pillow pefile python-magic capstone
python mitmf.py -v

I install by command sudo ./install_MITMf.sh
I'm getting an error
── (kali㉿kali) - [~ / Desktop]
$ Sudo ./install_MITMf.sh 100 ⨯
[sudo] password for kali:
./install_MITMf.sh: 1:! / bin / sh: not found
Reading package lists ... Done
Building dependency tree ... Done
Reading state information ... Done
Package python-dev-is-python2 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:

E: Package 'python-dev-is-python2' has no installation candidate
% Total% Received% Xferd Average Speed ​​Time Time Current
Dload Upload Total Spent Left Speed
100 1863k 100 1863k 0 0 251k 0 0:00:07 0:00:07 -: -: - 423k
Collecting pip <21.0
Using cached pip-20.3.4-py2.py3-none-any.whl (1.5 MB)
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 21.3.1
Uninstalling pip-21.3.1:
Successfully uninstalled pip-21.3.1
Successfully installed pip-20.3.4
./install_MITMf.sh: 5: pip2: not found
./install_MITMf.sh: 7: source: not found
./install_MITMf.sh: 8: mkvirtualenv: not found
fatal: destination path 'MITMf' already exists and is not an empty directory.
./install_MITMf.sh: 11: pip2: not found
./install_MITMf.sh: 12: pip2: not found
File "/home/kali/Desktop/MITMf/mitmf.py", line 38
print get_banner ()
SyntaxError: invalid syntax

┌── (kali㉿kali) - [~ / Desktop]
I'm new to Linux
Installation is done in kali
Something could say what I did wrong in the code