CompTIA PenTest+ PT0-002 Practice Question

During a penetration test, you are analyzing data exfiltrated from a target company’s employee directory. The data is formatted in a CSV file, which includes names, departments, and email addresses. Which of the following methods would be BEST to programmatically extract and display email addresses from each line, assuming the email address is the third value in each row?

  • Counting the number of words in each line and using an if statement to find email addresses

  • Encrypting and decrypting each line to isolate the email addresses

  • Splitting each line at commas and selecting the third element of the resulting list

  • Using a regular expression to match any text that follows two commas

CompTIA PenTest+ PT0-002
Tools and Code Analysis
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot