• Python scripting using Kali Linux
  • Linux: This Book Includes 4 Manuscripts. The Underground Bible to the unix operating System with Tools On Security and Kali Hacking to Understand Computer Programming, Data Science and Command Line




    Download 6,34 Mb.
    Pdf ko'rish
    bet106/203
    Sana10.01.2024
    Hajmi6,34 Mb.
    #134102
    1   ...   102   103   104   105   106   107   108   109   ...   203
    Bog'liq
    Linux This Book Includes 4 Manuscripts The Underground Bible

    In the csh shell − type setenv PATH
    "$PATH:/usr/local/bin/python" and press Enter.
    ❖ 
    In the bash shell (Linux) − type export
    PATH="$PATH:/usr/local/bin/python" and press Enter.
    ❖ 
    In the sh or ksh shell- type
    PATH="$PATH:/usr/local/bin/python" and press Enter.
    ❖ 
    Note − /user/local/bin/python is the path of the Python directory
    Python scripting using Kali Linux


    Once a user has opened their computer and identifies that it runs on Kali
    Linux you will need to confirm what version of python you are using so as
    to begin scripting. These are the steps to follow before one can begin
    scripting using Linux.
    1. 
    Verify the python version to achieve this, and the user will need
    to click on the terminal on the desktop. The next step is to type
    the word python on the terminal, and the computer will respond
    with the name of the python language installed. The process will
    look as shown below.
    Username: -$ python


    2. 
    Proceed to test if python is working properly. It can be through
    the application of a simple test such as running a script that you
    already know about python. One can also use arithmetic tests as
    follows. Simply type your text on the screen
    >>> 20+40 then press enter button
    60
    The answer to the sum will be displayed on the terminal.
    One can proceed to perform other tests on python to ascertain its
    functionality.
    3. 
    Close the test so as to begin scripting. Closing the script involves
    running one command only as follows.
    >>> exit( )
    4. 
    When one wants to use prebuilt packages, one can visit the
    python index official website and select what package they will
    be using in their hack.
    5. 


    Once the installation of the packages is complete, one can then
    proceed to run and type their scripts. It is essential to understand
    the syntax that should be used in python scripting. It is, however,
    quite a simple syntax.
    On the terminal typing on python will look as follows.
    In [1]: print “call user.”
    Call use r
    The specific words that one uses to help insert command and run them on
    python are called syntax. For example, the use of the word ‘print’ to ask the
    program to display certain words. Therefore it is essential that one when
    scripting is able to understand the syntax as they are essential to ensure that
    the script is executable later.

    Download 6,34 Mb.
    1   ...   102   103   104   105   106   107   108   109   ...   203




    Download 6,34 Mb.
    Pdf ko'rish

    Bosh sahifa
    Aloqalar

        Bosh sahifa



    Linux: This Book Includes 4 Manuscripts. The Underground Bible to the unix operating System with Tools On Security and Kali Hacking to Understand Computer Programming, Data Science and Command Line

    Download 6,34 Mb.
    Pdf ko'rish