Исходник Cheat Revealer for supremacy

Начинающий
Статус
Оффлайн
Регистрация
12 Янв 2019
Сообщения
2
Реакции[?]
0
Поинты[?]
0
hi a unique 'feature' from vader.tech has been ported for supremacy by romania technology(real)
main hook code:
hooks.cpp:
// definitions, you can put this in hooks.h lol
struct Voice_Vader
{
    char cheat_name[13];
};

struct CSVCMsg_VoiceData_Legacy
{
    char pad_0000[8]; //0x0000
    int32_t client; //0x0008
    int32_t audible_mask; //0x000C
    uint32_t xuid_low{};
    uint32_t xuid_high{};
    void* voide_data_; //0x0018
    int32_t proximity; //0x001C
    //int32_t caster; //0x0020
    int32_t format; //0x0020
    int32_t sequence_bytes; //0x0024
    uint32_t section_number; //0x0028
    uint32_t uncompressed_sample_offset; //0x002C

    __forceinline VoiceDataCustom get_data()
    {
        VoiceDataCustom cdata;
        cdata.xuid_low = xuid_low;
        cdata.xuid_high = xuid_high;
        cdata.sequence_bytes = sequence_bytes;
        cdata.section_number = section_number;
        cdata.uncompressed_sample_offset = uncompressed_sample_offset;
        return cdata;
    }
};

struct VoiceDataCustom
{
    uint32_t xuid_low{};
    uint32_t xuid_high{};
    int32_t sequence_bytes{};
    uint32_t section_number{};
    uint32_t uncompressed_sample_offset{};

    __forceinline uint8_t* get_raw_data()
    {
        return (uint8_t*)this;
    }
};

void __fastcall Hooks::VoiceData( void* msg ) {
    if( !msg ) {
        g_hooks.m_client_state.GetOldMethod< VoiceData_t >( CClientState::VOICEDATA )( this, msg );
        return;
    }

    CSVCMsg_VoiceData_Legacy* m = ( CSVCMsg_VoiceData_Legacy* )msg;
    int sender_index = m->client + 1;
    VoiceDataCustom data = m->get_data( );

    if( !g_cl.m_local ) {
        g_hooks.m_client_state.GetOldMethod< VoiceData_t >( CClientState::VOICEDATA )( this, msg );
        return;
    }

    if( g_cl.m_local->index( ) == sender_index ) {
        g_hooks.m_client_state.GetOldMethod< VoiceData_t >( CClientState::VOICEDATA )( this, msg );
        return;
    }

    if( m->format != 0 ) {
        g_hooks.m_client_state.GetOldMethod< VoiceData_t >( CClientState::VOICEDATA )( this, msg );
        return;
    }

    // check if its empty
    if( data.section_number == 0 && data.sequence_bytes == 0 && data.uncompressed_sample_offset == 0 ) {
        g_hooks.m_client_state.GetOldMethod< VoiceData_t >( CClientState::VOICEDATA )( this, msg );
        return;
    }

    Voice_Vader* packet = ( Voice_Vader* )data.get_raw_data( );
    player_info_t player_info;

    if( g_csgo.m_engine->GetPlayerInfo( sender_index, &player_info ) ) {
        if( !strcmp( packet->cheat_name, XorStr( "vader.techballs" ) ) ) { // vader user
            g_cl.vader_user.push_back( player_info.m_user_id );
        }

        if( !strcmp( packet->cheat_name, XorStr( "vader.techbetaballs" ) ) ) { // vader beta
            g_cl.vader_beta.push_back( player_info.m_user_id );
        }

        if( !strcmp( packet->cheat_name, XorStr( "vader.techdevballs" ) ) ) { // vader dev
            g_cl.vader_dev.push_back( player_info.m_user_id );
        }

        if( !strcmp( packet->cheat_name, XorStr( "vader.tech" ) ) || !strcmp( packet->cheat_name, XorStr( "vader.tech2" ) ) ) { // vader crack
            g_cl.vader_crack.push_back( player_info.m_user_id );
        }

        AimPlayer* data = &g_aimbot.m_players[ sender_index - 1 ];

        if( m->xuid_low == 43955 || m->xuid_low == 43969 || m->xuid_low == 43803 || m->sequence_bytes == -858993664 ) { // kaaba by vmexit
            g_cl.kaaba_crack_vmexit.push_back( player_info.m_user_id );
            data->m_networked_angle = m->section_number; // little hint besides networking kaaba/cheese beta crack
        }

        if( m->sequence_bytes == 321420420 ) { // cheese beta crack
            g_cl.kaaba_crack_vmexit_sv.push_back( player_info.m_user_id );
            data->m_networked_angle = m->section_number;
        }

        if( m->sequence_bytes == 421420420 ) { // cheese leak
            g_cl.cheese_leak_lol.push_back( player_info.m_user_id );
        }

        if( m->sequence_bytes == 420420420 ) { // cheese
            g_cl.cheese_smth_idfk.push_back( player_info.m_user_id );
        }

        if( m->sequence_bytes == -918206803 ) // dopium hi
        {
            g_cl.dopium_lell.push_back( player_info.m_user_id );
        }
   
        // xuid low/high, sequence_bytes etc. dumper
        if( g_menu.main.misc.notifications.get( 8 ) ) {
            g_cl.print( "from: [%s] | low: [%i] | high: [%i] | sequence_bytes: [%i] | mask [%i] | sample_offs [%i] | section number [%i] \n", player_info.m_name, m->xuid_low, m->xuid_high, m->sequence_bytes, m->audible_mask, m->uncompressed_sample_offset, m->section_number );
        }
    }

    g_hooks.m_client_state.GetOldMethod< VoiceData_t >( CClientState::VOICEDATA )( this, msg );
}
definition at hooks class prototypes aka voicedata_t

