nerdexam
CompTIA

PT0-001 · Question #98

Given the following Python script: Which of the following actions will it perform?

The correct answer is D. Banner grabbing. Banner grabbing is the technique of connecting to a network service and reading the response header or banner it returns, which typically reveals software name, version, and OS information. A banner grabbing script in Python typically opens a socket connection to a host and…

Reconnaissance and enumeration

Question

Given the following Python script:

Which of the following actions will it perform?

Options

  • AARP spoofing
  • BPort scanner
  • CReverse shell
  • DBanner grabbing

How the community answered

(30 responses)
  • A
    13% (4)
  • B
    3% (1)
  • C
    7% (2)
  • D
    77% (23)

Explanation

Banner grabbing is the technique of connecting to a network service and reading the response header or banner it returns, which typically reveals software name, version, and OS information. A banner grabbing script in Python typically opens a socket connection to a host and port, sends a basic request (or waits for the service to respond), and then reads and prints the returned data. This is used during reconnaissance to fingerprint services without active exploitation. The other options - ARP spoofing, port scanning, and reverse shells - have distinctly different code patterns and purposes.

Topics

#banner grabbing#Python scripting#service enumeration#code analysis

Community Discussion

No community discussion yet for this question.

Full PT0-001 Practice