Question D3D GetRenderTargetData -> Clean Surface

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

iKasu

Newbie
Full Member
Jan 5, 2013
22
212
0
Yeah Hey Guys,

on the Game i play (The War Z), the Server sends a Request to the Client and take a Screenshot and sends it to the Server.
The Problem is, whenever i have Chams or ESP on it will be send to the Server and they Bann me.

At the Moment i search for a solution to protect my Hack with a Clean ScreenShot Protection, so my Hack will not be shown on the Screenshot.

I tryed to get the Surface of the Game BEVOR my Hack draws (120 fps) and then if the Screenshot will be requested it puts the Clean Surface to the RenderTarget.

I allready got a "BLACK SCREEN" but i want the Normal Game Render Stuff (objects, players usw.)
I got some help from another but dont know how to implement it -.-'

Here is it:
ss (2013-01-11 at 07.57.17).png
(Link to the Thread: Click heeeereeee

Actually it shows this:
Screen_11002013_195059.jpg


I hope anyone can help me <.<
 

saebur

Jr.Coder
Full Member
Nobleman
Aug 14, 2012
64
688
0
Is the game using punkbuster? I'm aware that PB uses screen shotting. If so, there's bypasses for it out there already.
 

iKasu

Newbie
Full Member
Jan 5, 2013
22
212
0
Well the only changes was set in the d3ddevice.cpp

https://pastebin.com/raw.php?i=LHL2dKeG

GetRenderTargetData_h is above the EndScene.

And no its not using Punkbuster =D
Its just a Serverside Screenshot request.
I dont care if something gets Black, but for my Hack i want a Clean Screenshot without the stuff drawn by my Hack -.-'

Added a few other things - D3D returns allways a Black Screen
 

iKasu

Newbie
Full Member
Jan 5, 2013
22
212
0
I don't see where you're displaying a black screen? I might have missed something? Oo
EndScene
C++:
if(framecounter == maxframes){
	framecounter = 0;
	LPDIRECT3DSURFACE9 pRenderTarget = NULL;
	m_pD3Ddev->GetRenderTarget(0, &pRenderTarget);	//Gets the rendered surface from the game's device
	GetRenderTargetData_h(m_pD3Ddev, pRenderTarget, pBuf); //Copies rendered surface to memory
}
I dont know if it happens that i get a Black Screen because nothing gets rendered b4 or anything else.

In the hook initialisation i try to read something
Code:
IDirect3DSurface9* pRenderTarget;
D3DSURFACE_DESC VDesc;

m_pD3Ddev->GetRenderTarget(0, &pRenderTarget);
pRenderTarget->GetDesc(&VDesc);
pRenderTarget->Release();

HRESULT ret = m_pD3Ddev->CreateOffscreenPlainSurface(VDesc.Width, VDesc.Height, VDesc.Format, D3DPOOL_SYSTEMMEM, &pBuf, NULL);
I think it has something to do with the COPS but yeah - i dont know -.-'
 

iKasu

Newbie
Full Member
Jan 5, 2013
22
212
0
Try making:

if( framecounter == maxframes )
{
}
else
{
// Draw Menu n' shit.
}

Just to get rid of the drawings when screenshot is taking.

EDIT: I'll check why when the screenshot is taking the screen goes black.
Well i saw it has nothing to do with the framecounter so if i let the framecounter blank then my menü gets drawn and then it deactiave and activate it again, but just once :D

Whenever i take a Screen still a Black Screen <.<

Edit:

Haha okay i comment all out and what happens - still black screen xD
It seems something else has to do with the Screenshot because if i inject something - black screenshot, if not - normal screenshot <.<
 
Last edited:

iKasu

Newbie
Full Member
Jan 5, 2013
22
212
0
Sorry but this helped me not -.-'
The Problem i have is GetRenderTargetData

C++:
HRESULT D3DAPI GetRenderTargetData_h(LPDIRECT3DDEVICE9 pDevice, IDirect3DSurface9 *pRenderTarget, IDirect3DSurface9 *pDestSurface)
{
    return D3DXLoadSurfaceFromSurface(pDestSurface, NULL, NULL, pBuf, NULL, NULL, D3DX_FILTER_NONE, 0);
}
actually i load it so:

C++:
	GetRenderTargetData_h(m_pD3Ddev, pRenderTarget, pBuf); //Copies rendered surface to memory
m_pD3Ddev is my d3d device, pRenderTarget should be the Destination in Memory via GRTD_h and pBuf is the actual Surface.

If i safe it normal via D3DXSaveSurfaceToFile("C:\\bla.png", D3DXIFF_PNG, pDestSurface, NULL, NULL);
i have a clean Surface, without my Hack! <- Exaclty this is what i want =)
But yeah , if i do a screen - Black -.-'
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Similar threads

Community Mods