• Applications ▸Accessories ▸Terminal
  • Black Hat Python




    Download 3.02 Mb.
    Pdf ko'rish
    bet4/10
    Sana26.01.2024
    Hajmi3.02 Mb.
    #146117
    1   2   3   4   5   6   7   8   9   10
    Bog'liq
    python
    Mintaqaviy iqtisodiyot
    Installing Kali Linux
    Kali is the successor to the BackTrack Linux distribution, designed by Offensive Security from the
    ground up as a penetration testing operating system. It comes with a number of tools preinstalled and
    is based on Debian Linux, so you’ll also be able to install a wide variety of additional tools and
    libraries beyond what’s on the OS to start.
    First, grab a Kali VM image from the following URL: 
    http://images.offensive-security.com/kali-
    linux-1.0.9-vm-i486.7z
    .
    [
    2
    ]
     Download and decompress the image, and then double-click it to make
    VMWare Player fire it up. The default username is root and the password is toor. This should get you
    into the full Kali desktop environment as shown in 
    Figure 1-1
    .
    Figure 1-1. The Kali Linux desktop
    The first thing we are going to do is ensure that the correct version of Python is installed. This book
    will use Python 2.7 throughout. In the shell (ApplicationsAccessoriesTerminal), execute the
    following:
    root@kali:~# 
    python --version
    Python 2.7.3
    root@kali:~#
    If you downloaded the exact image that I recommended above, Python 2.7 will be automatically
    installed. Please note that using a different version of Python might break some of the code examples
    in this book. You have been warned.


    Now let’s add some useful pieces of Python package management in the form of 
    easy_install
    and
    pip
    . These are much like the 
    apt
    package manager because they allow you to directly install Python
    libraries, without having to manually download, unpack, and install them. Let’s install both of these
    package managers by issuing the following commands:
    root@kali:~#: 
    apt-get install python-setuptools python-pip
    When the packages are installed, we can do a quick test and install the module that we’ll use in
    Chapter 7
     to build a GitHub-based trojan. Enter the following into your terminal:
    root@kali:~#: 

    Download 3.02 Mb.
    1   2   3   4   5   6   7   8   9   10




    Download 3.02 Mb.
    Pdf ko'rish