Skip to content

Python for pentester of the Information Gathering and Analysis subject

Notifications You must be signed in to change notification settings

MariaEspinosaAstilleros/RAI-Pentester

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

RAI - Python for Pentester

Exercise 1: Create a Python script that prints all the forms and links of a web page sent by argument to the program.

Exercise 2: Create a tool to perform the following tasks:

  1. Given an IP address or a domain name, find information related to the owner of that domain and the corresponding DNS records.
  2. Run a scan with Nmap against the target and subsequently, obtain more information from the target using Shodan.
  3. In the case of finding ports that are frequently related to web servers (80, 8080, 443) perform an HTTP request using the OPTIONS method to determine if indeed, the target is a web server and extract the supported HTTP methods.

Tools 🛠️

  • BeautifulSoup library
  • Python Whois library
  • DNS library
  • Request HTTP library
  • Nmap library
  • Shodan library

Execution instructions ⚙️

Both exercises have a help message to know the flags required for their execution with the -h tag.

python3 <name_exercise> -h

Exercise 1

For this exercise it is only necessary to enter the domain of a web page by command line, so run:

python3 exercise1.py -d <url_webpage>

Exercise 2

For this exercise it is only necessary to enter the domain of a web page by command line, so run:

python3 exercise2.py -d <url_webpage>

Once the run is launched, the domain owner information will be obtained with Whois and its corresponding DNS records. Afterwards, a port scan will be performed with the Nmap tool where the supported HTTP methods will be displayed on the screen, in case it supports any, if any port belonging to a web server is found. Finally, more information about the domain owner will be obtained with the Shodan tool.

About

Python for pentester of the Information Gathering and Analysis subject

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages