praydog / Source2Gen

Source 2 SDK Generator
MIT License
135 stars 30 forks source link

Source2Gen Dota 2 Crash #2

Open YierciiCA-zz opened 7 years ago

YierciiCA-zz commented 7 years ago

Hi

Does the Source2Gen still works? I genereted the dll file and injected into dota 2, but the injection takes forever, and sometimes dota 2 crashes.

Cmake Generated with ' Visual Studio 14 2015 ' Cmake log-> The C compiler identification is MSVC 19.0.24210.0 The CXX compiler identification is MSVC 19.0.24210.0 Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe -- works Detecting C compiler ABI info Detecting C compiler ABI info - done Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe -- works Detecting CXX compiler ABI info Detecting CXX compiler ABI info - done Detecting CXX compile features Detecting CXX compile features - done Configuring done Generating done

Generated Dll File From VS2015 -> https://www.dropbox.com/s/sm3t5rlgld668w7/Source2Gen.dll?dl=0

praydog commented 7 years ago

Yes it still works. When compiling with VS2015, you need to add /Zc:threadSafeInit- to the C++ compiler options. You could also get around that by compiling it with VS2013 instead.

YierciiCA-zz commented 7 years ago

Ok thanks,

Dont know whats the problem., but as soon I inject Source2Gen.dll into game, game crashes. and nothing generated. Hrere is my Source2Gen folder with dll files: https://www.dropbox.com/sh/tvqnbzquyzher4h/AADyUMLGxS6bHzW0qIWLAS9Ka?dl=0

praydog commented 7 years ago

Wait until your game is at the main menu. Since it generated a 64-bit dll, make sure you are injecting with a 64-bit loader and you are launching the 64-bit version of the game.

When compiling with VS2015 you absolutely NEED to do what I told you in my last reply. Otherwise the game will crash.

Try installing Visual Studio 2013 and generating a Visual Studio 2013 project with CMake instead.

YierciiCA-zz commented 7 years ago

I have tried injecting 64bit dll with 'Xenos' 'Xenox64' 'Extreme Injector v3' in 64bit game =// Nothing changes allways crashes., Also same for x32 game. I have tried injecting when in main menu, in full loaded game.... =// Anyways game crashes. I have tried build with both Visual Studio 2013 and Visual Studio 2015 (And for VS2015 added that command: /Zc:threadSafeInit- // Was auto added in VS2013 Version) I have tried generating with CMake and for both VS2013 / VS2015 I also tried generate x32 project., and also launching x32 game.....

And it allways crash.

praydog commented 7 years ago

Try this injector here: http://www.unknowncheats.me/forum/downloads.php?do=file&id=15273

In settings, set the injection type to "Manual Map". It worked fine for me when doing that. I personally use my own injector, so I can't really comment on other ones.

musivian commented 7 years ago

How you guys manage to fix this line? Source2Gen generator(SOURCE2_OUTPUT); Im having trouble something like SOURCE2_OUTPUT undefined like that. Thanks for help.,

praydog commented 7 years ago

musivian, if you generated the project with CMake, it should have defined that for you. You could always define it yourself.

musivian commented 7 years ago

Hi, where can I find the generated files when Im done injecting? Drive C: or what? Thank you.

gurachan commented 7 years ago

dota 7.0 crash too x64

gurachan commented 7 years ago

nvm it works if you do release not debug xD

musivian commented 7 years ago

Hey @Dj-jom2x where does generated file located? I can't see it on folder or together with dll :(. Thanks for helping.

gurachan commented 7 years ago

Source2Gen-master\bin

btw xD can you give me example of how to use it in game ..

can i just call the function and it will auto find the offsets or should i put some offset for each class C_DOTAPlayer and C_BaseEntity

a little sample like tell if player is in game or not

praydog commented 7 years ago

@Dj-jom2x,

This project was mainly meant for reverse engineers who already know what they are doing. It does not give you the required functions needed to get some of these classes. You will need to reverse that yourself.

musivian commented 7 years ago

@Dj-jom2x What I mean is in what folder? I separate the dll from the source. Example, my dll is in C:\PrayDogSDK together with injector. After inject where should I find the generated files?

@praydog I should add you on Skype. I'll pm you out in uc.

gurachan commented 7 years ago

open cmd type this but 1st copy the path

cd "C:\Users\username\OneDrive\dota2\Source2Gen-master"

cmake -G "Visual Studio 14 2015 Win64" "C:\Users\username\OneDrive\dota2\Source2Gen-master"

open it then build it as a release

then you will get "C:\Users\username\OneDrive\dota2\Source2Gen-master\bin\Release\Source2Gen.dll"

use Extreme Injector v3 settings Auto Inject: False Method: Manual MAP

then load your dota2 .. then wait until it finish loading .. when you are in dashboard then press inject

just wait until you see this on "C:\Users\username\OneDrive\dota2\Source2Gen-master\bin"

!GlobalTypes_classes.hpp !GlobalTypes_enums.hpp client.dll_classes.hpp SchemaBase.hpp server.dll_classes.hpp worldrenderer.dll_classes.hpp

after that close your dota2 ^_^

gurachan commented 7 years ago

fail on 32bit ... 64 smooth xD both release xD well i guess i need to stay 64 for a while

gurachan commented 7 years ago

in 32 bit changes this

if (reason == 1)
    {
        thread t(StartupThread);
        t.detach();
    }

to to this

  if (reason == 1)
    {
        CreateThread(0, 0, (LPTHREAD_START_ROUTINE)StartupThread, NULL, 0, NULL);
    }

and add #include <Windows.h>

then release build

then instead of manual map do standard injection use Extreme Injector v3.6.1 .. it works now on windows 10 Ent build 15063

it crashes if you don't change it.. if you building in 64 dont change anything just do manual map on injecting thats it

gurachan commented 5 years ago

i think it doesnt work now .. all files are 1kb with only namespace schema on it