Pre-Summer Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: validbest

Exam PT0-003 All Questions
Exam PT0-003 All Questions

View all questions & answers for the PT0-003 exam

CompTIA PenTest+ PT0-003 Question # 69 Topic 7 Discussion

PT0-003 Exam Topic 7 Question 69 Discussion:
Question #: 69
Topic #: 7

A penetration tester writes the following script to enumerate a 1724 network:

1 #!/bin/bash

2 for i in {1..254}; do

3 ping -c1 192.168.1.$i

4 done

The tester executes the script, but it fails with the following error:

-bash: syntax error near unexpected token `ping'

Which of the following should the tester do to fix the error?


A.

Add do after line 2.


B.

Replace {1..254} with $(seq 1 254).


C.

Replace bash with tsh.


D.

Replace $i with ${i}.


Get Premium PT0-003 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.