Код:
    using VoiceData_t = void( __thiscall* )( void*, void* );
// next definition is global definition of the function
// put this at down of the all funcs, this time not in the prototypes and not in the vmt, right the one above vmt definitions
void __fastcall             VoiceData( void* msg );

^ to mention voicedata's index is 24 so you can just replace CClientState::VOICEDATA by 24 if you have any errors, i personally made it so it looks nice.

now we are going to hook this function, let's head to m_client_state.init( g_csgo.m_hookable_cl )
at 1 line down, we should put this code=>

m_client_state.add( CClientState::VOICEDATA, util::force_cast( &Hooks::VoiceData ) );

and let's go! you did it

flags code(hella ugly but whatever, it works):
visuals.cpp:
if( !g_cl.vader_user.empty( ) ) {
                    if( std::find( g_cl.vader_user.begin( ), g_cl.vader_user.end( ), info.m_user_id ) != g_cl.vader_user.end( ) ) {

                        flags.push_back( { "VADER", dormant ? Color( 220, 220, 220, low_alpha ) : Color( 255, 0, 0, low_alpha ) } );
                    }
                }

                if( !g_cl.vader_beta.empty( ) ) {
                    if( std::find( g_cl.vader_beta.begin( ), g_cl.vader_beta.end( ), info.m_user_id ) != g_cl.vader_beta.end( ) ) {

                        flags.push_back( { "VADER BETA", dormant ? Color( 220, 220, 220, low_alpha ) : Color( 255, 0, 0, low_alpha ) } );
                    }
                }

                if( !g_cl.vader_dev.empty( ) ) {
                    if( std::find( g_cl.vader_dev.begin( ), g_cl.vader_dev.end( ), info.m_user_id ) != g_cl.vader_dev.end( ) ) {

                        flags.push_back( { "VADER DEV", dormant ? Color( 220, 220, 220, low_alpha ) : Color( 255, 0, 0, low_alpha ) } );
                    }
                }

                if( !g_cl.vader_crack.empty( ) ) {
                    if( std::find( g_cl.vader_crack.begin( ), g_cl.vader_crack.end( ), info.m_user_id ) != g_cl.vader_crack.end( ) ) {

                        flags.push_back( { "VADER CRACK", dormant ? Color( 220, 220, 220, low_alpha ) : Color( 255, 0, 0, low_alpha ) } );
                    }
                }

                if( !g_cl.kaaba_crack_vmexit.empty( ) ) {
                    if( std::find( g_cl.kaaba_crack_vmexit.begin( ), g_cl.kaaba_crack_vmexit.end( ), info.m_user_id ) != g_cl.kaaba_crack_vmexit.end( ) ) {

                        flags.push_back( { "KAABA", dormant ? Color( 220, 220, 220, low_alpha ) : Color( 255, 0, 0, low_alpha ) } );
                    }
                }

                // i were too lazy to change the variable name lel
                if( !g_cl.kaaba_crack_vmexit_sv.empty( ) ) {
                    if( std::find( g_cl.kaaba_crack_vmexit_sv.begin( ), g_cl.kaaba_crack_vmexit_sv.end( ), info.m_user_id ) != g_cl.kaaba_crack_vmexit_sv.end( ) ) {

                        flags.push_back( { "CHEESE", dormant ? Color( 220, 220, 220, low_alpha ) : Color( 255, 0, 0, low_alpha ) } );
                    }
                }
             
                if( !g_cl.cheese_leak_lol.empty( ) ) {
                    if( std::find( g_cl.cheese_leak_lol.begin( ), g_cl.cheese_leak_lol.end( ), info.m_user_id ) != g_cl.cheese_leak_lol.end( ) ) {

                        flags.push_back( { "CHEESE[LEAK]", dormant ? Color( 220, 220, 220, low_alpha ) : Color( 255, 0, 0, low_alpha ) } );
                    }
                }

                if( !g_cl.cheese_smth_idfk.empty( ) ) {
                    if( std::find( g_cl.cheese_smth_idfk.begin( ), g_cl.cheese_smth_idfk.end( ), info.m_user_id ) != g_cl.cheese_smth_idfk.end( ) ) {

                        flags.push_back( { "CHEESE", dormant ? Color( 220, 220, 220, low_alpha ) : Color( 255, 255, 255, low_alpha ) } );
                    }
                }

                if( !g_cl.dopium_lell.empty( ) ) {
                    if( std::find( g_cl.dopium_lell.begin( ), g_cl.dopium_lell.end( ), info.m_user_id ) != g_cl.dopium_lell.end( ) ) {

                        flags.push_back( { "DOPIUM", dormant ? Color( 220, 220, 220, low_alpha ) : Color( 255, 0, 0, low_alpha ) } );
                    }
                }
client.h:
std::vector<int> vader_user;
    std::vector<int> vader_beta;
    std::vector<int> vader_dev;
    std::vector<int> vader_crack;
    std::vector<int> kaaba_crack_vmexit_sv;
    std::vector<int> kaaba_crack_vmexit;
    std::vector<int> cheese_leak_lol;
    std::vector<int> cheese_smth_idfk;
    std::vector<int> dopium_lell;
 
Последнее редактирование:
Сверху Снизу