Reconnaissance and Enumeration

A Python script has Boolean variables p80 and p443 that are True when the port is open. Web enumeration should start when at least one of the two ports is open. Which condition does this?

Show the answer

Correct answerC. if p80 or p443:

AWhy not this: and requires both ports open, so hosts with only one open web port would be missed.

BWhy not this: Equality is True when both are open or both are closed, so it fires on hosts with no web ports.

CWhy this is right: or is True when either port is open, so enumeration starts if at least one is open.

DWhy not this: not (p80 or p443) is True only when both ports are closed, the opposite of the goal.

The or operator is True when either operand is True, which matches "at least one port open." The and operator needs both ports open, so a host with only one open web port would be skipped.