当前位置: 首页> 健康> 美食 > Lua - 魔兽世界SRP6网站源码(FastWeb)

Lua - 魔兽世界SRP6网站源码(FastWeb)

时间:2025/7/8 13:42:19来源:https://blog.csdn.net/qq_20198003/article/details/139608071 浏览次数:0次

⚠声明: 本文仅用于学习研究,针对开源服务程序做演示示例,与某游戏无直接关联。

这个示例支持AZTCMangod的SRP6加密,除SRP6也支持大部分使用的HASH算法。

功能仅做了注册和解卡。

  • 修改密码、忘记密码、排行等功能可自行修改lua代码进行拓展
  • 压缩包的SRP6模块请放置于 fastweb/module 目录

部分代码:

 local conn = auth:get()local exec_count = 0-- 是否为SPR6if config.ENGINE_SPR6 thenlocal spr6 = spr6.make(config.ENGINE_MANGOD,username,password)local sql = ""-- 是否为mangodif config.ENGINE_MANGOD thenlocal ppst = conn:setsql("INSERT INTO account(username,s,v,joindate)VALUES(?,?,?,NOW())")ppst:set_str(1,username)ppst:set_str(2,string.char(table.unpack(spr6.salt)))ppst:set_str(3,string.char(table.unpack(spr6.verifier)))exec_count = ppst:update()elselocal ppst = conn:setsql("INSERT INTO account(username,salt,verifier,joindate)VALUES(?,?,?,NOW())")ppst:set_str(1,username)ppst:set_str(2,string.char(table.unpack(spr6.salt)))ppst:set_str(3,string.char(table.unpack(spr6.verifier)))exec_count = ppst:update()endelselocal ppst = conn:setsql("INSERT INTO account (username, sha_pass_hash) VALUES (?,SHA1(CONCAT(UPPER(?),':',UPPER(?))))")ppst:set_str(1,username)ppst:set_str(2,username)ppst:set_str(3,password)exec_count = ppst:update()end

点击下载

关键字:Lua - 魔兽世界SRP6网站源码(FastWeb)

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: