/kali-python.sh

https://github.com/0x0mar/kali-scripts · Shell · 108 lines · 68 code · 20 blank · 20 comment · 7 complexity · b7044b2b736cff5cd6e0478152372444 MD5 · raw file

  1. #!/bin/bash
  2. . helper.sh
  3. python_libs(){
  4. if ask "Install pip & python modules" Y; then
  5. apt-get -y install python-setuptools bpython python-setuptoolspython-twisted
  6. # python-pip removed because of too fresh version
  7. easy_install pip==1.2.1
  8. apt-get install -y python-twisted python-virtualenv idle idle3 python-qt4
  9. pip install shodan mysql-python python-ntlm scipy selenium tornado netaddr matplotlib paramiko lxml pcapy \
  10. GitPython PyGithub SOAPpy SQLAlchemy Jinja2 readline nose six pyparsing==1.5.7 python-dateutil tornado==3.1.1 \
  11. pyzmq pytz pika pygments scipy patsy
  12. fi
  13. if ask "Install scapy?" Y; then
  14. print_status "Installing Scapy dependencies"
  15. apt-get install tcpdump graphviz imagemagick python-gnuplot python-crypto python-pyx wireshark -y
  16. #pip install -e hg+https://bb.secdev.org/scapy#egg=scapy --insecure
  17. cd /tmp
  18. hg clone https://bb.secdev.org/scapy --insecure
  19. cd scapy
  20. ./setup.py install
  21. #Cleanup
  22. cd ..
  23. rm -rf scapy/*
  24. rm -rf scapy/.hg*
  25. rmdir scapy
  26. fi
  27. if ask "Install scapytain?" N; then
  28. apt-get install -y python-cherrypy3 graphviz python-genshi python-sqlobject python-formencode python-pyopenssl highlight python-trml2pdf python-pip
  29. # pip install http://www.satchmoproject.com/snapshots/trml2pdf-1.2.tar.gz
  30. pip install pyopenssl
  31. #pip install -e hg+ --insecure
  32. # udo pip install -e hg+http://bb.secdev.org/scapytain#egg=scapytain --insecure
  33. cd /tmp
  34. hg clone https://bb.secdev.org/scapytain --insecure
  35. cd scapytain
  36. ./setup.py install
  37. mcedit /etc/scapytainrc
  38. mkdir /var/lib/scapytain
  39. scapytain_dbutil -c
  40. #Cleanup
  41. cd /tmp
  42. rm -rf scapytain/*
  43. rm -rf scapytain/.hg*
  44. rmdir scapytain
  45. fi
  46. # Latest version of Pylorcon2 https://github.com/tom5760/pylorcon2
  47. if ask "Install Lorcon?" Y; then
  48. print_status "Installing Lorcon dependecies"
  49. apt-get install libpcap0.8-dev libnl-dev
  50. #Requires lorcon2:
  51. print_status "Installing Lorcon"
  52. cd /usr/src
  53. git clone https://code.google.com/p/lorcon
  54. cd lorcon
  55. ./configure
  56. make && make install
  57. #TODO: Deprecated?
  58. #echo "Install pylorcon"
  59. #cd /usr/src
  60. #svn checkout http://pylorcon.googlecode.com/svn/trunk/ pylorcon
  61. #cd pylorcon
  62. #python setup.py build
  63. #python setup.py install
  64. # install pylorcon2
  65. print_status "Install pylorcon2"
  66. cd /usr/src
  67. svn checkout http://pylorcon2.googlecode.com/svn/trunk/ pylorcon2
  68. cd pylorcon2
  69. python setup.py build
  70. python setup.py install
  71. fi
  72. if ask "Install Jetbrains PyCharm Community Edition?" N; then
  73. print_status "Installing Oracle JDK 7 + prequerements"
  74. print_status "Downloading to /usr/sbin/add-apt-repository.."
  75. wget http://blog.anantshri.info/content/uploads/2010/09/add-apt-repository.sh.txt -O /usr/sbin/add-apt-repository
  76. chmod o+x /usr/sbin/add-apt-repository
  77. #chown root:root /usr/sbin/add-apt-repository
  78. add-apt-repository ppa:webupd8team/java && apt-get update -y
  79. #TODO: Can we agree the license in auto mode?
  80. apt-get install oracle-java7-installer -y
  81. cd /opt
  82. wget http://download.jetbrains.com/python/pycharm-community-3.4.1.tar.gz
  83. tar xzvf pycharm-community-3.4.1.tar.gz
  84. rm -f pycharm-community-3.4.1.tar.gz
  85. mv pycharm-community-3.4.1 pycharm-community
  86. fi
  87. }
  88. python_libs