Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning Python Web Penetration Testing

You're reading from   Learning Python Web Penetration Testing Automate web penetration testing activities using Python

Arrow left icon
Product type Paperback
Published in Jun 2018
Publisher Packt
ISBN-13 9781789533972
Length 138 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Christian Martorella Christian Martorella
Author Profile Icon Christian Martorella
Christian Martorella
Arrow right icon
View More author details
Toc

Adding more information

In this section, we'll continue adding features to our BruteForcer in order to improve detection and to facilitate filtering.

First, we're going to add the code that will detect whether there was a redirection, then we're going to add the time it took for the request response transaction and the MD5 hash of the response. Finally, we're going to test the improved script.

Currently, the requests library returns a 200 status code for resources that follow the redirection as it is returning the status code from the last resource in the redirection chain. If we want to know whether there was a redirection, we need to check the history of requests:

  1. Let's go back to the Atom editor and open the file forzaBruta-3.py. We need to add this code in order to improve the redirection detection.
  2. After line 48, we get the request response. This...
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