[Release] CheatEngine Fix

06/02/2013 03:43 Chriѕ#1
keine Ahnung wer den gecoded hat, interessiert mich auch nicht, ich habe ihn von Source gekriegt.
Ist leicht zu umgehen doch hilft gegen die meisten.
Der Fix arbeitet hauptsächlich mit der Tickrate.

[Alles was kommentiert ist könnt ihr natürlich auch auskommentieren je nach dem wie ihr das wollt.]

PHP Code:
Neuz VersionCommon.h

#define __CHEAT_ENGINE_BLOCK 

Neuz.cpp unter:


PHP Code:
void CNeuzApp::BeginLoadThread()
{
    
CResFile::ScanResource"" );

    
prj.LoadPreFiles();

    
m_hThread = (HANDLE_beginthreadLoadProperty0, (LPVOID)this );
#if !defined(_DEBUG)
    
WaitLoading();
#endif


das:

PHP Code:
#ifdef __CHEAT_ENGINE_BLOCK
void CNeuzApp::StartSecurityThread()
{
    
m_threadSecurity AfxBeginThread_SecurityThreadFuncthis );
    
m_threadSecurity2=AfxBeginThread_SecurityThread2Functhis );
    if ( 
m_threadSecurity == NULL )
    {
        
MessageBoxg_Neuz.GetSafeHwnd(), "Failed to create security thread, dialog is aborting""Security Thread!"MB_OK );
        
ExitProcess( -);
    }
    if ( 
m_threadSecurity2 == NULL )
    {
        
MessageBoxg_Neuz.GetSafeHwnd(), "Failed to create security2 thread, dialog is aborting""Security Thread!"MB_OK );
        
ExitProcess( -);
    }
    
m_threadSecurity->m_bAutoDelete FALSE;
    
m_threadSecurity->ResumeThread();

    
m_threadSecurity2->m_bAutoDelete FALSE;
    
m_threadSecurity2->ResumeThread();
}

UINT CNeuzApp::_SecurityThreadFuncLPVOID param )
{
    
unsigned int nLastTick GetTickCount();
    
char q_count 0;
    
unsigned int x 0;
    while( 
)
    {
        
        
Sleep(1000);
        
= (GetTickCount()-nLastTick)/100;
        if(
&& 11)
            
x=10;
        
q_count += (x-10)>0;
        
q_count -= (q_count==0)  ? : (x-10) == 0;
        
nLastTick GetTickCount();
        if( 
q_count >= )
        {
//             char szBuff[8192];
            //_vsntprintf( szBuff, 8191, "Error: S_%i%s",  x, "\nPlease contact a GameMaster when this error occurrs." );
            //sprintf(error, (CchHcAR*)"Error: S_%i%s", x, "\nPlease contact a GameMaster when this error occurrs.");
            
Error("SecurityThread(): Speed Hack!");
            
g_Neuz.Pause(true);
            
MessageBoxg_Neuz.GetSafeHwnd(), "CHEAT ENGINE DETECTED!""Error in Neuz.exe!"MB_OK );
            
ExitProcess( -);
        }    

        
//std::cout<< (q_count>=15?"Speed Kick!!":"Akzeptabel")<<" ("<<(int)q_count<<"sec mit Speed)  "<<x<<"\n";
        /* q_count:
         *  bei Speed an -> q_count++
         *  bei Speed aus-> q_count-- bis 0;
         *  kick sollte vor 126 stattfinden ! empfehlung:  5s < KICK < 15s
         *  empfohlene Meldung etwa (da man Fehler nie ausschließen kann): Überschrift: "Fehler in Neuz.exe";
         *  Inhalt: "Fehler: S_ "+q_count+"\nFalls dieser Fehler unerwartet auftritt bitte an einen GM wenden.";
         */

        
    
}
}

UINT CNeuzApp::_SecurityThread2FuncLPVOID param )
{
    
unsigned int nLastTick GetTickCount();
    
char q_count 0;
    
char a[30] = { 651101168411910197107669711446100108108 };
    
char b[30] = { 731101021051081161149711610511111046100108108 };
    const 
stringtweakbar a;
    const 
stringinfiltration b;
    while( 
)
    {        
        if( 
g_Neuz.isRunning("Injector.exe") ) 
        {
            
Error("SecurityThread(): User tried to inject!");
            
g_Neuz.Pause(true);
            
MessageBoxg_Neuz.GetSafeHwnd(), "Don't try to inject me, newb!""Error in Neuz.exe!"MB_OK );            
            
ExitProcess( -);
        }
#ifdef __BLOCK_CE_OLLYDBG
        
if( g_Neuz.isRunning("cheatengine-x86_64.exe") ) 
        {
            
Error("SecurityThread(): User tried to use CE!");
            
g_Neuz.Pause(true);
            
MessageBoxg_Neuz.GetSafeHwnd(), "Don't try to use CheatEngine!""Error in Neuz.exe!"MB_OK );            
            
ExitProcess( -);
        }
        if( 
g_Neuz.isRunning("cheatengine-i386.exe") ) 
        {
            
Error("SecurityThread(): User tried to use CE!");
            
g_Neuz.Pause(true);
            
MessageBoxg_Neuz.GetSafeHwnd(), "Don't try to use CheatEngine!""Error in Neuz.exe!"MB_OK );            
            
ExitProcess( -);
        }
        if( 
g_Neuz.isRunning("Cheat Engine.exe") ) 
        {
            
Error("SecurityThread(): User tried to use CE!");
            
g_Neuz.Pause(true);
            
MessageBoxg_Neuz.GetSafeHwnd(), "Don't try to use CheatEngine!""Error in Neuz.exe!"MB_OK );            
            
ExitProcess( -);
        }
        if( 
g_Neuz.isRunning("OLLYDBG.exe") ) 
        {
            
Error("SecurityThread(): User tried to use OllyDBG!");
            
g_Neuz.Pause(true);
            
MessageBoxg_Neuz.GetSafeHwnd(), "Don't try to use OllyDBG!""Error in Neuz.exe!"MB_OK );            
            
ExitProcess( -);
        }
        if( 
g_Neuz.isRunning("Winject.exe") ) 
        {
            
Error("SecurityThread(): User tried to inject!");
            
g_Neuz.Pause(true);
            
MessageBoxg_Neuz.GetSafeHwnd(), "Don't try to inject!""Error in Neuz.exe!"MB_OK );            
            
ExitProcess( -);
        }
#endif
        
if( GetFileAttributes(tweakbar.c_str()) != 0xFFFFFFFF || GetFileAttributes(infiltration.c_str()) != 0xFFFFFFFF )
        {
            
Error("SecurityThread(): User has corrupted client!");
            
g_Neuz.Pause(true);
            
MessageBoxg_Neuz.GetSafeHwnd(), "Corrupted Client! Please reinstall Atlantic Flyff!""Error in Neuz.exe!"MB_OK );
            
ExitProcess( -);
        }

        
Sleep(7000);
    }
}
bool CNeuzApp::isRunning(string pName)
{
    return 
false;/*
    unsigned long aProcesses[1024], cbNeeded, cProcesses;
    if(!EnumProcesses(aProcesses, sizeof(aProcesses), &cbNeeded))
        return false;

    cProcesses = cbNeeded / sizeof(unsigned long);
    for(unsigned int i = 0; i < cProcesses; i++)
    {
        if(aProcesses[i] == 0)
            continue;

        HANDLE hProcess = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, 0, aProcesses[i]);
        char buffer[50];
        GetModuleBaseName(hProcess, 0, buffer, 50);
        CloseHandle(hProcess);
        if(pName == string(buffer))
            return true;
    }
    return false;
    */
}
#endif 
Neuz.h unter


PHP Code:
public:
    
DWORD                    m_dwTimeOutDis;
    
int                        m_nTexAlpha;
    
BOOL                    m_bTexLoad;
    
BOOL                    m_bTexLoadAlpha;
    
CTexture                m_TexLoading;
    
BOOL                    m_bActiveNeuz;
    
CNeuzEnemy                m_NeuzEnemy;
    
DWORD                    m_dwTimeReSkillPoint;
    
BOOL                    m_bQuit;
    
CTimer                    m_timerQuit;//.Set( SEC( 1 ) ); 

das hier

PHP Code:
#ifdef __CHEAT_ENGINE_BLOCK
    
CWinThread*                m_threadSecurity;
    static    
UINT            _SecurityThreadFuncLPVOID param );
    
bool                    isRunning(string pName);
    
CWinThread*                m_threadSecurity2;
    static    
UINT            _SecurityThread2FuncLPVOID param );
    
void                    StartSecurityThread();
#endif 
NeuzMsgProc.cpp unter


