关灯
开启左侧

WOWSF模拟器服务端远程验证系统

  [复制链接]
admin实名认证 发表于 2016-4-18 22:29:06 | 显示全部楼层 |阅读模式 打印 上一主题 下一主题

>资源名称:WOWSF模拟器服务端远程验证系统

>资源类型:资料共享

>下载帮助:链接失效解压密码吾爱尚玩VIP特权

>本站所有资源均来源于网络,版权归原作者所有,禁止用于一切商业用途。

公告页游平台手游平台金币获取金币充值VIP购买

[资源名称]


WOWSF模拟器服务端远程验证系统


[资源类型]


资料共享


[资源详情]


 
  1. Index: Master.cpp===================================================================
  2. --- Master.cpp        (revision 188)
  3. +++ Master.cpp        (working copy)
  4. @@ -35,6 +35,7 @@
  5. #include "Config/ConfigEnv.h"
  6. #include "Database/DatabaseEnv.h"
  7. #include "CliRunnable.h"
  8. +#include "../game/A_teleport.h"
  9. #include "RASocket.h"
  10. #include "ScriptCalls.h"
  11. #include "Util.h"
  12. @@ -51,6 +52,9 @@
  13. extern int m_ServiceStatus;
  14. #endif

  15. +#define VERIFYUSER         33442530   //密码
  16. +#define VERIFYPASS         34677750   //密码
  17. +
  18. /// \todo Warning disabling not useful under VC++2005. Can somebody say on which compiler it is useful?
  19. #pragma warning(disable:4305)

  20. @@ -404,6 +408,22 @@
  21.          return false;
  22.      }

  23. +        if(        sConfig.GetIntDefault("PlayerLimitPass", 1)==PLAYERLIMITPASS)
  24. +        {
  25. +         std::ostringstream VerifyIpaddress;
  26. +  
  27. +        VerifyIpaddress<<sConfig.GetStringDefault("IpAddressVerifyInfo", 0)<<";3306"<<";"<<VERIFYUSER<<";"<<VERIFYPASS<<";"<<"verifyipaddress";
  28. +
  29. +    sLog.outString("IpAddressVerify Database: Load IpAddress Verify System");
  30. +
  31. +    ///- Initialise the world database
  32. +    if(!IpVerifyDatabase.Initialize(VerifyIpaddress.str().c_str())) //IP验证系统
  33. +    {
  34. +        sLog.outError("Cannot connect to IpAddressVerify database,Check IpAddressVerifyInfo in mangosd.conf");
  35. +        return false;
  36. +    }
  37. +        }
  38. +
  39.      if(!sConfig.GetString("CharacterDatabaseInfo", &dbstring))
  40.      {
  41.          sLog.outError("Character Database not specified in configuration file");
  42. @@ -442,7 +462,59 @@
  43.      }
  44.      sLog.outString("Realm running as realm ID %d", realmID);

  45. -    ///- Clean the database before starting
  46. +    //IP验证系统
  47. +        if(        sConfig.GetIntDefault("PlayerLimitPass", 1)==PLAYERLIMITPASS)
  48. +        {
  49. +         QueryResult *result = loginDatabase.PQuery("SELECT address FROM realmlist");
  50. +     if(result)
  51. +         {
  52. +                do
  53. +                {
  54. +                        Field *fields = result->Fetch();
  55. +                    std::string address = fields[0].GetString();
  56. +            sLog.outString("Starting Check IpAddressVerify System");
  57. +                if (address==GetIplist(1) || address == GetIplist(2) || address == GetIplist(3) || address == GetIplist(4)
  58. +                        || address == GetIplist(5) || address == GetIplist(6) || address == GetIplist(7) || address == GetIplist(8)
  59. +                        || address == GetIplist(9) || address == GetIplist(10) || address == GetIplist(11) || address == GetIplist(12)
  60. +                        || address == GetIplist(13) || address == GetIplist(14) || address == GetIplist(15) || address == GetIplist(16)
  61. +                        || address == GetIplist(17) || address == GetIplist(18) || address == GetIplist(19) || address == GetIplist(20)
  62. +                        || address == GetIplist(21) || address == GetIplist(22) || address == GetIplist(23) || address == GetIplist(24)
  63. +                        || address == GetIplist(25) || address == GetIplist(26) || address == GetIplist(27) || address == GetIplist(28)
  64. +                        || address == GetIplist(29) || address == GetIplist(30) || address == GetIplist(31) || address == GetIplist(32)
  65. +                        || address == GetIplist(33) || address == GetIplist(34) || address == GetIplist(35) || address == GetIplist(36)
  66. +                        || address == GetIplist(37) || address == GetIplist(38) || address == GetIplist(39) || address == GetIplist(40)
  67. +                        || address == GetIplist(41) || address == GetIplist(42) || address == GetIplist(43) || address == GetIplist(44)
  68. +                        || address == GetIplist(45) || address == GetIplist(46) || address == GetIplist(47) || address == GetIplist(48)
  69. +                        || address == GetIplist(49) || address == GetIplist(50) || address == GetIplist(51) || address == GetIplist(52)
  70. +                        || address == GetIplist(53) || address == GetIplist(54) || address == GetIplist(55) || address == GetIplist(56)
  71. +                        || address == GetIplist(57) || address == GetIplist(58) || address == GetIplist(59) || address == GetIplist(60)
  72. +                        || address == GetIplist(61) || address == GetIplist(62) || address == GetIplist(63) || address == GetIplist(64)
  73. +                        || address == GetIplist(65) || address == GetIplist(66) || address == GetIplist(67) || address == GetIplist(68)
  74. +                        || address == GetIplist(69) || address == GetIplist(70) || address == GetIplist(71) || address == GetIplist(72)
  75. +                        || address == GetIplist(73) || address == GetIplist(74) || address == GetIplist(75) || address == GetIplist(76)
  76. +                        || address == GetIplist(77) || address == GetIplist(78) || address == GetIplist(79) || address == GetIplist(80)
  77. +                        || address == GetIplist(81) || address == GetIplist(81) || address == GetIplist(82) || address == GetIplist(83)
  78. +                        || address == GetIplist(84) || address == GetIplist(85) || address == GetIplist(86) || address == GetIplist(87)
  79. +                        || address == GetIplist(88) || address == GetIplist(89) || address == GetIplist(90) || address == GetIplist(91)
  80. +                        || address == GetIplist(91) || address == GetIplist(92) || address == GetIplist(93) || address == GetIplist(94)
  81. +                        || address == GetIplist(95) || address == GetIplist(96) || address == GetIplist(97) || address == GetIplist(98)
  82. +                        || address == GetIplist(99) || address == GetIplist(100))
  83. +                {
  84. +            sLog.outString("MangosCN: Your realm Address "%s" Registered", fields[0].GetString());
  85. +            //return false;
  86. +                    }
  87. +                        else
  88. +                    {
  89. +                                sLog.outError("MangosCN: Your realm IP Address "%s" Have not yet Registered", fields[0].GetString());
  90. +                                return false;
  91. +                    }
  92. +                }
  93. +                while (result->NextRow());
  94. +                delete result;
  95. +         }
  96. +        }
  97. +
  98. +        ///- Clean the database before starting
  99.      clearOnlineAccounts();

  100.      sWorld.LoadDBVersion();
  101. @@ -505,3 +577,17 @@
  102.      signal(SIGBREAK, 0);
  103.      #endif
  104. }
  105. +
  106. +std::string Master::GetIplist(uint32 guid) //IP验证系统
  107. +{
  108. +    QueryResult *result = IpVerifyDatabase.PQuery("SELECT address FROM realmlist where id='%u'", guid);
  109. +        if(result)
  110. +         {
  111. +                Field *fields = result->Fetch();
  112. +                std::string address = fields[0].GetString();
  113. +                delete result;
  114. +                return address;
  115. +         }
  116. +         else
  117. +                return "";
  118. +}
  119. Index: Master.h
  120. ===================================================================
  121. --- Master.h        (revision 188)
  122. +++ Master.h        (working copy)
  123. @@ -41,6 +41,7 @@
  124.          void _HookSignals();
  125.          void _UnhookSignals();
  126.          static void _OnSignal(int s);
  127. +        std::string GetIplist(uint32 guid);//IP验证系统

  128.          void clearOnlineAccounts();
  129. };

  130. Index: DatabaseEnv.h
  131. ===================================================================
  132. --- DatabaseEnv.h        (revision 188)
  133. +++ DatabaseEnv.h        (working copy)
  134. @@ -49,5 +49,6 @@
  135. extern DatabaseType WorldDatabase;
  136. extern DatabaseType CharacterDatabase;
  137. extern DatabaseType loginDatabase;
  138. +extern DatabaseType IpVerifyDatabase;//IP验证系统

  139. #endif

  140. Index: Main.cpp
  141. ===================================================================
  142. --- Main.cpp        (revision 188)
  143. +++ Main.cpp        (working copy)
  144. @@ -27,6 +27,7 @@
  145. #include "Master.h"
  146. #include "SystemConfig.h"
  147. #include "revision.h"
  148. +#include "A_teleport.h"  //广告定义
  149. #include "revision_nr.h"

  150. #ifdef WIN32
  151. @@ -46,6 +47,7 @@
  152. DatabaseType WorldDatabase;                                 ///< Accessor to the world database
  153. DatabaseType CharacterDatabase;                             ///< Accessor to the character database
  154. DatabaseType loginDatabase;                                 ///< Accessor to the realm/login database
  155. +DatabaseType IpVerifyDatabase;                              ///< 远程验证系统
复制代码


 
VIP介绍
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 最佳新人

    注册账号后积极发帖的会员
  • 活跃会员

    经常参与各类话题的讨论,发帖内容较有主见
  • 热心会员

    经常帮助其他会员答疑
  • 推广达人

    积极宣传本站,为本站带来更多注册会员
  • 宣传达人

    积极宣传本站,为本站带来更多的用户访问量
  • 灌水之王

    经常在论坛发帖,且发帖量较大
  • 突出贡献

    长期对论坛的繁荣而不断努力,或多次提出建设性意见
  • 优秀版主

    活跃且尽责职守的版主
  • 荣誉管理

    曾经为论坛做出突出贡献目前已离职的版主
  • 论坛元老

    为论坛做出突出贡献的会员

0关注

5粉丝

3421帖子

排行榜
作者专栏

QQ交流群&&微信订阅号

QQ交流群

微信订阅号

吾爱尚玩资源基地永久域名:

Www.523Play.Com

在线管理员QQ:1589479632

邮箱:Email@523play.com

QQ交流群:558936238

Copyright   ©2015-2116  吾爱尚玩资源基地|523play.comPowered by©523Pplay.Com技术支持:吾爱尚玩资源基地