diff --git a/12306.sln b/12306.sln index f186b65..2ba0b5d 100644 --- a/12306.sln +++ b/12306.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 -VisualStudioVersion = 12.0.30516.0 +VisualStudioVersion = 12.0.30723.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Web12306", "Web12306\Web12306.csproj", "{56406C67-2B6F-4152-9EC0-E6D80E86B96D}" EndProject @@ -14,6 +14,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{4C2B47 .nuget\NuGet.targets = .nuget\NuGet.targets EndProjectSection EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RwTicketAssistantV2", "RwTicketAssistantV2\RwTicketAssistantV2.csproj", "{9D141603-1A9D-4EEC-82D8-C473EA436839}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -28,6 +30,10 @@ Global {0C7635A7-78F5-459D-BBDE-CEEC51E546B9}.Debug|Any CPU.Build.0 = Debug|Any CPU {0C7635A7-78F5-459D-BBDE-CEEC51E546B9}.Release|Any CPU.ActiveCfg = Release|Any CPU {0C7635A7-78F5-459D-BBDE-CEEC51E546B9}.Release|Any CPU.Build.0 = Release|Any CPU + {9D141603-1A9D-4EEC-82D8-C473EA436839}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9D141603-1A9D-4EEC-82D8-C473EA436839}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9D141603-1A9D-4EEC-82D8-C473EA436839}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9D141603-1A9D-4EEC-82D8-C473EA436839}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/RwTicketAssistantV2/Properties/build/lib/Ionic.Zip.DLL b/RwTicketAssistantV2/Properties/build/lib/Ionic.Zip.DLL new file mode 100644 index 0000000..95fa928 Binary files /dev/null and b/RwTicketAssistantV2/Properties/build/lib/Ionic.Zip.DLL differ diff --git a/RwTicketAssistantV2/Properties/build/lib/MSBuild.ExtensionPack.dll b/RwTicketAssistantV2/Properties/build/lib/MSBuild.ExtensionPack.dll new file mode 100644 index 0000000..b51a932 Binary files /dev/null and b/RwTicketAssistantV2/Properties/build/lib/MSBuild.ExtensionPack.dll differ diff --git a/RwTicketAssistantV2/Properties/build/ligershark.chrome.targets b/RwTicketAssistantV2/Properties/build/ligershark.chrome.targets new file mode 100644 index 0000000..bc3fb9c --- /dev/null +++ b/RwTicketAssistantV2/Properties/build/ligershark.chrome.targets @@ -0,0 +1,59 @@ + + + + false + + + + false + + + false + + + + + + + + + + <_AppCandidateFilesToZip Remove="@(_AppCandidateFilesToZip)" /> + <_AppCandidateFilesToZip Include="@(Content);@(None)" /> + + + + + + + + + <_AppFolderFullPath>%(AppFolderItem.FullPath) + + + + + + + + + Clean; + Build; + + + + + + + <_FilesToDelete Remove="@(_FilesToDelete)" /> + <_FilesToDelete Include="$(OutputPath)**\*" /> + + + + + \ No newline at end of file diff --git a/RwTicketAssistantV2/app/background.js b/RwTicketAssistantV2/app/background.js index 9d13be1..7207c0f 100644 --- a/RwTicketAssistantV2/app/background.js +++ b/RwTicketAssistantV2/app/background.js @@ -1027,104 +1027,6 @@ window.cbl = function (u, h) { //#endregion -//#region 注册信息 - -(function () { - var regInfo = - { - result: 0, - type: "NRML", - typeDesc: "正式版", - name: "行将回家的游子们" - }; - var verifySn2 = function (skipTimeVerify, data) { - data = $.trim(data); - try { - var nameLen = parseInt(data.substr(0, 2), 16); - var name = data.substr(2, nameLen); - data = data.substring(2 + nameLen); - - var arr = []; - for (var i = 0; i < data.length; i++) { - var c = data.charCodeAt(i); - if (c >= 97) arr.push(String.fromCharCode(c - 49)); - else arr.push(data.charAt(i)); - } - data = arr.join(""); - var ticket = parseInt(data.substr(0, 14), 16); - var key = parseInt(data.substr(14, 1), 16); - var encKey = ticket.toString(16).toUpperCase() + key.toString().toUpperCase(); - data = data.substring(15); - var dec = []; - var j = 0; - for (var i = 0; i < data.length; i += 4) { - dec.push(String.fromCharCode(parseInt(data.substr(i, 4), 16) ^ encKey.charCodeAt(j))); - j++; - if (j >= encKey.length) j = 0; - } - dec = dec.join("").split('|'); - var regVersion = dec[0].substr(0, 4); - var regName = unescape(dec[0].substring(4)); - var bindAcc = dec.slice(1, dec.length); - - if (!bindAcc && !skipTimeVerify && (new Date() - ticket) / 60000 > 5) { - return { result: -1, msg: "注册码已失效, 请重新申请" }; - } - if (regName != name) { - return { result: -3, msg: "注册失败,用户名不匹配" }; - } - var info = { name: name, type: regVersion, bindAcc: bindAcc, ticket: ticket, result: 0, msg: "成功注册" }; - switch (info.type) { - case "NRML": - info.typeDesc = "正式版"; - break; - case "GROP": - info.typeDesc = "内部版, 感谢您参与我们之中!"; - break; - case "DONT": - info.typeDesc = "捐助版, 非常感谢您的支持!"; - break; - case "PART": - info.typeDesc = "合作版,欢迎您的使用"; - } - info.regTime = new Date(ticket); - info.regVersion = 2; - - return info; - } catch (e) { - return { result: -4, msg: "数据错误" }; - } - }; - var storeKey = "rw_reg"; - - if (localStorage[storeKey]) { - regInfo = verifySn2(true, localStorage[storeKey]); - if (regInfo.result !== 0) - regInfo = null; - } - - var setSn = function (key) { - var info = verifySn2(true, $.trim(key)); - if (info.result === 0) { - regInfo = info; - localStorage[storeKey] = key; - } - return info; - }; - - chrome.runtime.onMessage.addListener(function (m, s, r) { - if (m && m.action === 'getSnInfo') - r(regInfo); - if (m && m.action === 'setSnInfo') { - r(setSn(m.detail)); - } - }); - -})(); - -//#endregion - - //#region 统计 (function () { @@ -1155,6 +1057,13 @@ window.cbl = function (u, h) { trackback(m.detail.type, m.detail.values); }); + + chrome.runtime.onMessageExternal.addListener(function (m, s, r) { + if (!m || !m.action || m.action !== 'track') + return; + + trackback(m.detail.type, m.detail.values); + }); trackback(99); })();