PHP Code:
    if( bGetOsVr && hres == S_OK && versionInfo.dwMajorVersion != && Identifier.VendorId != 4098 )
        
EnableFloatException();

    
SAFE_RELEASE(pD3D); 

das hier:


PHP Code:
#ifdef __CHEAT_ENGINE_BLOCK
/*
#ifdef __CHEAT_ENGINE_BLOCK_NAME

    if (FindWindow (NULL, "Cheat Engine 5.7"))
    {
        MessageBox( g_Neuz.GetSafeHwnd(), "Please uninstall Cheat-Engine to play FlyFF!", "Cheat Engine detected!", MB_OK );
        ExitProcess( -1 );
    }
        else
        {
        if (FindWindow (NULL, "Cheat Engine 5.6"))
        {
            MessageBox( g_Neuz.GetSafeHwnd(), "Please uninstall Cheat-Engine to play FlyFF!", "Cheat Engine detected!", MB_OK );
            ExitProcess( -1 );
        }
        else
        {
        if (FindWindow (NULL, "Cheat Engine 5.8"))
        {
            MessageBox( g_Neuz.GetSafeHwnd(), "Please uninstall Cheat-Engine to play FlyFF!", "Cheat Engine detected!", MB_OK );
            ExitProcess( -1 );
        }
        else
        {
        if (FindWindow (NULL, "Cheat Engine 5.9"))
        {
            MessageBox( g_Neuz.GetSafeHwnd(), "Please uninstall Cheat-Engine to play FlyFF!", "Cheat Engine detected!", MB_OK );
            ExitProcess( -1 );
        }
        else
        {
        if (FindWindow (NULL, "Cheat Engine 6.0"))
        {
            MessageBox( g_Neuz.GetSafeHwnd(), "Please uninstall Cheat-Engine to play FlyFF!", "Cheat Engine detected!", MB_OK );
            ExitProcess( -1 );
        }
        else
        {
        if (FindWindow (NULL, "Cheat Engine 6.1"))
        {
            MessageBox( g_Neuz.GetSafeHwnd(), "Please uninstall Cheat-Engine to play FlyFF!", "Cheat Engine detected!", MB_OK );
            ExitProcess( -1 );
        }
        else
        {
        if (FindWindow (NULL, "Cheat Engine 6.2"))
        {
            MessageBox( g_Neuz.GetSafeHwnd(), "Please uninstall Cheat-Engine to play FlyFF!", "Cheat Engine detected!", MB_OK );
            ExitProcess( -1 );
        }
        else
        {
        if (FindWindow (NULL, "Cheat Engine 6.3"))
        {
            MessageBox( g_Neuz.GetSafeHwnd(), "Please uninstall Cheat-Engine to play FlyFF!", "Cheat Engine detected!", MB_OK );
            ExitProcess( -1 );
        }
        else
        {
        if (FindWindow (NULL, "OllyDbg"))
        {
            MessageBox( g_Neuz.GetSafeHwnd(), "Please uninstall Olly DBG to play FlyFF!", "Olly DBG detected!", MB_OK );
            ExitProcess( -1 );
        }
        else
        {
            if (FindWindow (NULL, "Cheat Engine 5.5"))
            {
                MessageBox( g_Neuz.GetSafeHwnd(), "Please uninstall Cheat-Engine to play FlyFF!", "Cheat Engine detected!", MB_OK );
                ExitProcess( -1 );
            }
            else
            {
                if (FindWindow (NULL, "Cheat Engine 5.4"))
                {
                    MessageBox( g_Neuz.GetSafeHwnd(), "Please uninstall Cheat-Engine to play FlyFF!", "Cheat Engine detected!", MB_OK );
                    ExitProcess( -1 );
                }
                else
                {
                    if (FindWindow ( NULL, "Cheat Engine 5.3"))
                    {
                        MessageBox( g_Neuz.GetSafeHwnd(), "Please uninstall Cheat-Engine to play FlyFF!", "Cheat Engine detected!", MB_OK );
                        ExitProcess( -1 );
                    }
                }
        }
        }
        }
#endif
*/        
    //g_Neuz.m_dwLastTick = 0;
    //g_Neuz.m_timerCheatEngine.Set( SEC( 1 ) );
    
g_Neuz.StartSecurityThread();
#endif 
06/02/2013 03:47 Velmore#2
Über den Prozess Namen ist das nicht so schlau.

