Results 1 to 5 of 5
  1. #1
    Yemiez's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Location
    Sweden
    Posts
    2,566
    Reputation
    731
    Thanks
    16,280
    My Mood
    Devilish

    Yami Framework (Object Oriented, Memory Management)



    What is Yami Framework?
    Yami framework is a object oriented library with Form system, UI system and lots of other Utils used for file management, crypting etc!


    Features:

    Crypter:
    The crypter contains functions to Encrypt or Decrypt files with cryptography keys, you can Encrypt/Decrypt a file into memory, you can decrypt a encrypted file and save it as another file (e.g encrypted.enc, decrypt and save as decrypted.exe) And vice versa!
    Example:
    Code:
    Shared<YCrypter> pCrypter = make_shared<YCrypter>();
    cryptograpy_key key("MPGH"); // Cryptograpy key
    pCrypter->EncryptFile("exe.exe", "encrypted.data", key); // Encrypt the file
    // Decrypt encrypted data to be able to use the exe like normal again (or dll or whatever you stored)
    pCrypter->DecryptFile("encrypted.data", "newexe.exe", key);
    // Remember that the key must always be the same, you cannot encrypt a file with key 'MPGH' and then try to decrypt it with 'mpgh'


    EventHandler:
    The EventHandler is used to Dispatch events, All UI Systems and the Window class uses the Event system to dispath certain events for key presses, mouse moves or other general events. (Use += operator assign a events function)
    To use the eventhandler with member functions use a lamda, to use member functions put 'this' in the capture-list, to use local definitions pass '&' to the capture-list:

    Code:
    // Member function
    event += [this](arguments) { memberfunction(arguments); };
    
    // Local function
    .... definiton of 'object' ....
    event += [&](arguments) { object->function(arguments); };

    FileManagement:
    The file management is used to check if files exists, get all files in a certain directory, there is also a config system avaiable that can get/set variables in a file.

    Managed: (Big)
    The managed section of the library contains alot of the memory & pointer managing.
    Thread system is used to start threads, with this Thread system you can start threads for Member functions, now the syntax is a bit ugly because of how C++ Member Function Pointers work and some other retarded shit kek.
    Example of Thread System:
    Code:
    TestClass class; // Object
    Shared<YThread> thread = make_shared<YThread>(); // Shared pointer (You'll learn what Shared pointer is in a sec)
    thread->Start(&class, &TestClass::FunctionYouWantToBeThread, argumentsused);
    The Pointer system is based on Shared pointers, this is to manage an object much better, you do not need to worry about destroying the object, when Shared's Destructor is called it will delete the pointer it manages, but only if it is the original owner!
    When creating a Shared pointer you must use make_shared, you cannot initalize a Shared pointer with an already created pointer, you must use make_shared to create the pointer, however you can copy a Shared pointer.
    Example:
    Code:
    Shared<TestClass> object = make_shared<TestClass>(); // object is the original owner of this pointer now, only object can destroy it
    Shared<TestClass> shared_ptr(object); // shared_ptr can also access the object now
    
    std::cout << "object is " << (object.is_owner() ? "Owner" : "Brother") << std::endl; // Outputs Owner
    std::cout << "shared_ptr is " << (shared_ptr.is_owner() ? "Owner" : "Brother") << std::endl; // Outputs Brother
    // When object goes out of scope the managed pointer will be destroyed and all memory de-allocated!
    Memory part of Managed.
    There are 2 iterators avaiable, Prcocess iterators and Module iterators, these can be used to iterate through all processes or all modules inside a process.
    Example:
    Code:
    YProcessIterator pIter;
    
    while(++pIter) // ++ operator has been overloaded, every time you ++ the iterator it goes to the next process (it returns true if there is a next process)
    {
       if (pIter->name == "csgo.exe") // Name is the name of the process
       {
           YModuleIterator mIter(pIter->pID); // Module iterator must be constructed with a process ID 
           while(++mIter) // Same as proc iter
           {
               if (mIter->name == "client.dll") // If name etc etc
           }
       }
    }
    The Memory class is used for Reading & Writing memory, you must attach to a process (using Attach func) before you can Read/Write from a process, if the Attach fails the Read/Write call will also fail (probably give you deref error to).
    Example:
    Code:
    Shared<YMemory> pMemory = make_shared<YMemory>(); // Managed object
    
    if (pMemory->Attach("csgo.exe"))
    {
         YModule client;
         pMemory->Module("client.dll", &client);
         pMemory->Read<int>(someaddr);
    }



    UI:
    The UI System can be used to create advanced User interfaces with tabs.
    Example of what is currently existent:


    To show an example of UI code would be a bit to much to be able show, and that is why you should use "Project Generator.exe" to generate a sample project showcasing A form class with a few UI elements.


    Window
    This actually contains more than just the window, the name will be reconsidered at a later date.
    The Renderer contains all the functions required to draw on the screen.
    The window creates a WINAPI Window, to create a renderer you need a window to draw on.
    The texture class creates texture from a file (In memory or saved)


    Yami Application:
    This is the main framework, here you have your Application, Form and Timer class.
    The Application class is used to manage your application, but atm it is still missing alot, however you need it to run a form, to create the application class you need to run the Start function with correct parameters.
    Example:
    Code:
    int main(int argC, char* argV[)
    {
       Shared<YApplication> app = Start(argC, argV); // Start application
    
       return app->Exit(); // Exit application
    }



    Known Bugs
    - Currently when the window is opened the params are wrong, you must resize the window a tiny bit and you'll be able to click everything perfectly! (Trying to figure this one out)
    - Some classes have yet to be updated to match the managed part of the framework (e.g the UI Controls)



    How to install:
    • Extract the contents of the .rar
    • Open "Project Generator.exe"
    • Type: gen newProject
    • There should now be a newProject folder where "Project Generator" was located, inisde this folder you should find a Visual studio project with a main.cpp setup!
    • Next you need to setup the project includes & library includes.
    • Change the includes in main.cpp to fit how you included the Includes file.


    Video Tutorial: (topkek music m8s)



    Virusscan

     


     

    - Original Release


     

    - Fixed Project Generation with Project Generator (now generates correct main.cpp data!)
    - Changed how Shared works, it now only deletes the pointer if the last instance goes out of scope/calls destroy.
    - Fixed spelling misstake in the YWindow class. (From getHeight to getHeigth)



     

    - Changed all UI elements to match the rest of the framework (Shared pointers etc)

    - Changed 'Event' class to be able to use lamdas for callbacks, this makes it much
    easier to have events invoke member functions or similiar!

    - Changed Form class a little, you should no longer need to initalize '_myWindow' & '_myRenderer' in InitalizeComponent function!

    - Added constructor for taking in a pointer to an existing object for Shared, after
    the Shared object has been constructed, Shared will control the pointer and safely release it when time is due.

    - Added UICanvas, used for controlling UIWindows(new), this class is based around controllling windows
    and sending events to the window, window sends it to its children and on it goes. Canvas also uses a
    topmost system, the current focused window will be ontop of all other windows!

    - Added UIWindow, used for adding UI items, a UIWindow controlls the placement of the UIItems added to it.

    - Added 'CreateOverlayedWindow' function to class 'YWindow', this opens the possibily to create
    an overlay window. (Used for creating ESPs or other visual aspects)

    - Added 'verify' command to Project Generator, use this to check so your files are intact!

    - Fixed some small 'Uncontrollable' code within the Pointer class, it will no longer randomly delete pointers
    (Was a small bug)

    - Fixed return type of operator* in the iterator classes, it no longer returns a pointer
    to the current iterated object, it returns a reference. (Makes more sense)


     

    - Fixed crypter


     

    - Added YHandleManager class in Managed (Used for opening handles to objects, locking the handles etc)
    - Added YDataAllocator class in Managed (Used for allocating/deallocating memory)
    - Added "ShowDialog" function to form, using the application to start a form is no longer required (Note this will be ran in the current thread, meaning it will be deadlocked to the form as long as the form is open)
    - Added 'OnItemKeyDown' event to UITextbox.
    - Added new operator() to the Event, use it to call the eventhandlers function(s).
    - Added UIProgressBar, displays a progress bar on the screen with (0-100) progress.
    - Fixed a small bug in the Window handle code, still need to refactor it but now it should prevent wierd errors.
    - Fixed UITextbox input handling! (If you wish to handle each keystroke yourself then assign the eventhandler 'OnItemKeyDown' and return true)
    - Fixed the CallFunc function in EventHandler, it now returns the Signature return type of the targetted event function.
    - Re-factored Textbox, you can now add a texture to it (it'll look like this: https://gyazo.com/96d6eb3870a908da32d000c953f6dd16)
    - Re-factored Event, when using += operator you are now appending more functions to the current vector of Handlers. (Meaning you can have multiple callbacks per event)






    Please report any bugs to MPGH.Yamiez on skype!
    <b>Downloadable Files</b> Downloadable Files
    Last edited by Yemiez; 12-21-2015 at 02:38 PM.

  2. The Following 5 Users Say Thank You to Yemiez For This Useful Post:

    [MPGH]Dave84311 (12-10-2015),Hunter (12-22-2015),maestro1994 (12-01-2015),pean153 (12-16-2015),stephD (02-01-2016)

  3. #2
    Dave84311's Avatar
    Join Date
    Dec 2005
    Gender
    male
    Location
    The Wild Wild West
    Posts
    35,837
    Reputation
    5782
    Thanks
    41,292
    My Mood
    Devilish
    Approved .





    THE EYE OF AN ADMINISTRATOR IS UPON YOU. ANY WRONG YOU DO IM GONNA SEE, WHEN YOU'RE ON MPGH, LOOK BEHIND YOU, 'CAUSE THATS WHERE IM GONNA BE


    "First they ignore you. Then they laugh at you. Then they fight you. Then you lose.” - Dave84311

    HAVING VIRTUAL DETOX

  4. The Following User Says Thank You to Dave84311 For This Useful Post:

    Yemiez (11-30-2015)

  5. #3
    hkKenshin's Avatar
    Join Date
    Oct 2013
    Gender
    male
    Posts
    301
    Reputation
    28
    Thanks
    340
    Very nice, reminds me of Qt a bit.

  6. The Following User Says Thank You to hkKenshin For This Useful Post:

    Yemiez (11-30-2015)

  7. #4
    maestro1994's Avatar
    Join Date
    Sep 2015
    Gender
    male
    Posts
    95
    Reputation
    10
    Thanks
    13
    amazing , good job as always ^^

  8. The Following User Says Thank You to maestro1994 For This Useful Post:

    Yemiez (12-04-2015)

  9. #5
    Yemiez's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Location
    Sweden
    Posts
    2,566
    Reputation
    731
    Thanks
    16,280
    My Mood
    Devilish
    I haven't been able to update this release since it was released, but I've released quite a few updates & Patches, here are the full patch notes:

    Quote Originally Posted by Yamiez View Post
    I still haven't quite figured out why you are unable to show 2 forms at the same time (In different windows).
    I'm gonna have to refactor alot of my existing window/render handles, mainly to implement my new Handle system.


     

    - Added YHandleManager class in Managed (Used for opening handles to objects, locking the handles etc)
    - Added YDataAllocator class in Managed (Used for allocating/deallocating memory)
    - Added "ShowDialog" function to form, using the application to start a form is no longer required (Note this will be ran in the current thread, meaning it will be deadlocked to the form as long as the form is open)
    - Added 'OnItemKeyDown' event to UITextbox.
    - Added new operator() to the Event, use it to call the eventhandlers function(s).
    - Added UIProgressBar, displays a progress bar on the screen with (0-100) progress.
    - Fixed a small bug in the Window handle code, still need to refactor it but now it should prevent wierd errors.
    - Fixed UITextbox input handling! (If you wish to handle each keystroke yourself then assign the eventhandler 'OnItemKeyDown' and return true)
    - Fixed the CallFunc function in EventHandler, it now returns the Signature return type of the targetted event function.
    - Re-factored Textbox, you can now add a texture to it (it'll look like this: https://gyazo.com/96d6eb3870a908da32d000c953f6dd16)
    - Re-factored Event, when using += operator you are now appending more functions to the current vector of Handlers. (Meaning you can have multiple callbacks per event)



    EDIT:
    I found a vector iterator bug, will release patch later.

Similar Threads

  1. [Release] [C++] Yami Framework (Object Oriented, Memory Management)
    By Yemiez in forum Counter-Strike 2 Hacks
    Replies: 68
    Last Post: 02-23-2016, 01:43 PM
  2. Writing Object Oriented Python
    By griimnak in forum Programming Tutorials
    Replies: 0
    Last Post: 12-09-2015, 10:17 PM
  3. [Tutorial] Memory management [C]
    By maestro1994 in forum C++/C Programming
    Replies: 0
    Last Post: 09-07-2015, 05:58 AM
  4. [Assembly Tutorial] Object-oriented assembly <FASM>
    By TrollerCoaster in forum Programming Tutorials
    Replies: 3
    Last Post: 01-02-2013, 09:53 AM
  5. Direct Memory Access (DMA) to Static Memory Addresses
    By Dave84311 in forum Game Hacking Tutorials
    Replies: 0
    Last Post: 12-31-2005, 08:18 PM