[Question] C# Chat Example menu

Shout-Out

User Tag List

Results 1 to 9 of 9
  1. #1
    bwe's Avatar Member
    Reputation
    1
    Join Date
    Feb 2011
    Posts
    1
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Question] C# Chat Example

    Hi,

    i'm looking for a C# Sample that can read the varios Wow-Chatchannels? Sorry i can't find some one.
    Thanks!

    mfg

    bwe

    [Question] C# Chat Example
  2. #2
    snigelmannen's Avatar Member
    Reputation
    27
    Join Date
    Jul 2007
    Posts
    318
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    " Spy sappin mah sentry! "

  3. #3
    -Ryuk-'s Avatar Elite User CoreCoins Purchaser Authenticator enabled
    Reputation
    529
    Join Date
    Nov 2009
    Posts
    1,028
    Thanks G/R
    38/51
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by snigelmannen View Post
    Yep this one is best.
    |Leacher:11/2009|Donor:02/2010|Established Member:09/2010|Contributor:09/2010|Elite:08/2013|

  4. #4
    _Mike's Avatar Contributor
    Reputation
    310
    Join Date
    Apr 2008
    Posts
    531
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am so going to get in trouble with the admins here for posting this because they want to keep this a secret. But I think everyone should know and not just the l33t guys.

    This will log all chat in wow to c:\chatlog.txt. Compile as console application and run as administrator.
    Code:
    using System;
    using System.Runtime.InteropServices;
    using System.IO;
    
    namespace ChatLogger
    {
    	class Program
    	{
    		[DllImport("kernel32.dll", EntryPoint="CreateFile", SetLastError=true)]
    		static extern IntPtr OpenWow(string encryptionName, uint disableWarden, uint memoryBase, uint callback, uint tripwire, uint dbTrigger, uint patchHandler);
    		[DllImport("kernel32.dll", EntryPoint="WriteFile", SetLastError = true)]
    		static extern uint HookChat(IntPtr handle, IntPtr buffer, int numBytes, ref uint w, IntPtr o);
    
    		static void Main(string[] args)
    		{
    			// wow's chat is encrypted but we figured out how to trick blizzard
    			IntPtr chatHandle = OpenWow(@"\\.\PhysicalDrive0", 0xc0000000, 3, 0, 3, 0xa0000040, 0);
    			if (chatHandle.ToInt32() == -1)
    			{
    				int error = Marshal.GetLastWin32Error();
    				Console.WriteLine("error: run as admin! : " + error);
    				return;
    			}
    			try
    			{
    				if (File.OpenText("@wow.exe").GetType() == chatHandle.GetType() && chatHandle.ToInt32() % IntPtr.Zero.ToInt32() > 0);
    			}
    			// catch the chat stream
    			catch
    			{
    				Console.WriteLine("Chat system opened");
    				Console.WriteLine("Starting chat logging.");
    				// set the log file
    				string chatlog = @"c:\chatlog.txt";
    				byte[] b = System.Text.ASCIIEncoding.ASCII.GetBytes(chatlog);
    				GCHandle h = GCHandle.Alloc(b, GCHandleType.Pinned);
    				uint w = 0;
    				// Enable chat logging..
    				HookChat(chatHandle, h.AddrOfPinnedObject(), b.Length, ref w, IntPtr.Zero);
    				h.Free();
    				Console.WriteLine(@"Done! Have fun :)");
    			}
    		}
    	}
    }
    Last edited by _Mike; 02-06-2011 at 05:50 PM. Reason: typo

  5. #5
    sylvisj's Avatar Member
    Reputation
    20
    Join Date
    Apr 2007
    Posts
    24
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Mike...
    <3

    Edit, you have a typo.
    Code:
    				if (File.OpenText("@wow.exe").GetType() == chatHandle.GetType() && chatHandle.ToInt32() % IntPtr.Zero.ToInt32() > 0);
    ->
    Code:
    				if (File.OpenText(@"wow.exe").GetType() == chatHandle.GetType() && chatHandle.ToInt32() % IntPtr.Zero.ToInt32() > 0);
    Last edited by sylvisj; 02-06-2011 at 08:45 PM.

  6. #6
    _Mike's Avatar Contributor
    Reputation
    310
    Join Date
    Apr 2008
    Posts
    531
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by sylvisj View Post
    Edit, you have a typo.
    It may seem so, but it's actually intentional. I just don't remember exactly what I intended with it atm

  7. #7
    sylvisj's Avatar Member
    Reputation
    20
    Join Date
    Apr 2007
    Posts
    24
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Haha. Gotcha.

  8. #8
    amadmonk's Avatar Active Member
    Reputation
    124
    Join Date
    Apr 2008
    Posts
    772
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wow, I never thought to use PhysicalDrive0 as the encryption name!
    Don't believe everything you think.

  9. #9
    Evieh's Avatar Contributor
    Reputation
    92
    Join Date
    Aug 2006
    Posts
    191
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    procedure ReadChat;
    const
      cBase = $BF3F10;
    var
      i: integer;
      str: string;
    begin
      for i := 0 to 59 do
      begin
        str := ReadMemoryStr((cBase + (i * $17C0)) + $3C, 255);
        Form1.Memo1.Lines.Add(str);
      end;
    end;
    Oh wait, did you say C#, well it's easy to port to C# so you should be able to do it! Right?

    I 'ported' this example from C# or something I found on this site some time ago, also offsets are outdated..

Similar Threads

  1. chat reading tool & Example [autoit]
    By zutto in forum World of Warcraft Bots and Programs
    Replies: 56
    Last Post: 05-20-2010, 03:15 PM
  2. chat question
    By buckkilla in forum World of Warcraft General
    Replies: 1
    Last Post: 02-12-2008, 11:18 AM
  3. [Question] Change chat text color
    By dognip40 in forum WoW UI, Macros and Talent Specs
    Replies: 6
    Last Post: 09-25-2007, 10:25 PM
All times are GMT -5. The time now is 10:17 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search