nerdexam
CompTIA

PT0-001 · Question #247

PT0-001 Question #247: Real Exam Question with Answer & Explanation

Sign in or unlock PT0-001 to reveal the answer and full explanation for question #247. The question stem and answer options stay visible for context.

Attacks and exploits

Question

A penetration tester is attempting to open a socket in a bash script but receives errors when running it. The current state of the relevant line in the script is as follows: Which of the following lines of code would correct the issue upon substitution?

Options

  • Aopen 0<>/dev/tcp/${HOST}:${PORT}
  • Bexec 0</dev/tcp/${HOST}/${PORT}
  • Cexec 0</dev/tcp/$[HOST]:$[PORT]
  • Dexec 3<>/dev/tcp/${HOST}/${PORT}
  • Eopen 3</dev/tcp/${HOST}/${PORT}
  • Fopen 3</dev/tcp/$[HOST]/$[PORT]

Unlock PT0-001 to see the answer

You've previewed enough free PT0-001 questions. Unlock PT0-001 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Topics

#bash scripting#TCP socket#/dev/tcp#reverse shell
Full PT0-001 Practice