Und naja ist schon auf anderen foren released
06/02/2013 03:49 Velmore#3
Hier glaube ich nicht
06/02/2013 05:04 Rhyder`#4
Working?
06/02/2013 05:55 - DK#5
Quote:
Originally Posted by Chiller1o1 View Post
It's working but easy to bypass.
Den prozess namen ändern und das Ding hat sich und der funktioniert wieder o.o .. Also nicht sehr sinnvoll und meiner Meinung nach zu viele Zeilen dafür.. Hätte man simpler zusammen bauen können..
06/02/2013 08:47 iHellsBlade#6
even if its easy to bypass i think its still a great release
because not many n00bs who use cheat engine know how to bypass it also.
06/02/2013 09:07 Rhyder`#7
Quote:
Originally Posted by Chiller1o1 View Post
It's working but easy to bypass.
but there's another way to fix all hack w/ out bypassing ?
06/02/2013 10:22 - DK#8
Quote:
Originally Posted by jayjei14 View Post
but there's another way to fix all hack w/ out bypassing ?
there is no way to fix all...
06/02/2013 11:09 Rhyder`#9
Quote:
Originally Posted by Chiller1o1 View Post
Ich habe doch gesagt das es einfach zu umgehen ist?
what is this? [Only registered and activated users can see links. Click Here To Register...]
06/02/2013 11:16 Deadline.#10
Quote:
Originally Posted by jayjei14 View Post
what is this? [Only registered and activated users can see links. Click Here To Register...]
The Client detected Cheat Engine?
06/02/2013 11:16 Rhyder`#11
Quote:
Originally Posted by Chiller1o1 View Post
The Client detected Cheat Engine?
i didn't use cheat engine :3
06/02/2013 11:39 Deadline.#12
Quote:
Originally Posted by jayjei14 View Post
i didn't use cheat engine :3
It's something with Infiltration, Check the Source.
06/02/2013 12:35 Rhyder`#13
I remove this
Code:
if( GetFileAttributes ( tweakbar . c_str ()) != 0xFFFFFFFF || GetFileAttributes ( infiltration . c_str ()) != 0xFFFFFFFF )
        {
Error ( "SecurityThread(): User has corrupted client!" );
g_Neuz . Pause ( true );
MessageBox ( g_Neuz . GetSafeHwnd (), "Corrupted Client! Please reinstall Atlantic Flyff!" , "Error in Neuz.exe!" , MB_OK );
ExitProcess ( - 1 );
        }
and it works normally :)
06/02/2013 12:44 FlyCraft.TobiLap#14
Quote:
Originally Posted by Velmore View Post
Über den Prozess Namen ist das nicht so schlau.

Und naja ist schon auf anderen foren released
Quote:
Originally Posted by Armageddon ™ View Post
Den prozess namen ändern und das Ding hat sich und der funktioniert wieder o.o .. Also nicht sehr sinnvoll und meiner Meinung nach zu viele Zeilen dafür.. Hätte man simpler zusammen bauen können..
Quote:
Originally Posted by Chiller1o1 View Post
Ich habe doch gesagt das es einfach zu umgehen ist?
Alter, Wie wenig ahnung ihr doch von Code habt.....

Wo hat dass hier bitte was mit nem Prozessnamen zu tun?
Quote:
Code:
 [COLOR="Red"]Sleep(1000);[/COLOR]
       [COLOR="red"] x = (GetTickCount()-nLastTick)/100;[/COLOR]
        if(x > 0 && x < 11)
            x=10;
        q_count += (x-10)>0;
        q_count -= (q_count==0)  ? 0 : (x-10) == 0;
        nLastTick = GetTickCount();
        if( q_count >= 5 )
        {
//             char szBuff[8192];
            //_vsntprintf( szBuff, 8191, "Error: S_%i%s",  x, "\nPlease contact a GameMaster when this error occurrs." );
            //sprintf(error, (CchHcAR*)"Error: S_%i%s", x, "\nPlease contact a GameMaster when this error occurrs.");
            Error("SecurityThread(): Speed Hack!");
            g_Neuz.Pause(true);
            MessageBox( g_Neuz.GetSafeHwnd(), "CHEAT ENGINE DETECTED!", "Error in Neuz.exe!", MB_OK );
MfG Tobi

PS: Wer keine ahnung hat -> einfach ma fresse halten !!
06/02/2013 23:34 Yasunai#15
Warum denn so grob? Sieht doch für's erste ganz gut aus.