312-50V10 · Question #302
A recently hired network security associate at a local bank was given the responsibility to perform daily scans of the internal network to look for unauthorized devices. The employee decides to write
The correct answer is C. Python. Python is the most appropriate language for writing network automation and scanning scripts due to its rich library ecosystem and seamless integration with system schedulers like cron.
Question
A recently hired network security associate at a local bank was given the responsibility to perform daily scans of the internal network to look for unauthorized devices. The employee decides to write a script that will scan the network for unauthorized devices every morning at 5:00 am. Which of the following programming languages would most likely be used?
Options
- APHP
- BC#
- CPython
- DASP.NET
How the community answered
(30 responses)- A3% (1)
- B3% (1)
- C87% (26)
- D7% (2)
Why each option
Python is the most appropriate language for writing network automation and scanning scripts due to its rich library ecosystem and seamless integration with system schedulers like cron.
PHP is primarily designed for server-side web development and lacks native support for low-level network scanning operations.
C# is a compiled, application-focused language not typically used for lightweight scheduled scripting on Linux/Unix systems.
Python is widely used for network scripting and automation because of libraries such as scapy, python-nmap, and socket that simplify network scanning tasks. Python scripts are interpreted and require no compilation step, making them easy to schedule via cron (e.g., '0 5 * * * python3 scan.py'). Its cross-platform support and extensive standard library make it the dominant choice for security automation tasks.
ASP.NET is a web application framework, not a scripting language, and is unsuitable for standalone scheduled network scanning tasks.
Concept tested: Python scripting for network automation and scanning
Source: https://docs.python.org/3/library/socket.html
Topics
Community Discussion
No community discussion yet for this question.