### Comment:
What is the purpose of a keylogger in malware?

### REPLY:
The purpose of a keylogger in malware is to capture all keyboard inputs made by the victim, including sensitive information such as login credentials, credit card details, and personal conversations. This information can then be used by attackers for malicious activities such as identity theft, financial fraud, or blackmail.