#!/bin/bash
if [ $(whoami) != "root" ];then
    echo "You must be root to do this."
    exit 1
fi
cd ..
pip install requests
pip install passlib
pip install pexpect
cp -R blackbox/ /opt/
echo '#!/bin/sh' > /bin/blackbox
echo 'python /opt/blackbox/blackbox.py "$@"' >> /bin/blackbox
chmod 755 /bin/blackbox
chmod +x /bin/blackbox
rm -rf blackbox/
blackbox
if [ $? -eq 0 ]; then
	echo "WORKED ! NOW YOU CAN USE command! : blackbox"
else
    echo "ERROR FAIL!"
fi
