Here's some candy. I'll release more later if I can find the source codes and if I'm not banned. SC2 is boring and it's pointless to hold "easy" things back. WHO WANTS SOME EXPLOITS? :D Anyway, START LEECHING!
This feature logs all warden scans. I never completed it but it should work. Just needs a couple more improvements. If I was to release a public scan logger, It'd be much sexier than this.
Hotkey function & maphack. Checks to make sure you're in a game and it checks to see if the key in the configuration file is pressed. Maphack in this code is achieved by the galaxy function. Originally, I've known about this before Beaving posted it publicly but to save arguging. Credits to Beaving.
This feature logs all warden scans. I never completed it but it should work. Just needs a couple more improvements. If I was to release a public scan logger, It'd be much sexier than this.
Code:
__declspec( naked ) void Warden::Scan_Detour( void )
{
__asm
{
pushad
PUSH EDX
PUSH ESI
call Log_Scans
popad
mov edi, eax
shr ecx, 2
jmp wardenScanBack
}
}
void Warden::Log_Scans( DWORD dwOffset, DWORD dwLen )
{
if( dwOffset >= Warden::s_lpcWarden->m_dwKernelBase && dwOffset <= Warden::s_lpcWarden->m_dwKernelBase + Warden::s_lpcWarden->m_dwKernelSize )
{
DWORD RVA = dwOffset - Warden::s_lpcWarden->m_dwKernelBase;
DWORD dwWinAPI = *( DWORD* )dwOffset;
sprintf_s( szValue, " 0x0%X & Length= %X", RVA, dwLen, dwWinAPI );
sprintf_s( szValue2, "WinAPI Offset%d", newLine );
WritePrivateProfileString( "WinAPI Detour Scans", szValue2, szValue, ( LPCSTR )&ownPth );
}
else
{
newOffset++;
sprintf_s( szValue3, "Offset%d", newOffset );
DWORD RVA = dwOffset - Warden::s_lpcWarden->m_dwSC2Base + 0x1000;
sprintf_s( szValue, " 0x0%X & Length= %X", RVA, dwLen );
for ( int i=0; i<60; i++ )
{
sprintf_s( szValue2, "Offset%d", i );
iResult = GetPrivateProfileInt( "SC2 Offset Scans", szValue2, 0x00, ( LPCSTR )&ownPth );
if ( iResult == RVA )
{
sprintf_s( szValue3, "", 0 );
WritePrivateProfileString( "SC2 Offset Scans", szValue3, szValue, ( LPCSTR )&ownPth );
break;
}
else if ( iResult != RVA && i<=60 )
{
WritePrivateProfileString( "SC2 Offset Scans", szValue3, szValue, ( LPCSTR )&ownPth );
break;
}
}
}
newLine++;
}
Code:
void Game::RevealMap( DWORD inState )
{
typedef void ( __fastcall* Vision_Enable_t) ( DWORD dwAddFog );
static Vision_Enable_t Vision_Enable = (Vision_Enable_t)dwVisEnable;
if ( inState == 1 )
{
Vision_Enable( false );
}
else if ( inState == 0 )
{
Vision_Enable( true );
}
}
void Game::KeyPressed( )
{
if ( Structs::Player::player->LocalId( ) != 0x10 )
{
if ( GetAsyncKeyState( Hack::config->GetMaphackKey( ) ) != 0x00 )
{
tMaphack++;
if ( tMaphack == 1 )
{
vision->RevealMap( 1 ); // Full maphack
}
else
{
vision->RevealMap( 0 ); // Off
tMaphack = 0;
}
}
}
}