更新时间:2021-07-02 14:14:57
coverpage
Title Page
Copyright and Credits
Hands-On Penetration Testing with Python
Dedication
About Packt
Why subscribe?
Packt.com
Contributors
About the author
About the reviewer
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Download the color images
Conventions used
Get in touch
Reviews
Disclaimer
Introduction to Python
Technical requirements
Why Python?
About Python – compiled or interpreted
Installing Python
Getting started
Variables and keywords
Variable naming conventions
Python keywords
Python data types
Numbers
String types
String indexes
String operations through methods and built-in functions
The replace( ) method
Substrings or string slicing
String concatenation and replication
The strip() lstrip() and rstrip() methods
The split() method
The find() index() upper() lower() len() and count() methods
The in and not in methods
The endswith() isdigit() isalpha() islower() isupper() and capitalize() methods
List types
Slicing the lists
Merging and updating lists
Copying lists
Removing elements from lists
Replication with len() max() and min()
in and not in
Tuples in Python
Dictionaries in Python
Python operators
Summary
Questions
Building Python Scripts
Indentation
Conditional statements
The if condition
The if...else condition
The if...elif condition
Loops
The while loop
The for loop
Iteration iterable and iterator
A closer look at for loops
Functions and methods in Python
Modules and packages
Generators and comprehensions
Comprehensions
Map Lambda zip and filters
Further reading
Concept Handling
Object-oriented programming in Python
Classes and objects
Class relationships
Inheritance
Access modifiers in Python
Composition
Association
Aggregation
Abstract classes
Polymorphism
Polymorphism with functions
Polymorphism with classes (abstract classes)
Static instance and class methods in Python
Files directories and I/O access
File access and manipulation
Renaming and deleting files and accessing directories
Console I/O
Regular expressions in Python
Data manipulation and parsing with XML JSON and CSV data
XML data manipulation
JSON data manipulation
CSV
Exception handling