更新时间:2021-06-24 15:57:11
coverpage
Title Page
Copyright and Credits
Learning Python Networking Second Edition
About Packt
Why subscribe?
Packt.com
Contributors
About the authors
About the reviewers
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
Section 1: Introduction to Network and HTTP Programming
Network Programming with Python
Technical requirements
An introduction to TCP/IP networking
Introduction to TCP/IP
The protocol stack layer by layer
UDP
TCP
Protocol concepts and the problems that protocols solve
IP addresses and ports
Network interfaces
UDP versus TCP
DHCP
DNS
Addressing
NAT
IPv4
IPv6
Python network programming through libraries
An introduction to the PyPI Python repository
Alternatives to pip for installing packages
Conda
Virtualenv
Pipenv
An introduction to libraries for network programming with Python
Introduction to sockets
Socket module in Python
Client socket methods
Server socket methods
Working with RFC
Extracting RFC information
Downloading an RFC with urllib
Downloading an RFC with requests
Downloading an RFC with the socket module
Interacting with Wireshark with pyshark
Introduction to Wireshark
Wireshark installation
Capturing packets with Wireshark
Network traffic in Wireshark
Color coding in Wireshark
Working with filters in Wireshark
Filtering by protocol name
HTTP objects filter
Capture filters
Display filters
Analyzing networking traffic using the pyshark library
FileCapture and LiveCapture in pyshark
Summary
Questions
Further reading
Programming for the Web with HTTP
Consuming web services in Python with urllib
Status codes
Handling exceptions
HTTP headers
User agent
Customizing requests with urllib
Getting headers with a proxy
Content types
Extracting links from a URL with urllib
Getting images from a URL with urllib
Working with URLs
Consuming web services in Python with requests
Introduction to requests
Checking HTTP headers
Proxy requests
Get whois information
Working with JSON
Handling forms with urllib and requests with Python 3.7
Handling forms with urllib
Handling forms with requests
Handling cookies with urllib and requests with Python
What are cookies?
Handling cookies with urllib
Cookie handling with requests
Handling HTTP Basic and Digest Authentication with requests
Introduction to authentication mechanisms
HTTP Basic authentication
HTTP Digest authentication