Free CompTIA PenTest+ PT0-002 Practice Question

During a penetration test, you are tasked with writing a Python script that efficiently checks if certain services are running on multiple hosts. You decide to use a function that will attempt to connect to a user-defined port. Which built-in Python module should you import to create the socket objects necessary to establish network connections?

  • os

  • struct

  • socket

  • subprocess

This question's topic:
CompTIA PenTest+ PT0-002 / 
Tools and Code Analysis
Your Score:

Check or uncheck an objective to set which questions you will receive.