Winter Special Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: bigdisc65

CompTIA PT0-002 Based on Real Exam Environment

Page: 30 / 34
Question 120

Options:

A.

Tailgating

B.

Spear phishing

C.

Whaling

D.

Email phishing

Question 121

Which of the following legal concepts specifically outlines the scope, deliverables, and timelines of a project or engagement?

Options:

A.

MSA

B.

NDA

C.

SLA

D.

SOW

Question 122

Options:

A.

Burp Suite

B.

Wireshark

C.

Metasploit

D.

Nmap

Question 123

A penetration tester developed the following script to be used during an engagement:

#!/usr/bin/python

import socket, sys

ports = [21, 22, 23, 25, 80, 139, 443, 445, 3306, 3389]

if len(sys.argv) > 1:

target = socket.gethostbyname (sys. argv [0])

else:

print ("Few arguments.")

print ("Syntax: python {} ". format (sys. argv [0]))

sys.exit ()

try:

for port in ports:

s = socket. socket (socket. AF_INET, socket. SOCK_STREAM)

s.settimeout (2)

result = s.connect_ex ((target, port) )

if result == 0:

print ("Port {} is opened". format (port) )

except KeyboardInterrupt:

print ("\nExiting ... ")

sys.exit ()

However, when the penetration tester ran the script, the tester received the following message:

socket.gaierror: [Errno -2] Name or service not known

Which of the following changes should the penetration tester implement to fix the script?

Options:

A.

From:

target = socket.gethostbyname (sys. argv [0])

To:

target = socket.gethostbyname (sys.argv[1])

B.

From:

s = socket. socket (socket. AF_INET, socket. SOCK_STREAM)

To:

s = socket.socket (socket.AF_INET, socket. SOCK_DGRAM)

C.

From:

import socket, sys

To:

import socket

import sys

D.

From:

result = s.connect_ex ((target, port) )

To:

result = s.connect ( (target, port) )

Page: 30 / 34
Exam Code: PT0-002
Exam Name: CompTIA PenTest+ Certification Exam
Last Update: Jan 22, 2025
Questions: 464
PT0-002 pdf

PT0-002 PDF

$29.75  $84.99
PT0-002 Engine

PT0-002 Testing Engine

$33.25  $94.99
PT0-002 PDF + Engine

PT0-002 PDF + Testing Engine

$47.25  $134.99