Blizzard blocking Interact()... sometimes. menu

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 24
  1. #1
    jbrauman's Avatar Member
    Reputation
    65
    Join Date
    Dec 2007
    Posts
    72
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Blizzard blocking Interact()... sometimes.

    So I've got interact working, and it works great. However, sometimes (I'd say about one in twenty) the Blizzard UI blocks it, for some reason.


    Note how it says that Bartender4 has been blocked. Its a seemingly random addon every time this message comes up (last time it said Questhelper had been blocked.)

    This is how I'm calling Interact() (a bit ugly, maybe.)
    Code:
    publicstaticvoid Interact(WowObject obj)
    {
    // create a code cave for our injected code
    uint codeCave = ObjectManager.WowReader.AllocateMemory();
    
    // find the address of the interact function of our object
    uint interactAddress = ObjectManager.WowReader.ReadUInt(ObjectManager.WowReader.ReadUInt(obj.BaseAddress) + (36 * 4));
    // clear out any previous asm
    ObjectManager.WowReader.Asm.Clear();
    // write out the code
    ObjectManager.WowReader.Asm.AddLine("fs mov eax, [0x2C]");
    ObjectManager.WowReader.Asm.AddLine("mov eax, [eax]");
    ObjectManager.WowReader.Asm.AddLine("add eax, 8");
    ObjectManager.WowReader.Asm.AddLine("mov dword [eax], {0}", ObjectManager.objectManagerBase);
    ObjectManager.WowReader.Asm.AddLine("mov ecx, {0}", obj.BaseAddress);
    ObjectManager.WowReader.Asm.AddLine("call {0}", interactAddress); //read pointer to Interact method
    ObjectManager.WowReader.Asm.AddLine("retn");
    // find wows main thread
    Process[] wowProcesses = Process.GetProcessesByName("Wow");
    IntPtr threadHandle = OpenThread(ThreadAccess.SUSPEND_RESUME, false, (uint)wowProcesses[0].Threads[0].Id);
    // suspend wows main thread
    SuspendThread(threadHandle);
    // do our funky injection
    ObjectManager.WowReader.Asm.InjectAndExecute(codeCave);
    // resume wows main thread
    ResumeThread(threadHandle);
    // clean up
    ObjectManager.WowReader.FreeMemory(codeCave);
    }
    Just wondering if this happens / has happened to anyone else? Its not like its a bot-killer (I can just check whether the mine has disappeared and call it again if it hasnt) but I'm curious as to why it doesnt happen ALL the time, only sometimes.

    Cheers.

    Blizzard blocking Interact()... sometimes.
  2. #2
    jbrauman's Avatar Member
    Reputation
    65
    Join Date
    Dec 2007
    Posts
    72
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    And now we crash:



    = /

  3. #3
    luciferc's Avatar Contributor
    Reputation
    90
    Join Date
    Jul 2008
    Posts
    373
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Look up how to Suspend/Resume a main thread...

    Then do it to Wow.

    Aka


    Code:
    suspendthread();
    
    //ASM
    //ASM
    
    //Inject&Execute
    
    resumethread();
    that will make it so it never crashes :P

  4. #4
    jbrauman's Avatar Member
    Reputation
    65
    Join Date
    Dec 2007
    Posts
    72
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by luciferc View Post
    Look up how to Suspend/Resume a main thread...

    Then do it to Wow.

    Aka


    Code:
     
    suspendthread();
     
    //ASM
    //ASM
     
    //Inject&Execute
     
    resumethread();
    that will make it so it never crashes :P
    I'm already suspending and resuming wow's main thread.

  5. #5
    ramey's Avatar Member
    Reputation
    45
    Join Date
    Jan 2008
    Posts
    320
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I never had problems with that, never gets blocked. Weird issue.

  6. #6
    KrisBG's Avatar Active Member
    Reputation
    66
    Join Date
    Jan 2009
    Posts
    58
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    jbrauman omg what is that addon please tell me the name, your wow interface is nice
    https://www.mmowned.com/forums/emulator-server-releases/274640-repack-mangos-zero-1-12-1-krisbg-shadows-past-pretbc.html

  7. #7
    ramey's Avatar Member
    Reputation
    45
    Join Date
    Jan 2008
    Posts
    320
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  8. #8
    kynox's Avatar Member
    Reputation
    830
    Join Date
    Dec 2006
    Posts
    888
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I would have said it was a threading issue, but if you say you're locking wows thread (Are you sure its their main thread? If you stop it, does it stop rendering?) then i'm not sure.

  9. #9
    Cursed's Avatar Contributor
    Reputation
    270
    Join Date
    Jun 2007
    Posts
    1,380
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by kynox View Post
    I would have said it was a threading issue, but if you say you're locking wows thread (Are you sure its their main thread? If you stop it, does it stop rendering?) then i'm not sure.
    Omg, look at your rep oO
    kynox is evil!

  10. #10
    SKU's Avatar Contributor
    Reputation
    306
    Join Date
    May 2007
    Posts
    565
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Now he's good again! :P

    Ontopic: No idea, sorry. :-(

  11. #11
    jbrauman's Avatar Member
    Reputation
    65
    Join Date
    Dec 2007
    Posts
    72
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by kynox View Post
    I would have said it was a threading issue, but if you say you're locking wows thread (Are you sure its their main thread? If you stop it, does it stop rendering?) then i'm not sure.
    Actually, I'm not sure if its wows main thread. I read somewhere that in .NET, Process.Threads[0] is always the main thread but... seems I am finding the main thread every time the function is called, perhaps Process.Threads[0] is not always the main thread.

    I'll look into it.

  12. #12
    jbrauman's Avatar Member
    Reputation
    65
    Join Date
    Dec 2007
    Posts
    72
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Apparently I have to monitor the call stack of each thread of w/e to find out which is the main thread. Screw that. Now Im just looping through every one of wows threads and disabling it, injecting, and then re-enabling them all.

    Yay for brute force.

    Code:
    // find and suspend all of wows threads
    Process[] wowProcesses = Process.GetProcessesByName("Wow");
    foreach (ProcessThread curThread in wowProcesses[0].Threads)
    {
        IntPtr threadHandle = OpenThread(ThreadAccess.SUSPEND_RESUME, false, (uint)curThread.Id);
        SuspendThread(threadHandle);
    }
    // do our funky injection
    ObjectManager.WowReader.Asm.InjectAndExecute(codeCave);
    / find and resume all of wows threads
    foreach (ProcessThread curThread in wowProcesses[0].Threads)
    {
        IntPtr threadHandle = OpenThread(ThreadAccess.SUSPEND_RESUME, false, (uint)curThread.Id);
        ResumeThread(threadHandle);
    }
    Edit: Even though I haven't had a crash yet, it seems the Wow is still being blocked from doing Interact sometimes, with the same addon-message as above. Even though I'm now suspending ALL of wow's threads.
    Last edited by jbrauman; 02-06-2009 at 06:27 PM.

  13. #13
    Nesox's Avatar ★ Elder ★
    Reputation
    1280
    Join Date
    Mar 2007
    Posts
    1,238
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You dont want to resume it before the injected code has finished executing, make sure it has finished make it send a message or something

  14. #14
    naa's Avatar Contributor
    Reputation
    100
    Join Date
    Oct 2006
    Posts
    63
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you use Black Magic you can do:
    Code:
            public static int ProcessId;
            public static void suspendMainThread(int dwProcessId)
            {
                ProcessId = dwProcessId;
                ProcessThread wowMainThread = SThread.GetMainThread(ProcessId);
                IntPtr hThread = SThread.OpenThread(wowMainThread.Id);
    
                SThread.SuspendThread(hThread);
            }
    
            public static void resumeMainThread(int dwProcessId)
            {
                ProcessId = dwProcessId;
                ProcessThread wowMainThread = SThread.GetMainThread(ProcessId);
                IntPtr hThread = SThread.OpenThread(wowMainThread.Id);
    
                SThread.ResumeThread(hThread);
            }

  15. #15
    jbrauman's Avatar Member
    Reputation
    65
    Join Date
    Dec 2007
    Posts
    72
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by naa View Post
    If you use Black Magic you can do:
    Code:
            public static int ProcessId;
            public static void suspendMainThread(int dwProcessId)
            {
                ProcessId = dwProcessId;
                ProcessThread wowMainThread = SThread.GetMainThread(ProcessId);
                IntPtr hThread = SThread.OpenThread(wowMainThread.Id);
     
                SThread.SuspendThread(hThread);
            }
     
            public static void resumeMainThread(int dwProcessId)
            {
                ProcessId = dwProcessId;
                ProcessThread wowMainThread = SThread.GetMainThread(ProcessId);
                IntPtr hThread = SThread.OpenThread(wowMainThread.Id);
     
                SThread.ResumeThread(hThread);
            }
    In that code, what does SThread represent?

Page 1 of 2 12 LastLast

Similar Threads

  1. [Question] Block Blizzard Cheat update?
    By lyan123 in forum Overwatch Chat
    Replies: 12
    Last Post: 08-17-2016, 05:30 PM
  2. Blizzard.. The ultimate cock block..
    By Pukka in forum Community Chat
    Replies: 0
    Last Post: 04-26-2014, 05:03 AM
  3. How to Block Any PvP Flag from Being Clicked on or Interacted With (PvP)
    By CollateralGaming in forum World of Warcraft Exploits
    Replies: 10
    Last Post: 02-22-2014, 06:20 PM
  4. Easiest way to use "Blizzard UI" functions to /interact with a selected target?
    By b0nghitter in forum WoW Bots Questions & Requests
    Replies: 1
    Last Post: 11-05-2012, 11:07 AM
  5. Block resurrection of the opposite faction in battle grounds
    By Matt in forum World of Warcraft Exploits
    Replies: 5
    Last Post: 06-08-2006, 03:19 AM
All times are GMT -5. The time now is 07:12 PM. 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