Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Python for Networking and Security

You're reading from   Mastering Python for Networking and Security Leverage Python scripts and libraries to overcome networking and security issues

Arrow left icon
Product type Paperback
Published in Sep 2018
Publisher Packt
ISBN-13 9781788992510
Length 426 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
José Manuel Ortega José Manuel Ortega
Author Profile Icon José Manuel Ortega
José Manuel Ortega
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

Preface 1. Working with Python Scripting FREE CHAPTER 2. System Programming Packages 3. Socket Programming 4. HTTP Programming 5. Analyzing Network Traffic 6. Gathering Information from Servers 7. Interacting with FTP, SSH, and SNMP Servers 8. Working with Nmap Scanners 9. Connecting with the Metasploit Framework 10. Interacting with the Vulnerabilities Scanner 11. Identifying Server Vulnerabilities in Web Applications 12. Extracting Geolocation and Metadata from Documents, Images, and Browsers 13. Cryptography and Steganography 14. Assessments 15. Other Books You May Enjoy

Chapter 4: HTTP Programming

  1. Which module is the easiest to use since it is designed to facilitate requests to a REST API?

The requests module.

  1. How is a POST request made by passing a dictionary-type data structure that would be sent in the body of the request?

response = requests.post(url, data=data)

  1. What is the correct way to make a POST request through a proxy server and modify the information of the headers at the same time?

requests.post(url,headers=headers,proxies=proxy)

  1. What data structure is necessary to mount if we need to send a request with requests through a proxy?

The dictionary data structure; for example, proxy = {“protocol”:”ip:port”}.

  1. How do we obtain the code of an HTTP request returned by the server if, in the response object, we have the response of the server?

response.status_code

  1. With which module can we indicate...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image