斗鱼TV协议分享

来源:互联网 发布:javascript 全选 编辑:程序博客网 时间:2024/04/29 06:06

注:本博文只是作为研究学习用途,请不要用于非法、商业用途。


首先TCP Socket连接上斗鱼服务器 182.18.47.10 port:8009

发送登录封包:

C#代码:

        public static byte[] loginReq(string username,string password,string roomid,string uuid)        {            long time=Scholar.Framework.Utils.Util.UNIX_TIMESTAMP();            string salt="7oE9nPEG9xXV69phU31FYCLUagKeYtsF";            string vk=Scholar.Framework.Utils.Util.Md5(string.Format("{0}{1}{2}",time,salt,uuid));            string p = string.Format("type@=loginreq/username@={0}/password@={1}/roomid@={2}/ct@=2/devid@={3}/ver@={4}/rt@={5}/vk@={6}/",                username, password, roomid, uuid, 20150515,time,vk);            byte[] bin = Encoding.UTF8.GetBytes(p);            ByteBuffer buf = new ByteBuffer();            buf.Put("dc000000 dc000000 b1020000 ");            buf.Put(bin);            buf.Put(0);            return buf.ToByteArray();        }

发送给服务器便登录成功了。
如果要以游客身份登录,账号密码留空就可以了。

1 1
原创粉丝点击