MemorySharp - C# based memory editing library targeting Windows applications ! menu

User Tag List

Page 2 of 2 FirstFirst 12
Results 16 to 27 of 27
  1. #16
    redcatH's Avatar Member
    Reputation
    2
    Join Date
    Sep 2012
    Posts
    29
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    super!!!!thk @ZenLulz

    These ads disappear when you log in.

  2. #17
    RivaLfr's Avatar Contributor CoreCoins Purchaser Authenticator enabled
    Reputation
    221
    Join Date
    Sep 2010
    Posts
    258
    Thanks G/R
    2/25
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Very nice library. Only one problem, get relative address is very slow, why do not save MainModule when you initialize MemorySharp

    For 100 000 int reads:
    array = sharp.Read<int>((IntPtr)(i * 0x4), true); // 30 810 ms
    array = sharp.Read<int>((IntPtr)(i * 0x4 + mainModuleAddress), false); // 156 ms
    Last edited by RivaLfr; 10-08-2013 at 06:20 AM.
    Rival/Droidz

  3. #18
    ZenLulz's Avatar Corporal CoreCoins Purchaser
    Reputation
    59
    Join Date
    Jan 2012
    Posts
    20
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey RivaLfr !

    Nice to see you here and thanks for your report.
    I will look after this bottleneck and more generally enhance the library by adding a caching system to avoid these cases.

    Cheers
    ZenLulz, Author of MemorySharp - A C# based memory editing library.

  4. #19
    Shenlok's Avatar Active Member
    Reputation
    15
    Join Date
    Jul 2008
    Posts
    42
    Thanks G/R
    6/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is fantastic, great work ZenLulz! I'll certainly give this a try, I've been meaning to start playing with WoW memory editing again for a while now and this is the perfect excuse. Judging from a quick browse of your example code, plus the comments from the bigwigs here, I think it's safe to say this could become the de facto memory editing library for C# once you iron out the performance details Thanks very much for the contribution to the community!

  5. #20
    ZenLulz's Avatar Corporal CoreCoins Purchaser
    Reputation
    59
    Join Date
    Jan 2012
    Posts
    20
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Shenlok,

    Thanks for your sweet comment !

    I'm currently working on a lightweight .NET library for benchmarking performance of a set of functions. My first motivation by doing that is to enhance the speed of MemorySharp. The project is only on Github (here) for the moment, but I plan to bring it up on my website once it's done.

    To answer to your question sent by PM, the library does not support injection of .NET libraries directly within a remote process unfortunately, you have to make your own native dll that set up the .NET environment. Nevertheless, it can be a good idea as improvement for it. I started to list the people's ideas on my website here.

    cheers,
    ZenLulz
    Last edited by ZenLulz; 10-15-2013 at 11:33 AM. Reason: Added the link for the suggestion list.
    ZenLulz, Author of MemorySharp - A C# based memory editing library.

  6. #21
    vmv's Avatar ★ Elder ★
    Reputation
    1119
    Join Date
    Nov 2013
    Posts
    1,319
    Thanks G/R
    86/976
    Trade Feedback
    0 (0%)
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Hello,
    I have a function to open a process and retrieve the base address from a specified .dll inside that process but i think is doing something wrong when i use CloseHandle.
    How would be my function using this library ?
    Here is the code:

    PHP Code:
    [DllImport("kernel32.dll")] public static extern IntPtr OpenProcess(uint dwDesiredAccessbool bInheritHandleint dwProcessId);

            public static 
    IntPtr myProcess;

            public static 
    void OpenProcess()
            {
                
    Process[] procs Process.GetProcessesByName("game.exe");

                if (
    procs.Length == 0)
                {
                    
    MessageBox.Show("game not found...");
                    return;
                }
                else
                {
                    
    int dwPid procs[0].Id
                    
                    
    myProcess OpenProcess0x1F0FFFfalsedwPid );

                    
    ProcessModuleCollection modules procs[0].Modules;
     
                    foreach (
    ProcessModule module in modules)
                    {
                        if (
    module.ModuleName == "this.dll")
                        {
                            
    int gameBase module.BaseAddress.ToInt32() + 0x00000000;
                        }
                    }
                }
            } 
    Thank you,

  7. #22
    ZenLulz's Avatar Corporal CoreCoins Purchaser
    Reputation
    59
    Join Date
    Jan 2012
    Posts
    20
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi, Vmv,

    Thanks for your interest about MemorySharp.
    Here is the code written with the library that performs the same actions than yours.

    Code:
    using (var memory = new MemorySharp(ApplicationFinder.FromProcessName("notepad++").First()))
    {
        var baseAddress = memory.Modules.RemoteModules.First(m => m.Name == "this.dll").BaseAddress;
    }
    A bit more straightforward.

    Cheers,
    ZenLulz
    ZenLulz, Author of MemorySharp - A C# based memory editing library.

  8. #23
    Corthezz's Avatar Elite User Authenticator enabled
    Reputation
    386
    Join Date
    Nov 2011
    Posts
    323
    Thanks G/R
    175/98
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am thinking about switching to your library over Blackmagic which I use currently.
    Is there any benchmark comparing all current libraries?

    +Rape for the good work

  9. #24
    vmv's Avatar ★ Elder ★
    Reputation
    1119
    Join Date
    Nov 2013
    Posts
    1,319
    Thanks G/R
    86/976
    Trade Feedback
    0 (0%)
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by ZenLulz View Post
    Hi, Vmv,

    Thanks for your interest about MemorySharp.
    Here is the code written with the library that performs the same actions than yours.

    Code:
    using (var memory = new MemorySharp(ApplicationFinder.FromProcessName("notepad++").First()))
    {
        var baseAddress = memory.Modules.RemoteModules.First(m => m.Name == "this.dll").BaseAddress;
    }
    A bit more straightforward.

    Cheers,
    ZenLulz

    An unhandled exception of type 'System.ApplicationException' occurred in MemorySharp.dll

    Additional information: Couldn't get the information from the process, error code '-1073741820'.

    I'm newbie...don't shoot me

    PHP Code:
    using System.Linq;
    using Binarysharp.MemoryManagement;
    using Binarysharp.MemoryManagement.Helpers;


    namespace 
    tester
    {
        public class 
    rwMem
        
    {
            public static 
    void Open()
            {
                
    using (var memory = new MemorySharp(ApplicationFinder.FromProcessName("game.exe").First()))
                {
                    var 
    baseAddress memory.Modules.RemoteModules.First(=> m.Name == "game.dll").BaseAddress;
                }
            }
        }

    Hmmm...it's my mistake..i was on 64bit...but i need this for 64bit .

    It is working fine on 32bit ...just awesome.

    Now...let's go further ....
    Last edited by vmv; 11-17-2013 at 05:10 PM.

  10. #25
    vmv's Avatar ★ Elder ★
    Reputation
    1119
    Join Date
    Nov 2013
    Posts
    1,319
    Thanks G/R
    86/976
    Trade Feedback
    0 (0%)
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Well...i tripped again ...how about Allocation/Dealoc :
    PHP Code:
    public static void allocate(out int vMemoryint nSize)
            {
                
    vMemory VirtualAllocEx(m_hProcessIntPtr.ZeronSizeAllocType.CommitProtect.ExecuteReadWrite);
            } 
    More then 2 hours trying to understand what's there...

    Thank you,

  11. #26
    ZenLulz's Avatar Corporal CoreCoins Purchaser
    Reputation
    59
    Join Date
    Jan 2012
    Posts
    20
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi there,

    @Corthezz, Thanks ! There is actually no official benchmarking numbers. Nevertheless, I'm definitively interested in having some figures to show and optimize the performance of my library. For that purpose, I just released a lightweight tool to measure predefined functions in .NET applications. This library is called BenchShark and basically benchmarks the functions with a given number of iterations to measure their speed. I plan to integrate a new project within the MemorySharp solution in order to extract some interesting numbers and make sure some key features aren't and won't become a bottleneck.

    @Vmv: I answered to your questions in the official forum.

    Cheers,
    ZenLulz
    ZenLulz, Author of MemorySharp - A C# based memory editing library.

  12. #27
    xbec's Avatar Member
    Reputation
    3
    Join Date
    Jun 2019
    Posts
    31
    Thanks G/R
    12/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    cannn't run on x64.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. [Release] SHInject - A small Memory Editing library for 3.3.5:12340
    By Blackplayer27 in forum WoW Memory Editing
    Replies: 4
    Last Post: 09-22-2020, 06:06 PM
  2. Java Memory Editing Lib for Windows
    By kyperbelt in forum WoW Memory Editing
    Replies: 10
    Last Post: 05-14-2016, 05:34 PM
  3. Memory editing/reading library for Go
    By Nikentic in forum Programming
    Replies: 0
    Last Post: 05-10-2016, 08:54 AM
  4. [source][C++]Blackbone - windows memory hacking library
    By DarthTon in forum WoW Memory Editing
    Replies: 15
    Last Post: 02-21-2015, 07:39 AM
  5. HadesMem - A Windows Memory Hacking Library for C++
    By Cypher in forum WoW Memory Editing
    Replies: 81
    Last Post: 02-10-2013, 03:24 PM
All times are GMT -5. The time now is 01:18 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2022 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2022 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search