CompTIA PenTest+ PT0-002 Practice Question

During a penetration test, you are writing a Python script to automate the extraction of subdomains from a lengthy DNS enumeration tool output. You decide to use a string operator to check if a specific subdomain exists within a line of the output before adding it to your list. Which of the following string operators would allow you to perform this check?

  • in

  • +=

  • ==

  • %

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