|
发表于 2006-12-1 11:40:52
|
显示全部楼层
来自 中国–北京–北京–海淀区
回复: 防止CS1.5OP密码被盗
^_^,有点意思,真正的防盗要这样。
#include <amxmodx>
#include <amxmisc>
#define PASSWORDLEN 32
static g_password[PASSWORDLEN+1]
public plugin_init()
{
register_plugin("Rcon Password","1.0","Jim")
password_generator(PASSWORDLEN)
server_cmd("rcon_password %s", g_password)
}
password_generator(bit)
{
new i = 0
while(i<bit)
{
switch(random(3))
{
case 0: g_password = 48 + random(10)
case 1: g_password = 65 + random(26)
case 2: g_password = 97 + random(26)
}
i++
}
g_password = 0
} |
|