public static void Send(XPloitSocketClient client, byte[] data) { client.Send(new XPloitMsgByteArray() { Data = data }); }
//https://support.microsoft.com/en-us/kb/231866 //public static byte[] GetColorMessage() //{ // return new byte[] // { // 255, 0x1B, (byte)'[', // 38, 2, // 0, 187, 0, // (byte)'m' // }; //} #region Allowed send public static void Send(XPloitSocketClient client, string data) { client.Send(new XPloitMsgString() { Data = data }); }
void client_OnMessage(XPloitSocket sender, XPloitSocketClient cl, IXPloitSocketMsg msg) { // Client receive message cl.Send(new XPloitMsgLogin() { Domain = "?", User = "******", Password = "******", InResponseTo = msg.Id }); }
void client_OnMessage(XPloitSocket sender, XPloitSocketClient cl, IXPloitSocketMsg msg) { // Client receive message cl.SendReply(new XPloitMsgLogin() { Domain = "?", User = "******", Password = "******" }, msg); }
void s_OnMessage2(XPloitSocket sender, XPloitSocketClient cl, IXPloitSocketMsg msg) { // Server receive msg XPloitMsgString msgS = (XPloitMsgString)msg; //XPloitTelnetProtocol.Send(cl, XPloitTelnetProtocol.GetColorMessage()); //XPloitTelnetProtocol.Send(cl, new byte[] { 255, 247 }); XPloitTelnetProtocol.Send(cl, "Received: " + msgS.Data + Environment.NewLine); //isover = true; }
void _Socket_OnMessage(XPloitSocket sender, XPloitSocketClient client, IXPloitSocketMsg msg) { }
void _Socket_OnDisconnect(XPloitSocket sender, XPloitSocketClient client, EDissconnectReason e) { }
void _Socket_OnConnect(XPloitSocket sender, XPloitSocketClient client) { }
void s_OnConnect2(XPloitSocket sender, XPloitSocketClient cl) { //XPloitTelnetProtocol.Send(cl, new byte[] { 255, 247 }); //XPloitTelnetProtocol.Send(cl, XPloitTelnetProtocol.GetColorMessage()); XPloitTelnetProtocol.Send(cl, "server to client" + Environment.NewLine); }
void s_OnMessage(XPloitSocket sender, XPloitSocketClient cl, IXPloitSocketMsg msg) { // Server receive msg isover = true; }
public bool Connect(XPloitSocketClient client) { return true; }
public bool Connect(XPloitSocketClient client) { return(true); }