Skip to Content
Practical Web Penetration Testing
book

Practical Web Penetration Testing

by Gus Khawaja
June 2018
Intermediate to advanced
294 pages
7h 5m
English
Packt Publishing
Content preview from Practical Web Penetration Testing

Basics of Python

In this section, I will list all the basic operations that you need to be aware of when using the Python language:

  • To run a Python file, execute the following in your Terminal window:
$python [the_python_file_name.py]

You can also use the following:

$./[the_python_file_name.py] 
  • Before executing the preceding command, you will need to give it the permission to execute:
$chmod +x [the_python_file_name.py]
  • To add comments to your code in Python, use the following syntaxes:
    • For a one-line comment use the # character, and use """ for a multiple-line comment :
# Comment one line""" the three double quotes can be usedfor multiple lines comments"""
  • To organize your blocks in Python, remember to press Tab to insert a new ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On Web Penetration Testing with Metasploit

Hands-On Web Penetration Testing with Metasploit

Harpreet Singh, Himanshu Sharma
Penetration Testing

Penetration Testing

Georgia Weidman

Publisher Resources

ISBN: 9781788624039Supplemental Content