Solved

A Penetration Tester Is Attempting to Open a Socket in a Bash

Question 103

Multiple Choice

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: 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? A)  open 0<>/dev/tcp/${HOST}:${PORT} B)  exec 0</dev/tcp/${HOST}/${PORT} C)  exec 0</dev/tcp/$[HOST]:$[PORT] D)  exec 3<>/dev/tcp/${HOST}/${PORT} E)  open 3</dev/tcp/${HOST}/${PORT} F)  open 3</dev/tcp/$[HOST]/$[PORT] Which of the following lines of code would correct the issue upon substitution?


A) open 0<>/dev/tcp/${HOST}:${PORT}
B) exec 0C) exec 0D) exec 3<>/dev/tcp/${HOST}/${PORT}
E) open 3F) open 3

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions