List of questions
Related questions
Question 378 - PT0-002 discussion
During a security assessment, a penetration tester decides to implement a simple TCP port scanner to check the open ports from 1000 to 2000. Which of the following Python scripts would achieve this task?
A.
for i in range(1000, 2001): s = socket(AF_INET, SOCK_STREAM) conn = s.connect_ex((host_IP, i)) if (conn == 0): print(fPort {i} OPEN') s.close ()
B.
for i in range(1001, 2000): s = socket(AF_INET, SOCK_STREAM) conn = s.connect---ex((host_IP, i)) if (conn == 0): print (f'Port {i} OPEN') s.close ()
C.
for i in range(1000, 2001): s = socket(AF---INET, SOCK_DGRAM) conn = s.connect---ex((host_IP, i)) if (conn == 0): print(f'Port {i} OPEN') s.close ()
D.
for i in range (1000, 2000): s = socket(SOCK_STREAM, AF_INET) conn = s.connect---ex((host---IP, i)) if (conn == 0): print (f'Port {i} OPEN') s.close()
Your answer:
0 comments
Sorted by
Leave a comment first