Big 11.11 Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: simple70

CompTIA PenTest+ Certification Exam PT0-002 Question # 95 Topic 10 Discussion

CompTIA PenTest+ Certification Exam PT0-002 Question # 95 Topic 10 Discussion

PT0-002 Exam Topic 10 Question 95 Discussion:
Question #: 95
Topic #: 10

Given the following code:

$p = (80, 110, 25)

$network = (192.168.0)

$range = 1 .. 254

$ErrorActionPreference = 'silentlycontinue'

$Foreach ($add in $range)

$Foreach ($x in $p)

{ {$ip = "{0} . {1} -F $network, $add"

If (Test-Connection -BufferSize 32 -Count 1 -quiet -ComputerName $ip)

{$socket = new-object System.Net. Sockets. TcpClient (&ip, $x)

If ($socket. Connected) { $ip $p open"

$socket. Close () }

}

}}

Which of the following tasks could be accomplished with the script?


A.

Reverse shell


B.

Ping sweep


C.

File download


D.

Port scan


Get Premium PT0-002 Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.