/////////////////////////////////////////////////////////////////////
| 160 | |
| 161 | ////////////////////////////////////////////////////////////////////////// |
| 162 | bool CDefenceWall::ServerCreateModuleProbe( const char *sFilename,SClientCheckContext &ctx ) |
| 163 | { |
| 164 | char sModule[_MAX_PATH]; |
| 165 | char fname[_MAX_FNAME]; |
| 166 | char ext[_MAX_EXT]; |
| 167 | _splitpath( sFilename,0,0,fname,ext ); |
| 168 | _makepath( sModule,0,0,fname,ext ); |
| 169 | strlwr( sModule ); |
| 170 | |
| 171 | // Skip comparing render dll code. (Can be OGL,D3D or NULL) |
| 172 | if (strstr(sModule,"render")) |
| 173 | return false; |
| 174 | |
| 175 | AddProtectedFile( (string("b")+"i"+"n"+"3"+"2"+"/"+sFilename).c_str() ); |
| 176 | |
| 177 | if (m_pNetwork->GetCheatProtectionLevel() >= CHEAT_LEVEL_CODE) |
| 178 | { |
| 179 | ctx.nRequestCode = DEFWALL_CHECK_DLL_CODE; |
| 180 | ctx.bExecutableCode = true; |
| 181 | ctx.probe.sFilename = sModule; |
| 182 | #if !defined(LINUX) |
| 183 | ctx.nFilenameHash = m_pSystem->GetIDataProbe()->GetHash( sModule ); |
| 184 | ctx.probe.nCodeInfo = rand()%3; |
| 185 | if (!m_pSystem->GetIDataProbe()->GetRandomModuleProbe( ctx.probe )) |
| 186 | return false; |
| 187 | if (!m_pSystem->GetIDataProbe()->GetCode( ctx.probe )) |
| 188 | return false; |
| 189 | #endif |
| 190 | #ifdef LOGEVENTS |
| 191 | if (m_bLog) CryLog( "<DefenceWall> CreatedExeProbe[%d] %s %I64x",ctx.nRequestId,ctx.probe.sFilename.c_str(),ctx.probe.nCode ); |
| 192 | #endif |
| 193 | } |
| 194 | else |
| 195 | { |
| 196 | return false; |
| 197 | } |
| 198 | |
| 199 | |
| 200 | return true; |
| 201 | } |
| 202 | |
| 203 | ////////////////////////////////////////////////////////////////////////// |
| 204 | bool CDefenceWall::ServerCreateFileProbe( const char *sFilename,SClientCheckContext &ctx,bool bRandomPart ) |
nothing calls this directly
no test coverage detected