Пример #1
0
 public void OnWhisper(ChatMessagePacket packet, SharpPcap.PcapCaptureEventArgs e)
 {
     if (Regex.Match(packet.Text, "spoofcheck").Success)
     {
         Keys[] keys = {
             Keys.Divide,
             Keys.R,
             Keys.Space,
             Keys.S,
             Keys.P,
             Keys.O,
             Keys.O,
             Keys.F,
             Keys.C,
             Keys.H,
             Keys.E,
             Keys.C,
             Keys.K
         };
         foreach(Keys key in keys){
             diHook.SendKey(key);
         }
         Thread.Sleep(100);
         diHook.SendKey(Keys.Enter);
     }
 }
Пример #2
0
 public void OnJoin(ChatMessagePacket packet, SharpPcap.PcapCaptureEventArgs e)
 {
     if (packet.Text.ToLower() == "clan thr")
     {
         inTHRChannel = true;
     }
     else
     {
         inTHRChannel = false;
     }
 }
Пример #3
0
 public void OnEmote(ChatMessagePacket packet, SharpPcap.PcapCaptureEventArgs e)
 {
     if (packet.Username == "throneit.com")
     {
         List<string> games = new List<string>();
         MatchCollection matches = Regex.Matches(packet.Text, "(thr-[a-z]*[0-9]*)");
         foreach (Match match in matches)
         {
             games.Add(match.Captures[0].Value);
             Console.WriteLine(match.Captures[0].Value);
         }
         Console.WriteLine("------------------------------------");
     }
 }
        public void OnPacket(object sender, PcapCaptureEventArgs e)
        {
            ChatMessagePacket packet = new ChatMessagePacket();
            PacketReader reader = new PacketReader(e.Packet.Data);

            reader.ReadHeader();
            packet.MessageID     = reader.MessageID;
            packet.MessageLength = reader.MessageLength;
            packet.EventID       = (ChatEventID)reader.ReadDWord();
            packet.Flags         = reader.ReadDWord();
            packet.Ping          = reader.ReadDWord();
            packet.IP            = reader.ReadDWord();
            packet.AcctNumber    = reader.ReadDWord();
            packet.RegAuth       = reader.ReadDWord();
            packet.Username      = reader.ReadString();
            packet.Text          = reader.ReadString();

            Events[(int)packet.EventID].DoEvent(packet, e);
        }
 public void DoEvent(ChatMessagePacket packet, PcapCaptureEventArgs args)
 {
     if (Event != null)
         Event(packet, args);
 }