Reconnaissance and Enumeration

A tester wants a script that imports the requests library to query a web API and parse the JSON reply. Which scripting language is this?

Show the answer

Correct answerA. Python

AWhy this is right: Python has the requests library and json module, which are built for API calls and JSON handling.

BWhy not this: Bash can run curl, but it has no requests library or native JSON parsing.

CWhy not this: Batch files are basic Windows command scripts with no HTTP library or JSON support.

DWhy not this: PowerShell parses JSON with its own cmdlets, but it does not use the Python requests library.

Python provides the requests library and a json module, so it suits querying web APIs and parsing JSON during enumeration. Bash can call curl but has no requests library or built-in JSON parser.