[Question] Finding the Player Base Address in C++ menu

User Tag List

Page 2 of 2 FirstFirst 12
Results 16 to 30 of 30
  1. #16
    hamburger12's Avatar Contributor CoreCoins Purchaser
    Reputation
    87
    Join Date
    Jan 2010
    Posts
    297
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wtf... Pleas start Reading a Tutorial. Why the hell are you injecting an Dll into Wow just to read from it?. Its much easyer... I have posted Below the Code that you need!

    Ok here a smart Tutorial for you...

    First Step Prepair Read Funktions:

    Code:
    DWORD GetModuleBase(HANDLE hProc, string &sModuleName)
    {
       HMODULE *hModules;
       char szBuf[50];
       DWORD cModules;
       DWORD dwBase = -1;
       //------
    
       EnumProcessModules(hProc, hModules, 0, &cModules);
       hModules = new HMODULE[cModules/sizeof(HMODULE)];
       
       if(EnumProcessModules(hProc, hModules, cModules/sizeof(HMODULE), &cModules)) {
          for(int i = 0; i < cModules/sizeof(HMODULE); i++) {
             if(GetModuleBaseName(hProc, hModules[i], szBuf, sizeof(szBuf))) {
                if(sModuleName.compare(szBuf) == 0) {
                   dwBase = (DWORD)hModules[i];
                   break;
                }
             }
          }
       }
    
       delete[] hModules;
    
       return dwBase;
    }
    
    HWND WinGetProcess(std::string name)
    {
    	return FindWindow(NULL,name.c_str());
    }
    DWORD GetProcessId(HWND fenster)
    {
    	DWORD id;
    	GetWindowThreadProcessId(fenster,&id);
    	return id;
    }
    HANDLE MemoryOpen(HWND fenster)
    {
    	DWORD PID = GetProcessId(fenster);
    }
    
    DWORD ReadDword(HANDLE phandle, DWORD Addr)
    {
        DWORD value;
        ReadProcessMemory(phandle,(LPVOID)Addr,&value,sizeof(DWORD),0);
        return value;
    }
    Ok next Step. Get Window and Start Reading Playerbase...:

    Code:
    DWORD PlayerBaseStatic = 0x924720;
    DWORD Offset1 = 0x38;
    DWORD Offset2 = 0x24;
    
    HWND WowWindow = WinGetProcess("World of Warcraft");
    HANDLE WowMem = MemoryOpen(WowWindow);
    DWORD WowBase = GetModuleBase(WowMem,"Wow.exe");
    
    DWORD PlayerBase = ReadDword(WowMem,ReadDword(WowMem,ReadDword(WowMem,WowBase+PlayerBaseStatic)+Offset1)+Offset2);
    If you can't get it working then you should buy you a Book!

    [Question] Finding the Player Base Address in C++
  2. Thanks CaptainCode (1 members gave Thanks to hamburger12 for this useful post)
  3. #17
    _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 l0l1dk View Post
    I'm working on it. When I try to read or write it says the memory is inaccessable. I'm probably doing something wrong with the pointers. I haven't used multi-level pointers before.
    Code:
    DWORD* address = *(*(*(DWORD****)(wowbase + PlayerBaseStatic) + Offset1 / sizeof(DWORD)) + Offset2 / sizeof(DWORD));
    Just look at all those pretty stars

  4. #18
    suicidity's Avatar Contributor
    Reputation
    207
    Join Date
    Oct 2006
    Posts
    1,439
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by hamburger12 View Post
    ...

    Code:
    HANDLE MemoryOpen(HWND fenster)
    {
    	DWORD PID = GetProcessId(fenster);
    }
    ..

    If you can't get it working then you should buy you a Book!
    I like how your crappy function doesn't even return anything, let alone 'Open memory'.


  5. #19
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1356
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You should buy a book yourself. Your code is awful.

    In future, please refrain from writing 'tutorials'.

  6. #20
    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)
    And... this is why I'm a fan of managed code. It lets the C/C++ illiterates of the world (IE, almost everyone) continue to function without ever understanding pointers, indirection, memory layout, virtual memory, resource cleanup, ...

    Of course, then they want to go play in the deep end of the pool... and drown
    Don't believe everything you think.

  7. #21
    Neffarian's Avatar Member
    Reputation
    -5
    Join Date
    Sep 2006
    Posts
    53
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i love how people say other peoples code sucks, i actually like his, its efficient and its basic.
    not to mention original, which i can say without a doubt, that most every bot out there, uses c# because of blackrainish style libs..

    don't judge other peoples code.I don't say you suck at writing. What you type through text is how you've learned to express yourself

  8. #22
    _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)
    How can you call something that doesn't work efficient?
    I normally don't bash people who try to contribute; But he shouldn't have called it a tutorial really.
    And I would say people use c# because of the RADness of a managed language, not because of 3rd-party libs. Because there are tons more libraries available for C(++)
    Last edited by _Mike; 12-06-2010 at 11:55 PM.

  9. #23
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1356
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Neffarian View Post
    i love how people say other peoples code sucks, i actually like his, its efficient and its basic.
    not to mention original, which i can say without a doubt, that most every bot out there, uses c# because of blackrainish style libs..

    don't judge other peoples code.I don't say you suck at writing. What you type through text is how you've learned to express yourself
    What the ****? Seriously... Somebody else want to take this one? I'm physically worn out tonight and really cbf, lol.

  10. #24
    suicidity's Avatar Contributor
    Reputation
    207
    Join Date
    Oct 2006
    Posts
    1,439
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Neffarian View Post
    i love how people say other peoples code sucks, i actually like his, its efficient and its basic.
    not to mention original, which i can say without a doubt, that most every bot out there, uses c# because of blackrainish style libs..

    don't judge other peoples code.I don't say you suck at writing. What you type through text is how you've learned to express yourself
    Few problems with your post...

    It's a fact his code sucks; No question, it sucks. It's not efficient, it's the exact opposite and isn't an even remotely attractive solution. The only thing 'original' about it is that he messed up copy+pasting the code together to make that steaming pile of crap.

    Next is that most bots don't use C# for "Blackrainish" style libs, most bots use C# because it provides extremely easy development versus a good/correct C++ solution that would take "more" effort. It also has the added benefit that any C# solution could very easily be absolutely passive, which makes for good bots.

    Lastly.. Any time code is written it is judged, it's life. If we don't judge code, we end up with programs/games/technology that is massively flawed and broken. Judgement is the entire reason that there are committees that implement coding standards.


    If you don't like us trying to point out to some poor Joe Blow that this isn't a good solution, then don't read our posts; Making your self look ignorant is a bad idea, especially in this section.
    Last edited by suicidity; 12-07-2010 at 02:56 PM.


  11. #25
    Neffarian's Avatar Member
    Reputation
    -5
    Join Date
    Sep 2006
    Posts
    53
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i love the fact that more than half of you here cant write your own code(not trying to hurt any feelings, or lack there of), and idle gamedeception looking for " proofenz "
    Don't even try to tell me people don't use blackrain libs, and that its easier? So much of c# is assumption code.If people didnt use c# as much as you say they dont, wouldnt there be greater threads about c++ injection/hooking. I guess if your trying to whip something up to sell because of time, it makes sense to sharpie it. However if your actually trying to develop a bot c++ has a trillion better and cleaner methods.. its just easier to steal someone else s' work and make a pay site, then to actually learn programming i guess

    as for making myself look like an ass, i really could care less what you think. i was simply trying to say if you dont like his code, dont use it, Alternatively you would rather bitch about his code; have him rewrite it in c#, then re-post it with renamed functions and label it your own.. This is not a rage, so dont take it the wrong way. more or less a hint to understanding "Alternatives" versus following the said. an unsuccessful coders proclaiming autoit as a languange. .laff

    my professor actually read this thread since i brough up the topic of " clean Code"

    he read it and looked at me an did this "Sigh... PoorScript kiddies cant even google"
    Last edited by Neffarian; 12-15-2010 at 03:02 AM.

  12. #26
    Azzie2k8's Avatar Member
    Reputation
    11
    Join Date
    Apr 2009
    Posts
    190
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Neffarian View Post
    i love the fact that more than half of you here cant write your own code(not trying to hurt any feelings, or lack there of), and idle gamedeception looking for " proofenz "
    Don't even try to tell me people don't use blackrain libs, and that its easier? So much of c# is assumption code.If people didnt use c# as much as you say they dont, wouldnt there be greater threads about c++ injection/hooking. I guess if your trying to whip something up to sell because of time, it makes sense to sharpie it. However if your actually trying to develop a bot c++ has a trillion better and cleaner methods.. its just easier to steal someone else s' work and make a pay site, then to actually learn programming i guess

    as for making myself look like an ass, i really could care less what you think. i was simply trying to say if you dont like his code, dont use it, Alternatively you would rather bitch about his code; have him rewrite it in c#, then re-post it with renamed functions and label it your own.. This is not a rage, so dont take it the wrong way. more or less a hint to understanding "Alternatives" versus following the said. an unsuccessful coders proclaiming autoit as a languange. .laff

    my professor actually read this thread since i brough up the topic of " clean Code"

    he read it and looked at me an did this "Sigh... PoorScript kiddies cant even google"
    Do you really think it matters if you use C# or C++ ? IF you are good at programming it doenst really matter what you use but how you use it. Conventions are there for a reason.

    You are 100% right if you say that libs make it easier to copy and paste but who cares really. if you dont know how to code then even those libraries won't do much good since you will still be unable to make a full working bot out of it....

    And you are right most people here can't code that well. I for myself am not really good at reversing and dont think of myself as a really good coder but that is the reason why i usually don't open threads unless I think the issue is somehow out of the ordinary. You are attacking the only people here that can code and also post. Even if they only post to tell you that the code is crap it is still feedback and if i am told that my code is crap i will try to make it better and not fight with everyone untill they accept the bad code...but thats my thoughts...

    And I am not going to judge what your professor said there...only because an authority says so you believe something to be true or correct ? Dunno about that...
    Last edited by Azzie2k8; 12-15-2010 at 07:07 AM.

  13. #27
    mnbvc's Avatar Banned
    Reputation
    120
    Join Date
    Jul 2009
    Posts
    273
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Neffarian View Post
    i love the fact that more than half of you here cant write your own code(not trying to hurt any feelings, or lack there of), and idle gamedeception looking for " proofenz "
    so do you ...

  14. #28
    suicidity's Avatar Contributor
    Reputation
    207
    Join Date
    Oct 2006
    Posts
    1,439
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Neffarian View Post
    as for making myself look like an ass, i really could care less what you think. i was simply trying to say if you dont like his code, dont use it, Alternatively you would rather bitch about his code; have him rewrite it in c#, then re-post it with renamed functions and label it your own.
    1. I don't code in C#, and I couldn't give a rats ass about his code other than it blows ******* and some poor unknowing soul that might be making an attempt to learn is only hurting himself. On top of that I REALLY do NOT want to see his code in C#, much less where did anyone want him to rewrite it in C#?

    2. I could practically guarantee ANY real developer on these forums or on GD would agree that you're an ignorant ass that probably can't even code, you just like to be a jackass and "defend" the moronic and ignorant.

    3. You're arguing with quite a few well established programmers, reverse engineers, and bot developers; Where in your right mind are we "unsuccessful coders proclaiming autoit as a languange" or "Script kiddies"?

    4. If your "Professor" even took the time to give a crap about what came out of your mouth long enough to say something that idiotic, he shouldn't be "teaching" and he's an idiot too.


    Fact is, you know jack shit, you obviously can't read, and you're mad that it was pointed out that the posted code is absolute shit. I hate people like you, because YOU are the scum that sit on these forums and on GD looking for free handouts; It's apparent you're a moron. Just do everyone a favor and quit filling this board with your shit so at least this thread can die.


  15. #29
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1356
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Neffarian View Post
    i love the fact that more than half of you here cant write your own code(not trying to hurt any feelings, or lack there of), and idle gamedeception looking for " proofenz "
    Don't even try to tell me people don't use blackrain libs, and that its easier? So much of c# is assumption code.If people didnt use c# as much as you say they dont, wouldnt there be greater threads about c++ injection/hooking. I guess if your trying to whip something up to sell because of time, it makes sense to sharpie it. However if your actually trying to develop a bot c++ has a trillion better and cleaner methods.. its just easier to steal someone else s' work and make a pay site, then to actually learn programming i guess

    as for making myself look like an ass, i really could care less what you think. i was simply trying to say if you dont like his code, dont use it, Alternatively you would rather bitch about his code; have him rewrite it in c#, then re-post it with renamed functions and label it your own.. This is not a rage, so dont take it the wrong way. more or less a hint to understanding "Alternatives" versus following the said. an unsuccessful coders proclaiming autoit as a languange. .laff

    my professor actually read this thread since i brough up the topic of " clean Code"

    he read it and looked at me an did this "Sigh... PoorScript kiddies cant even google"
    Hey dipsh*t, I'm yet to see any real contribution to these forums from you. Who are you to comment on who can and can't code? You're obviously too selfish or too embarrassed to post any of your own code here for others to see (and judge).

  16. #30
    Robske's Avatar Contributor
    Reputation
    305
    Join Date
    May 2007
    Posts
    1,062
    Thanks G/R
    3/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the entertainment neffarian, I especially liked the part about your 'professor'. Also had a blast reading through the part where you said C# is popular due to libraries like blackrain, that one really got me on the floor.

    edit: Oh my, your post history is quite an epic tale as well!
    "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - Martin Golding
    "I cried a little earlier when I had to poop" - Sku

Page 2 of 2 FirstFirst 12

Similar Threads

  1. [Question] Finding the player base pointer
    By ddebug in forum WoW Memory Editing
    Replies: 8
    Last Post: 02-24-2012, 12:15 AM
  2. Replies: 1
    Last Post: 01-01-2011, 04:59 AM
  3. [Question] PBA(Player Base Address)
    By hestas in forum WoW Memory Editing
    Replies: 6
    Last Post: 10-23-2009, 06:50 AM
  4. Basically how to find the static mem address
    By achaville in forum WoW Memory Editing
    Replies: 2
    Last Post: 04-26-2008, 03:02 PM
  5. How to get the Player Base?
    By =sinister= in forum WoW Memory Editing
    Replies: 5
    Last Post: 03-31-2008, 02:21 AM
All times are GMT -5. The time now is 09:30 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search