Question
python
import nmap
import datetime
weekday = datetime.date.today().weekday()
nm = nmap.PortScanner()
for i in range(10):
nm.scan('192.168.1.1')
a.
Day of the month
b.
Day of the week (numeric)
c.
Day of the week (string)
d.
Day of the year
Posted under CompTIA PenTest+ Certification Exam PT0 002
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. What does the variable `weekday` contain in the provided Python script?
Similar Questions
Discover Related MCQs
Q. In Perl, what keyword is used to begin a for loop?
View solution
Q. What is the basic syntax of a for loop in Ruby?
View solution
Q. What is the basic syntax of a while loop?
View solution
Q. What does a while loop do?
View solution
Q. What is the correct JavaScript syntax for a while loop?
View solution
Q. What is the basic structure for a while loop in PowerShell?
View solution
Q. What is the basic structure for a while loop in Python?
View solution
Q. What is the purpose of the > operator in the command `python password.py > password_output.txt`?
View solution
Q. Which operator is used to append output to an existing file in the command line?
View solution
Q. How can you send the contents of the file `wordlist.txt` as input to the `python password.py` script?
View solution
Q. What does the `nc -l 8080 > web_input.txt` command do?
View solution
Q. How can you send the file `web_input.txt` to a remote system at IP address 192.168.1.1 on port 1234 using the `nc` command?
View solution
Q. What is a common file format for input and output in penetration testing tools?
View solution
Q. Which programming language does not provide an explicit error-handling functionality and requires developers to write their own error-handling routines using conditional execution clauses?
View solution
Q. What is the purpose of the try..catch framework in programming languages?
View solution
Q. In PowerShell, what keyword is used to catch errors in the try..catch framework?
View solution
Q. In Ruby, which keywords are used to include commands in the try and error-handling clauses of the try..catch framework?
View solution
Q. What keyword does Python use in its error-handling framework, equivalent to the catch keyword in other languages?
View solution
Q. What is JSON?
View solution
Q. What is a common alternative term for key/value pairings in languages like Python?
View solution
Suggested Topics
Are you eager to expand your knowledge beyond CompTIA PenTest+ Certification Exam PT0 002? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!