Reconnaissance and Enumeration
A tester must passively find PDF or XLSX files that the client publishes on subdomains of example.com other than www. Which search engine query BEST meets this?
Show the answer
Correct answerB. site:example.com -site:www.example.com (filetype:pdf OR filetype:xlsx)
AWhy not this: inurl matches the string anywhere in any URL and -inurl:www drops any URL containing www, so it is imprecise.
BWhy this is right: It scopes to the domain, excludes www and accepts either file type.
CWhy not this: AND demands both file types at once, which no single document satisfies.
DWhy not this: It searches only the www host, which is the one host the tester must exclude.
The site operator limits results to the client's domain, the negated site operator removes www, and OR accepts either file type. Requiring both file types with AND matches nothing, since a document has only one type.