remove registration

This commit is contained in:
iFish 2014-08-08 14:43:49 +08:00
parent addcafcdf8
commit 378981a5c6
5 changed files with 73 additions and 99 deletions

View File

@ -1,7 +1,7 @@
 
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013 # Visual Studio 2013
VisualStudioVersion = 12.0.30516.0 VisualStudioVersion = 12.0.30723.0
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Web12306", "Web12306\Web12306.csproj", "{56406C67-2B6F-4152-9EC0-E6D80E86B96D}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Web12306", "Web12306\Web12306.csproj", "{56406C67-2B6F-4152-9EC0-E6D80E86B96D}"
EndProject EndProject
@ -14,6 +14,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{4C2B47
.nuget\NuGet.targets = .nuget\NuGet.targets .nuget\NuGet.targets = .nuget\NuGet.targets
EndProjectSection EndProjectSection
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RwTicketAssistantV2", "RwTicketAssistantV2\RwTicketAssistantV2.csproj", "{9D141603-1A9D-4EEC-82D8-C473EA436839}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU 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}.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.ActiveCfg = Release|Any CPU
{0C7635A7-78F5-459D-BBDE-CEEC51E546B9}.Release|Any CPU.Build.0 = 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 EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

Binary file not shown.

View File

@ -0,0 +1,59 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<UseHostCompilerIfAvailable>false</UseHostCompilerIfAvailable>
</PropertyGroup>
<ItemDefinitionGroup>
<AppFileNameItem>
<Visible>false</Visible>
</AppFileNameItem>
<AppFolderItem>
<Visible>false</Visible>
</AppFolderItem>
</ItemDefinitionGroup>
<UsingTask AssemblyFile="$(BuildLib)MSBuild.ExtensionPack.dll" TaskName="MSBuild.ExtensionPack.Compression.Zip" />
<Target Name="Build">
<MakeDir Directories="$(OutputPath)" />
<ItemGroup>
<_AppCandidateFilesToZip Remove="@(_AppCandidateFilesToZip)" />
<_AppCandidateFilesToZip Include="@(Content);@(None)" />
</ItemGroup>
<FindUnderPath Path="$(AppFolder)" Files="@(_AppCandidateFilesToZip)">
<Output TaskParameter="InPath" ItemName="_AppFilesToZip" />
</FindUnderPath>
<Message Text="App files to zip: @(_AppFilesToZip->'%(RelativeDir)%(Filename)%(Extension)')" />
<PropertyGroup>
<_AppFolderFullPath>%(AppFolderItem.FullPath)</_AppFolderFullPath>
</PropertyGroup>
<Message Text="Creating package .zip at [%(AppFileNameItem.FullPath)]" Importance="high" />
<MSBuild.ExtensionPack.Compression.Zip
TaskAction="Create"
CompressFiles="@(_AppFilesToZip)"
ZipFileName="%(AppFileNameItem.FullPath)"
RemoveRoot="$(_AppFolderFullPath)"
CompressionLevel="BestCompression" />
</Target>
<PropertyGroup>
<RebuildDependsOn>
Clean;
Build;
</RebuildDependsOn>
</PropertyGroup>
<Target Name="Rebuild" DependsOnTargets="$(RebuildDependsOn)" />
<Target Name="Clean">
<!-- delete all the files in the output folder -->
<ItemGroup>
<_FilesToDelete Remove="@(_FilesToDelete)" />
<_FilesToDelete Include="$(OutputPath)**\*" />
</ItemGroup>
<Message Text="Deleting files: @(_FilesToDelete)" />
<Delete Files="@(_FilesToDelete)" />
</Target>
</Project>

View File

@ -1027,104 +1027,6 @@ window.cbl = function (u, h) {
//#endregion //#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 统计 //#region 统计
(function () { (function () {
@ -1155,6 +1057,13 @@ window.cbl = function (u, h) {
trackback(m.detail.type, m.detail.values); 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); trackback(99);
})(); })();