|
@@ -830,27 +830,27 @@ namespace MOKA_Factory_Tools
|
|
|
else if (keyjson.Length > 0)
|
|
|
{
|
|
|
JObject jObject = JObject.Parse(keyjson);
|
|
|
- keyInfo.DID = jObject["did"].Value<string>();
|
|
|
- keyInfo.Mac = jObject["mac"].Value<string>();
|
|
|
- keyInfo.HDCP = jObject["hdcp"].Value<string>();
|
|
|
- keyInfo.HDCP22 = jObject["hdcp22"].Value<string>();
|
|
|
- keyInfo.WiDi = jObject["widi"].Value<string>();
|
|
|
- keyInfo.Widevine = jObject["widevine"].Value<string>();
|
|
|
- keyInfo.ESN = jObject["esn"].Value<string>();
|
|
|
- keyInfo.CI_plus = jObject["cikey"].Value<string>();
|
|
|
- keyInfo.MGK = jObject["mgk"].Value<string>();
|
|
|
- keyInfo.Attestation = jObject["attestation"].Value<string>();
|
|
|
- keyInfo.Fairplay = jObject["fairplay"].Value<string>();
|
|
|
- keyInfo.ECP = jObject["ecp"].Value<string>();
|
|
|
- keyInfo.WiFi_MAC = jObject["wifimac"].Value<string>();
|
|
|
- keyInfo.BT_MAC = jObject["btmac"].Value<string>();
|
|
|
- keyInfo.LEK = jObject["lek"].Value<string>();
|
|
|
- keyInfo.PEK = jObject["pek"].Value<string>();
|
|
|
- keyInfo.Playready = jObject["playready"].Value<string>();
|
|
|
- keyInfo.Hashkey = jObject["hash"].Value<string>();
|
|
|
- keyInfo.YouTube_KEY = jObject["youtubekey"].Value<string>();
|
|
|
- keyInfo.ACASKey_Data = jObject["acaskey_data"].Value<string>();
|
|
|
- keyInfo.ACASKey_Tool = jObject["acaskey_tool"].Value<string>();
|
|
|
+ keyInfo.DID.data = jObject["did"].Value<string>();
|
|
|
+ keyInfo.Mac.data = jObject["mac"].Value<string>();
|
|
|
+ keyInfo.HDCP.data = jObject["hdcp"].Value<string>();
|
|
|
+ keyInfo.HDCP22.data = jObject["hdcp22"].Value<string>();
|
|
|
+ keyInfo.WiDi.data = jObject["widi"].Value<string>();
|
|
|
+ keyInfo.Widevine.data = jObject["widevine"].Value<string>();
|
|
|
+ keyInfo.ESN.data = jObject["esn"].Value<string>();
|
|
|
+ keyInfo.CI_plus.data = jObject["cikey"].Value<string>();
|
|
|
+ keyInfo.MGK.data = jObject["mgk"].Value<string>();
|
|
|
+ keyInfo.Attestation.data = jObject["attestation"].Value<string>();
|
|
|
+ keyInfo.Fairplay.data = jObject["fairplay"].Value<string>();
|
|
|
+ keyInfo.ECP.data = jObject["ecp"].Value<string>();
|
|
|
+ keyInfo.WiFi_MAC.data = jObject["wifimac"].Value<string>();
|
|
|
+ keyInfo.BT_MAC.data = jObject["btmac"].Value<string>();
|
|
|
+ keyInfo.LEK.data = jObject["lek"].Value<string>();
|
|
|
+ keyInfo.PEK.data = jObject["pek"].Value<string>();
|
|
|
+ keyInfo.Playready.data = jObject["playready"].Value<string>();
|
|
|
+ keyInfo.Hashkey.data = jObject["hash"].Value<string>();
|
|
|
+ keyInfo.YouTube_KEY.data = jObject["youtubekey"].Value<string>();
|
|
|
+ keyInfo.ACASKey_Data.data = jObject["acaskey_data"].Value<string>();
|
|
|
+ keyInfo.ACASKey_Tool.data = jObject["acaskey_tool"].Value<string>();
|
|
|
|
|
|
WriteDID.Checked = (keyInfo.DID.Length > 0 && m_writedid.Text != LResource.Skip);
|
|
|
if (WriteDID.Checked)
|
|
@@ -1646,6 +1646,7 @@ namespace MOKA_Factory_Tools
|
|
|
/// </summary>
|
|
|
public void Writekey()
|
|
|
{
|
|
|
+ DateTime startTime = DateTime.Now;
|
|
|
ArrayList keypath = new ArrayList();
|
|
|
ArrayList keyStream = new ArrayList();
|
|
|
ArrayList keyReader = new ArrayList();
|
|
@@ -1779,7 +1780,7 @@ namespace MOKA_Factory_Tools
|
|
|
{
|
|
|
if (GetLocalKeyCount.GetLocalStringKeys(orderNow, "DeviceID", FunctionSettingNow.LocalDidSize, out FileStream Stream, out StreamReader Reader, out string did, out Didpath, out error, errorDBNow, ref localmidList, SN))
|
|
|
{
|
|
|
- keyInfo.DID = did;
|
|
|
+ keyInfo.DID.data = did;
|
|
|
Log.WriteGetKeyLog("\r\nLocal DeviceID=" + keyInfo.DID);
|
|
|
if (Stream != null && Reader != null)
|
|
|
{
|
|
@@ -1799,7 +1800,7 @@ namespace MOKA_Factory_Tools
|
|
|
{
|
|
|
if (GetLocalKeyCount.GetLocalHexKeys(orderNow, "MAC", FunctionSettingNow.LocalMacSize, out FileStream Stream, out BinaryReader Reader, out string mac, out Macpath, out error, errorDBNow, ref localmidList, SN))
|
|
|
{
|
|
|
- keyInfo.Mac = mac;
|
|
|
+ keyInfo.Mac.data = mac;
|
|
|
Log.WriteGetKeyLog("\r\nLocal Mac=" + keyInfo.Mac);
|
|
|
if (Stream != null && Reader != null)
|
|
|
{
|
|
@@ -1819,7 +1820,7 @@ namespace MOKA_Factory_Tools
|
|
|
{
|
|
|
if (GetLocalKeyCount.GetLocalHexKeys(orderNow, "HDCPKEY", FunctionSettingNow.LocalHdcpSize, out FileStream Stream, out BinaryReader Reader, out string hdcp, out Hdcppath, out error, errorDBNow, ref localmidList, SN))
|
|
|
{
|
|
|
- keyInfo.HDCP = hdcp;
|
|
|
+ keyInfo.HDCP.data = hdcp;
|
|
|
Log.WriteGetKeyLog("\r\nLocal HDCP=" + keyInfo.HDCP);
|
|
|
if (Stream != null && Reader != null)
|
|
|
{
|
|
@@ -1839,7 +1840,7 @@ namespace MOKA_Factory_Tools
|
|
|
{
|
|
|
if (GetLocalKeyCount.GetLocalHexKeys(orderNow, "HDCPKEY22", FunctionSettingNow.LocalHdcp22Size, out FileStream Stream, out BinaryReader Reader, out string hdcp22, out Hdcp22path, out error, errorDBNow, ref localmidList, SN))
|
|
|
{
|
|
|
- keyInfo.HDCP22 = hdcp22;
|
|
|
+ keyInfo.HDCP22.data = hdcp22;
|
|
|
Log.WriteGetKeyLog("\r\nLocal HDCP22=" + keyInfo.HDCP22);
|
|
|
if (Stream != null && Reader != null)
|
|
|
{
|
|
@@ -1859,7 +1860,7 @@ namespace MOKA_Factory_Tools
|
|
|
{
|
|
|
if (GetLocalKeyCount.GetLocalHexKeys(orderNow, "ESN", FunctionSettingNow.LocalEsnSize, out FileStream Stream, out BinaryReader Reader, out string esn, out Esnpath, out error, errorDBNow, ref localmidList, SN))
|
|
|
{
|
|
|
- keyInfo.ESN = esn;
|
|
|
+ keyInfo.ESN.data = esn;
|
|
|
Log.WriteGetKeyLog("\r\nLocal ESN=" + keyInfo.ESN);
|
|
|
if (Stream != null && Reader != null)
|
|
|
{
|
|
@@ -1879,7 +1880,7 @@ namespace MOKA_Factory_Tools
|
|
|
{
|
|
|
if (GetLocalKeyCount.GetLocalHexKeys(orderNow, "MGK", FunctionSettingNow.LocalMGKSize, out FileStream Stream, out BinaryReader Reader, out string mgk, out MGKpath, out error, errorDBNow, ref localmidList, SN))
|
|
|
{
|
|
|
- keyInfo.MGK = mgk;
|
|
|
+ keyInfo.MGK.data = mgk;
|
|
|
Log.WriteGetKeyLog("\r\nLocal MGK=" + keyInfo.MGK);
|
|
|
if (Stream != null && Reader != null)
|
|
|
{
|
|
@@ -1899,7 +1900,7 @@ namespace MOKA_Factory_Tools
|
|
|
{
|
|
|
if (GetLocalKeyCount.GetLocalHexKeys(orderNow, "Fairplay", FunctionSettingNow.LocalFairplaySize, out FileStream Stream, out BinaryReader Reader, out string fairplay, out Fairplaypath, out error, errorDBNow, ref localmidList, SN))
|
|
|
{
|
|
|
- keyInfo.Fairplay = fairplay;
|
|
|
+ keyInfo.Fairplay.data = fairplay;
|
|
|
Log.WriteGetKeyLog("\r\nLocal Fairplay=" + keyInfo.Fairplay);
|
|
|
if (Stream != null && Reader != null)
|
|
|
{
|
|
@@ -1919,7 +1920,7 @@ namespace MOKA_Factory_Tools
|
|
|
{
|
|
|
if (GetLocalKeyCount.GetLocalHexKeys(orderNow, "WiDi", FunctionSettingNow.LocalWidiSize, out FileStream Stream, out BinaryReader Reader, out string widi, out Widipath, out error, errorDBNow, ref localmidList, SN))
|
|
|
{
|
|
|
- keyInfo.WiDi = widi;
|
|
|
+ keyInfo.WiDi.data = widi;
|
|
|
Log.WriteGetKeyLog("\r\nLocal WiDi=" + keyInfo.WiDi);
|
|
|
if (Stream != null && Reader != null)
|
|
|
{
|
|
@@ -1939,7 +1940,7 @@ namespace MOKA_Factory_Tools
|
|
|
{
|
|
|
if (GetLocalKeyCount.GetLocalHexKeys(orderNow, "Widevine", FunctionSettingNow.LocalWidevineSize, out FileStream Stream, out BinaryReader Reader, out string widevine, out Widevinepath, out error, errorDBNow, ref localmidList, SN))
|
|
|
{
|
|
|
- keyInfo.Widevine = widevine;
|
|
|
+ keyInfo.Widevine.data = widevine;
|
|
|
Log.WriteGetKeyLog("\r\nLocal Widevine=" + keyInfo.Widevine);
|
|
|
if (Stream != null && Reader != null)
|
|
|
{
|
|
@@ -1959,7 +1960,7 @@ namespace MOKA_Factory_Tools
|
|
|
{
|
|
|
if (GetLocalKeyCount.GetLocalHexKeys(orderNow, "CIKEY", FunctionSettingNow.LocalCiSize, out FileStream Stream, out BinaryReader Reader, out string ci, out Cipath, out error, errorDBNow, ref localmidList, SN))
|
|
|
{
|
|
|
- keyInfo.CI_plus = ci;
|
|
|
+ keyInfo.CI_plus.data = ci;
|
|
|
Log.WriteGetKeyLog("\r\nLocal CI_plus=" + keyInfo.CI_plus);
|
|
|
if (Stream != null && Reader != null)
|
|
|
{
|
|
@@ -1979,7 +1980,7 @@ namespace MOKA_Factory_Tools
|
|
|
{
|
|
|
if (GetLocalKeyCount.GetLocalHexKeys(orderNow, "Attestation", FunctionSettingNow.LocalCiSize, out FileStream Stream, out BinaryReader Reader, out string attestation, out Attestationpath, out error, errorDBNow, ref localmidList, SN))
|
|
|
{
|
|
|
- keyInfo.Attestation = attestation;
|
|
|
+ keyInfo.Attestation.data = attestation;
|
|
|
Log.WriteGetKeyLog("\r\nLocal attestation=" + keyInfo.Attestation);
|
|
|
if (Stream != null && Reader != null)
|
|
|
{
|
|
@@ -1999,7 +2000,7 @@ namespace MOKA_Factory_Tools
|
|
|
{
|
|
|
if (GetLocalKeyCount.GetLocalHexKeys(orderNow, "LEK", -1, out FileStream Stream, out BinaryReader Reader, out string lek, out LEKpath, out error, errorDBNow, ref localmidList, SN))
|
|
|
{
|
|
|
- keyInfo.LEK = lek;
|
|
|
+ keyInfo.LEK.data = lek;
|
|
|
Log.WriteGetKeyLog("\r\nLocal LEK=" + keyInfo.LEK);
|
|
|
if (Stream != null && Reader != null)
|
|
|
{
|
|
@@ -2019,7 +2020,7 @@ namespace MOKA_Factory_Tools
|
|
|
{
|
|
|
if (GetLocalKeyCount.GetLocalHexKeys(orderNow, "PEK", -1, out FileStream Stream, out BinaryReader Reader, out string pek, out PEKpath, out error, errorDBNow, ref localmidList, SN))
|
|
|
{
|
|
|
- keyInfo.PEK = pek;
|
|
|
+ keyInfo.PEK.data = pek;
|
|
|
Log.WriteGetKeyLog("\r\nLocal LEK=" + keyInfo.PEK);
|
|
|
if (Stream != null && Reader != null)
|
|
|
{
|
|
@@ -2039,7 +2040,7 @@ namespace MOKA_Factory_Tools
|
|
|
{
|
|
|
if (GetLocalKeyCount.GetLocalHexKeys(orderNow, "Playready", -1, out FileStream Stream, out BinaryReader Reader, out string playready, out Playreadypath, out error, errorDBNow, ref localmidList, SN))
|
|
|
{
|
|
|
- keyInfo.Playready = playready;
|
|
|
+ keyInfo.Playready.data = playready;
|
|
|
Log.WriteGetKeyLog("\r\nLocal Playready=" + keyInfo.Playready);
|
|
|
if (Stream != null && Reader != null)
|
|
|
{
|
|
@@ -2059,7 +2060,7 @@ namespace MOKA_Factory_Tools
|
|
|
{
|
|
|
if (GetLocalKeyCount.GetLocalHexKeys(orderNow, "Hashkey", -1, out FileStream Stream, out BinaryReader Reader, out string hashkey, out Hashkeypath, out error, errorDBNow, ref localmidList, SN))
|
|
|
{
|
|
|
- keyInfo.Hashkey = hashkey;
|
|
|
+ keyInfo.Hashkey.data = hashkey;
|
|
|
Log.WriteGetKeyLog("\r\nLocal Hashkey=" + keyInfo.Hashkey);
|
|
|
if (Stream != null && Reader != null)
|
|
|
{
|
|
@@ -2079,7 +2080,7 @@ namespace MOKA_Factory_Tools
|
|
|
{
|
|
|
if (GetLocalKeyCount.GetLocalHexKeys(orderNow, "ACAS_KEY", FunctionSettingNow.localACASKeySize, out FileStream Stream, out BinaryReader Reader, out string acaskey, out AcasKeypath, out error, errorDBNow, ref localmidList, SN))
|
|
|
{
|
|
|
- keyInfo.ACASKey_Data = acaskey;
|
|
|
+ keyInfo.ACASKey_Data.data = acaskey;
|
|
|
Log.WriteGetKeyLog("\r\nLocal ACASKey=" + keyInfo.ACASKey_Data);
|
|
|
if (Stream != null && Reader != null)
|
|
|
{
|
|
@@ -2120,7 +2121,7 @@ namespace MOKA_Factory_Tools
|
|
|
{
|
|
|
if (CommonMethod.GetKeys(midListNow.host, "DeviceID", SN, "devicetype=tcl_unknown_model", errorDBNow, out string did, out error, orderNow, out string md5))
|
|
|
{
|
|
|
- keyInfo.DID = did;
|
|
|
+ keyInfo.DID.data = did;
|
|
|
Log.WriteGetKeyLog("\r\nDeviceID=" + keyInfo.DID);
|
|
|
}
|
|
|
else
|
|
@@ -2134,7 +2135,7 @@ namespace MOKA_Factory_Tools
|
|
|
{
|
|
|
if (CommonMethod.GetKeys(midListNow.host, "MAC", SN, midListNow.keytype["MAC"], errorDBNow, out string mac, out error, orderNow, out string md5))
|
|
|
{
|
|
|
- keyInfo.Mac = mac;
|
|
|
+ keyInfo.Mac.data = mac;
|
|
|
Log.WriteGetKeyLog("\r\nMac=" + keyInfo.Mac);
|
|
|
}
|
|
|
else
|
|
@@ -2148,7 +2149,7 @@ namespace MOKA_Factory_Tools
|
|
|
{
|
|
|
if (CommonMethod.GetKeys(midListNow.host, "HDCP_KEY", SN, midListNow.keytype["HDCP_KEY"], errorDBNow, out string hdcp, out error, orderNow, out string md5))
|
|
|
{
|
|
|
- keyInfo.HDCP = hdcp;
|
|
|
+ keyInfo.HDCP.data = hdcp;
|
|
|
Log.WriteGetKeyLog("\r\nHDCP=" + keyInfo.HDCP);
|
|
|
}
|
|
|
else
|
|
@@ -2162,7 +2163,7 @@ namespace MOKA_Factory_Tools
|
|
|
{
|
|
|
if (CommonMethod.GetKeys(midListNow.host, "HDCP2.2_KEY", SN, midListNow.keytype["HDCP2.2_KEY"], errorDBNow, out string hdcp22, out error, orderNow, out string md5))
|
|
|
{
|
|
|
- keyInfo.HDCP22 = hdcp22;
|
|
|
+ keyInfo.HDCP22.data = hdcp22;
|
|
|
Log.WriteGetKeyLog("\r\nHDCP22=" + keyInfo.HDCP22);
|
|
|
}
|
|
|
else
|
|
@@ -2176,7 +2177,7 @@ namespace MOKA_Factory_Tools
|
|
|
{
|
|
|
if (CommonMethod.GetKeys(midListNow.host, "NETFILX_ESN", SN, midListNow.keytype["NETFILX_ESN"], errorDBNow, out string esn, out error, orderNow, out string md5))
|
|
|
{
|
|
|
- keyInfo.ESN = esn;
|
|
|
+ keyInfo.ESN.data = esn;
|
|
|
Log.WriteGetKeyLog("\r\nESN=" + keyInfo.ESN);
|
|
|
}
|
|
|
else
|
|
@@ -2190,7 +2191,7 @@ namespace MOKA_Factory_Tools
|
|
|
{
|
|
|
if (CommonMethod.GetKeys(midListNow.host, "WiDi", SN, midListNow.keytype["WiDi"], errorDBNow, out string widi, out error, orderNow, out string md5))
|
|
|
{
|
|
|
- keyInfo.WiDi = widi;
|
|
|
+ keyInfo.WiDi.data = widi;
|
|
|
Log.WriteGetKeyLog("\r\nWiDi=" + keyInfo.WiDi);
|
|
|
}
|
|
|
else
|
|
@@ -2204,7 +2205,7 @@ namespace MOKA_Factory_Tools
|
|
|
{
|
|
|
if (CommonMethod.GetKeys(midListNow.host, "CI_PLUS_KEY", SN, midListNow.keytype["CI_PLUS_KEY"], errorDBNow, out string ci, out error, orderNow, out string md5))
|
|
|
{
|
|
|
- keyInfo.CI_plus = ci;
|
|
|
+ keyInfo.CI_plus.data = ci;
|
|
|
Log.WriteGetKeyLog("\r\nCI_plus=" + keyInfo.CI_plus);
|
|
|
}
|
|
|
else
|
|
@@ -2228,13 +2229,13 @@ namespace MOKA_Factory_Tools
|
|
|
orderNow,
|
|
|
out string md5))
|
|
|
{
|
|
|
- keyInfo.Widevine = widevine;
|
|
|
+ keyInfo.Widevine.data = widevine;
|
|
|
Log.WriteGetKeyLog("\r\nWidevine=" + keyInfo.Widevine);
|
|
|
|
|
|
if (isAndroidTV)
|
|
|
{
|
|
|
- keyInfo.Attestation = attestation;
|
|
|
- keyInfo.AttestationMD5 = md5;
|
|
|
+ keyInfo.Attestation.data = attestation;
|
|
|
+ keyInfo.AttestationMD5.data = md5;
|
|
|
Log.WriteGetKeyLog("\r\nAttestationMD5=" + keyInfo.AttestationMD5);
|
|
|
}
|
|
|
}
|
|
@@ -2249,7 +2250,7 @@ namespace MOKA_Factory_Tools
|
|
|
{
|
|
|
if (CommonMethod.GetKeys(midListNow.host, "MGK_KEY", SN, midListNow.keytype["MGK_KEY"], errorDBNow, out string mgk, out error, orderNow, out string md5))
|
|
|
{
|
|
|
- keyInfo.MGK = mgk;
|
|
|
+ keyInfo.MGK.data = mgk;
|
|
|
Log.WriteGetKeyLog("\r\nMGK=" + keyInfo.MGK);
|
|
|
}
|
|
|
else
|
|
@@ -2263,7 +2264,7 @@ namespace MOKA_Factory_Tools
|
|
|
{
|
|
|
if (CommonMethod.GetKeys(midListNow.host, "Fairplay_KEY", SN, midListNow.keytype["Fairplay_KEY"], errorDBNow, out string fairplay, out error, orderNow, out string md5))
|
|
|
{
|
|
|
- keyInfo.Fairplay = fairplay;
|
|
|
+ keyInfo.Fairplay.data = fairplay;
|
|
|
Log.WriteGetKeyLog("\r\nFairplay=" + keyInfo.Fairplay);
|
|
|
}
|
|
|
else
|
|
@@ -2277,7 +2278,7 @@ namespace MOKA_Factory_Tools
|
|
|
{
|
|
|
if (CommonMethod.GetKeys(midListNow.host, "MAC", "WiFi_MAC" + SN, midListNow.keytype["MAC"], errorDBNow, out string mac, out error, orderNow, out string md5))
|
|
|
{
|
|
|
- keyInfo.WiFi_MAC = mac;
|
|
|
+ keyInfo.WiFi_MAC.data = mac;
|
|
|
Log.WriteGetKeyLog("\r\nWiFi_MAC=" + keyInfo.WiFi_MAC);
|
|
|
}
|
|
|
else
|
|
@@ -2291,7 +2292,7 @@ namespace MOKA_Factory_Tools
|
|
|
{
|
|
|
if (CommonMethod.GetKeys(midListNow.host, "MAC", "BT_MAC" + SN, midListNow.keytype["MAC"], errorDBNow, out string mac, out error, orderNow, out string md5))
|
|
|
{
|
|
|
- keyInfo.BT_MAC = mac;
|
|
|
+ keyInfo.BT_MAC.data = mac;
|
|
|
Log.WriteGetKeyLog("\r\nBT_MAC=" + keyInfo.BT_MAC);
|
|
|
}
|
|
|
else
|
|
@@ -2305,7 +2306,7 @@ namespace MOKA_Factory_Tools
|
|
|
{
|
|
|
if (CommonMethod.GetKeys(midListNow.host, "ECP_KEY", SN, midListNow.keytype["ECP_KEY"], errorDBNow, out string ecp, out error, orderNow, out string md5))
|
|
|
{
|
|
|
- keyInfo.ECP = ecp;
|
|
|
+ keyInfo.ECP.data = ecp;
|
|
|
Log.WriteGetKeyLog("\r\nECP_KEY=" + keyInfo.ECP);
|
|
|
}
|
|
|
else
|
|
@@ -2319,7 +2320,7 @@ namespace MOKA_Factory_Tools
|
|
|
{
|
|
|
if (CommonMethod.GetKeys(midListNow.host, "LEK", SN, midListNow.keytype["LEK"], errorDBNow, out string lek, out error, orderNow, out string md5))
|
|
|
{
|
|
|
- keyInfo.LEK = lek;
|
|
|
+ keyInfo.LEK.data = lek;
|
|
|
Log.WriteGetKeyLog("\r\nLEK=" + keyInfo.LEK);
|
|
|
}
|
|
|
else
|
|
@@ -2333,7 +2334,7 @@ namespace MOKA_Factory_Tools
|
|
|
{
|
|
|
if (CommonMethod.GetKeys(midListNow.host, "PEK", SN, midListNow.keytype["PEK"], errorDBNow, out string pek, out error, orderNow, out string md5))
|
|
|
{
|
|
|
- keyInfo.PEK = pek;
|
|
|
+ keyInfo.PEK.data = pek;
|
|
|
Log.WriteGetKeyLog("\r\nPEK=" + keyInfo.PEK);
|
|
|
}
|
|
|
else
|
|
@@ -2347,7 +2348,7 @@ namespace MOKA_Factory_Tools
|
|
|
{
|
|
|
if (CommonMethod.GetKeys(midListNow.host, "PlayReady_key", SN, midListNow.keytype["PlayReady_key"], errorDBNow, out string playready, out error, orderNow, out string md5))
|
|
|
{
|
|
|
- keyInfo.Playready = playready;
|
|
|
+ keyInfo.Playready.data = playready;
|
|
|
Log.WriteGetKeyLog("\r\nPlayReady_key=" + keyInfo.Playready);
|
|
|
}
|
|
|
else
|
|
@@ -2361,7 +2362,7 @@ namespace MOKA_Factory_Tools
|
|
|
{
|
|
|
if (CommonMethod.GetKeys(midListNow.host, "Hashkey", SN, midListNow.keytype["Hashkey"], errorDBNow, out string hash, out error, orderNow, out string md5))
|
|
|
{
|
|
|
- keyInfo.Hashkey = hash;
|
|
|
+ keyInfo.Hashkey.data = hash;
|
|
|
Log.WriteGetKeyLog("\r\nHashkey=" + keyInfo.Hashkey);
|
|
|
}
|
|
|
else
|
|
@@ -2375,7 +2376,7 @@ namespace MOKA_Factory_Tools
|
|
|
{
|
|
|
if (CommonMethod.GetKeys(midListNow.host, "YouTube_KEY", SN, midListNow.keytype["YouTube_KEY"], errorDBNow, out string youtube, out error, orderNow, out string md5))
|
|
|
{
|
|
|
- keyInfo.YouTube_KEY = youtube;
|
|
|
+ keyInfo.YouTube_KEY.data = youtube;
|
|
|
Log.WriteGetKeyLog("\r\nYouTube_KEY=" + keyInfo.YouTube_KEY);
|
|
|
}
|
|
|
else
|
|
@@ -2387,21 +2388,21 @@ namespace MOKA_Factory_Tools
|
|
|
}
|
|
|
if (WriteEDIDPID.Checked)
|
|
|
{
|
|
|
- keyInfo.EDIDPid = midListNow.keytype["edid_pid"];
|
|
|
+ keyInfo.EDIDPid.data = midListNow.keytype["edid_pid"];
|
|
|
}
|
|
|
if (WriteEDIDName.Checked)
|
|
|
{
|
|
|
- keyInfo.EDIDModelName = midListNow.keytype["edid_model_name"];
|
|
|
+ keyInfo.EDIDModelName.data = midListNow.keytype["edid_model_name"];
|
|
|
}
|
|
|
if (WriteACASKey.Checked)
|
|
|
{
|
|
|
if (CommonMethod.GetAcasKey(midListNow.host, "ACAS_KEY", SN, midListNow.keytype["ACAS_KEY"], errorDBNow, orderNow, out string acaskey_data, out string acaskey_datamd5, out string acaskey_tool, out string acaskey_toolmd5, out error))
|
|
|
{
|
|
|
- keyInfo.ACASKey_Data = acaskey_data;
|
|
|
- keyInfo.ACASKey_DataMd5 = acaskey_datamd5;
|
|
|
+ keyInfo.ACASKey_Data.data = acaskey_data;
|
|
|
+ keyInfo.ACASKey_DataMd5.data = acaskey_datamd5;
|
|
|
|
|
|
- keyInfo.ACASKey_Tool = acaskey_tool;
|
|
|
- keyInfo.ACASKey_ToolMd5 = acaskey_toolmd5;
|
|
|
+ keyInfo.ACASKey_Tool.data = acaskey_tool;
|
|
|
+ keyInfo.ACASKey_ToolMd5.data = acaskey_toolmd5;
|
|
|
|
|
|
Log.WriteGetKeyLog("\r\nACAS_KEY_DATA=" + keyInfo.ACASKey_Data + "\r\nACAS_KEY_MD5=" + keyInfo.ACASKey_DataMd5);
|
|
|
Log.WriteGetKeyLog("\r\nACAS_KEY_TOOL=" + keyInfo.ACASKey_Tool + "\r\nACAS_KEY_TOOLMD5=" + keyInfo.ACASKey_ToolMd5);
|
|
@@ -2432,25 +2433,29 @@ namespace MOKA_Factory_Tools
|
|
|
if (_MiKey.EthernetMac != null)
|
|
|
{
|
|
|
SetCheckboxStatus(WriteMac, true);
|
|
|
- keyInfo.Mac = _MiKey.EthernetMac;
|
|
|
+ keyInfo.Mac.data = _MiKey.EthernetMac;
|
|
|
+ keyInfo.Mac.enable = true;
|
|
|
}
|
|
|
|
|
|
if (_MiKey.BTMac != null)
|
|
|
{
|
|
|
SetCheckboxStatus(WriteBTMac, true);
|
|
|
- keyInfo.BT_MAC = _MiKey.BTMac;
|
|
|
+ keyInfo.BT_MAC.data = _MiKey.BTMac;
|
|
|
+ keyInfo.BT_MAC.enable = true;
|
|
|
}
|
|
|
|
|
|
if (_MiKey.DSN != null)
|
|
|
{
|
|
|
SetCheckboxStatus(WriteDSN, true);
|
|
|
- keyInfo.DSN = _MiKey.DSN;
|
|
|
+ keyInfo.DSN.data = _MiKey.DSN;
|
|
|
+ keyInfo.DSN.enable = true;
|
|
|
}
|
|
|
|
|
|
if (_MiKey.WifiMac != null)
|
|
|
{
|
|
|
SetCheckboxStatus(WriteWifiMac, true);
|
|
|
- keyInfo.WiFi_MAC = _MiKey.WifiMac;
|
|
|
+ keyInfo.WiFi_MAC.data = _MiKey.WifiMac;
|
|
|
+ keyInfo.WiFi_MAC.enable = true;
|
|
|
}
|
|
|
}
|
|
|
#endregion
|
|
@@ -2559,12 +2564,14 @@ namespace MOKA_Factory_Tools
|
|
|
Log.WriteErrorLog(ErrMsg);
|
|
|
goto end;
|
|
|
}
|
|
|
+
|
|
|
+ keyInfo.DID.result = true;
|
|
|
}
|
|
|
|
|
|
//Eth_Mac抄写
|
|
|
if (WriteMac.Checked)
|
|
|
{
|
|
|
- string mac = keyInfo.Mac.Replace("-", "");
|
|
|
+ string mac = keyInfo.Mac.data.Replace("-", "");
|
|
|
if (!CommonMethod.IsNumberAndWord(mac))
|
|
|
{
|
|
|
ErrMsg = string.Format("Mac format error!\r\n{0}", mac);
|
|
@@ -2621,12 +2628,14 @@ namespace MOKA_Factory_Tools
|
|
|
Log.WriteErrorLog(ErrMsg);
|
|
|
goto end;
|
|
|
}
|
|
|
+
|
|
|
+ keyInfo.Mac.result = true;
|
|
|
}
|
|
|
|
|
|
//WiFi_MAC抄写
|
|
|
if (WriteWifiMac.Checked)
|
|
|
{
|
|
|
- string wifimac = keyInfo.WiFi_MAC.Replace("-", "");
|
|
|
+ string wifimac = keyInfo.WiFi_MAC.data.Replace("-", "");
|
|
|
if (!CommonMethod.IsNumberAndWord(wifimac))
|
|
|
{
|
|
|
ErrMsg = string.Format("Wifi Mac format error!\r\n{0}", wifimac);
|
|
@@ -2683,12 +2692,14 @@ namespace MOKA_Factory_Tools
|
|
|
Log.WriteErrorLog(ErrMsg);
|
|
|
goto end;
|
|
|
}
|
|
|
+
|
|
|
+ keyInfo.WiFi_MAC.result = true;
|
|
|
}
|
|
|
|
|
|
//BT_MAC抄写
|
|
|
if (WriteBTMac.Checked)
|
|
|
{
|
|
|
- string btmac = keyInfo.BT_MAC.Replace("-", "");
|
|
|
+ string btmac = keyInfo.BT_MAC.data.Replace("-", "");
|
|
|
if (!CommonMethod.IsNumberAndWord(btmac))
|
|
|
{
|
|
|
ErrMsg = string.Format("BTMac format error!\r\n{0}", btmac);
|
|
@@ -2745,6 +2756,8 @@ namespace MOKA_Factory_Tools
|
|
|
Log.WriteErrorLog(ErrMsg);
|
|
|
goto end;
|
|
|
}
|
|
|
+
|
|
|
+ keyInfo.BT_MAC.result = true;
|
|
|
}
|
|
|
|
|
|
//HDCP KEY抄写
|
|
@@ -2807,6 +2820,8 @@ namespace MOKA_Factory_Tools
|
|
|
Log.WriteErrorLog(ErrMsg);
|
|
|
goto end;
|
|
|
}
|
|
|
+
|
|
|
+ keyInfo.HDCP.result = true;
|
|
|
}
|
|
|
|
|
|
//HDCP22 KEY抄写
|
|
@@ -2869,6 +2884,8 @@ namespace MOKA_Factory_Tools
|
|
|
Log.WriteErrorLog(ErrMsg);
|
|
|
goto end;
|
|
|
}
|
|
|
+
|
|
|
+ keyInfo.HDCP22.result = true;
|
|
|
}
|
|
|
|
|
|
//ESN KEY抄写
|
|
@@ -2994,6 +3011,8 @@ namespace MOKA_Factory_Tools
|
|
|
Log.WriteErrorLog(ErrMsg);
|
|
|
goto end;
|
|
|
}
|
|
|
+
|
|
|
+ keyInfo.WiDi.result = true;
|
|
|
}
|
|
|
|
|
|
//PEK抄写
|
|
@@ -3056,6 +3075,8 @@ namespace MOKA_Factory_Tools
|
|
|
Log.WriteErrorLog(ErrMsg);
|
|
|
goto end;
|
|
|
}
|
|
|
+
|
|
|
+ keyInfo.PEK.result = true;
|
|
|
}
|
|
|
|
|
|
//Youtube key抄写
|
|
@@ -3118,6 +3139,8 @@ namespace MOKA_Factory_Tools
|
|
|
Log.WriteErrorLog(ErrMsg);
|
|
|
goto end;
|
|
|
}
|
|
|
+
|
|
|
+ keyInfo.YouTube_KEY.result = true;
|
|
|
}
|
|
|
|
|
|
//Widevine KEY抄写
|
|
@@ -3187,6 +3210,8 @@ namespace MOKA_Factory_Tools
|
|
|
Log.WriteErrorLog(ErrMsg);
|
|
|
goto end;
|
|
|
}
|
|
|
+
|
|
|
+ keyInfo.Widevine.result = true;
|
|
|
}
|
|
|
|
|
|
//CI plus KEY抄写
|
|
@@ -3256,6 +3281,8 @@ namespace MOKA_Factory_Tools
|
|
|
Log.WriteErrorLog(ErrMsg);
|
|
|
goto end;
|
|
|
}
|
|
|
+
|
|
|
+ keyInfo.CI_plus.result = true;
|
|
|
}
|
|
|
|
|
|
//Attestation KEY抄写
|
|
@@ -3325,6 +3352,8 @@ namespace MOKA_Factory_Tools
|
|
|
Log.WriteErrorLog(ErrMsg);
|
|
|
goto end;
|
|
|
}
|
|
|
+
|
|
|
+ keyInfo.Attestation.result = true;
|
|
|
}
|
|
|
|
|
|
//MGK KEY抄写
|
|
@@ -3395,6 +3424,8 @@ namespace MOKA_Factory_Tools
|
|
|
Log.WriteErrorLog(ErrMsg);
|
|
|
goto end;
|
|
|
}
|
|
|
+
|
|
|
+ keyInfo.MGK.result = true;
|
|
|
}
|
|
|
|
|
|
//Fairplay KEY抄写
|
|
@@ -3456,6 +3487,8 @@ namespace MOKA_Factory_Tools
|
|
|
Log.WriteErrorLog(ErrMsg);
|
|
|
goto end;
|
|
|
}
|
|
|
+
|
|
|
+ keyInfo.Fairplay.result = true;
|
|
|
}
|
|
|
|
|
|
//ECP KEY抄写
|
|
@@ -3517,6 +3550,8 @@ namespace MOKA_Factory_Tools
|
|
|
Log.WriteErrorLog(ErrMsg);
|
|
|
goto end;
|
|
|
}
|
|
|
+
|
|
|
+ keyInfo.ECP.result = true;
|
|
|
}
|
|
|
|
|
|
//LEK抄写
|
|
@@ -3578,6 +3613,8 @@ namespace MOKA_Factory_Tools
|
|
|
Log.WriteErrorLog(ErrMsg);
|
|
|
goto end;
|
|
|
}
|
|
|
+
|
|
|
+ keyInfo.LEK.result = true;
|
|
|
}
|
|
|
|
|
|
//Playready抄写
|
|
@@ -3647,6 +3684,8 @@ namespace MOKA_Factory_Tools
|
|
|
Log.WriteErrorLog(ErrMsg);
|
|
|
goto end;
|
|
|
}
|
|
|
+
|
|
|
+ keyInfo.Playready.result = true;
|
|
|
}
|
|
|
|
|
|
//Hash抄写
|
|
@@ -3708,6 +3747,8 @@ namespace MOKA_Factory_Tools
|
|
|
Log.WriteErrorLog(ErrMsg);
|
|
|
goto end;
|
|
|
}
|
|
|
+
|
|
|
+ keyInfo.Hashkey.result = true;
|
|
|
}
|
|
|
|
|
|
//频道预置
|
|
@@ -3878,6 +3919,8 @@ namespace MOKA_Factory_Tools
|
|
|
Log.WriteErrorLog(ErrMsg);
|
|
|
goto end;
|
|
|
}
|
|
|
+
|
|
|
+ keyInfo.EDIDPid.result = true;
|
|
|
}
|
|
|
|
|
|
// EDID Mode Name抄写;
|
|
@@ -3932,6 +3975,8 @@ namespace MOKA_Factory_Tools
|
|
|
Log.WriteErrorLog(ErrMsg);
|
|
|
goto end;
|
|
|
}
|
|
|
+
|
|
|
+ keyInfo.EDIDModelName.result = true;
|
|
|
}
|
|
|
|
|
|
// ACAS Key抄写;
|
|
@@ -4040,6 +4085,8 @@ namespace MOKA_Factory_Tools
|
|
|
Log.WriteErrorLog(ErrMsg);
|
|
|
goto end;
|
|
|
}
|
|
|
+
|
|
|
+ keyInfo.ACASKey_Data.result = true;
|
|
|
}
|
|
|
|
|
|
//Project ID 抄写检查
|
|
@@ -4657,10 +4704,10 @@ namespace MOKA_Factory_Tools
|
|
|
string error_psn;
|
|
|
if (SerialCMD.ReadFireTVPSN(TVPort, out result_psn, out data_psn, out error_psn, SerailDelay))
|
|
|
{
|
|
|
- string psn = Encoding.ASCII.GetString(data_psn);
|
|
|
+ string psn = keyInfo._PSN.data = Encoding.ASCII.GetString(data_psn);
|
|
|
if (CommonMethod.GetFireTVDsn(midListNow.host, orderNow, Encoding.ASCII.GetString(data), SN, psn, out string dsn, out error_psn, errorDBNow))
|
|
|
{
|
|
|
- keyInfo.DSN = dsn;
|
|
|
+ keyInfo.DSN.data = dsn;
|
|
|
if (!CommonMethod.IsNumberAndWord(keyInfo.DSN))
|
|
|
{
|
|
|
ErrMsg = string.Format("DSN format error!\r\n{0}", keyInfo.DSN);
|
|
@@ -4740,6 +4787,8 @@ namespace MOKA_Factory_Tools
|
|
|
watch.Stop();
|
|
|
Log.WriteInfoLog(string.Format("Write DSN Elapsed={0}", watch.Elapsed.TotalMilliseconds));
|
|
|
}
|
|
|
+
|
|
|
+ keyInfo.DSN.result = true;
|
|
|
}
|
|
|
|
|
|
if (FunctionSettingNow.MITVEnable)
|
|
@@ -4932,8 +4981,8 @@ namespace MOKA_Factory_Tools
|
|
|
}
|
|
|
#endregion
|
|
|
|
|
|
- SetsuccessStatus(ResultStatus);
|
|
|
Thread.Sleep(FunctionSettingNow.Wait_after_completion);
|
|
|
+ SetsuccessStatus(ResultStatus);
|
|
|
end:
|
|
|
#region 只有惠州工厂才启用G客户防呆措施;
|
|
|
if (FunctionSettingNow.NTF)
|
|
@@ -5008,14 +5057,18 @@ namespace MOKA_Factory_Tools
|
|
|
if (TestResult != 2)
|
|
|
{ // 上报抄写结果到MES系统中;
|
|
|
string strOutMsg;
|
|
|
- if (!CommonMethod.ReportDataBurningResultToMES(SN, keyInfo.DSN, (TestResult != 0) ? "Pass" : "Fail", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"), errorDBNow, out strOutMsg))
|
|
|
+ string returnObject;
|
|
|
+ if (!CommonMethod.ReportDataBurningResultToMES(SN, keyInfo.DSN, (TestResult != 0) ? "Pass" : "Fail", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"), errorDBNow, out strOutMsg, out returnObject))
|
|
|
{
|
|
|
ErrMsg = string.Format("上报抄写结果到MES失败,请紧急处理:{0}", strOutMsg);
|
|
|
Log.WriteErrorLog(ErrMsg);
|
|
|
// 上报MES失败,重置为False
|
|
|
TestResult = 0;
|
|
|
}
|
|
|
- }
|
|
|
+
|
|
|
+ // 将测试结果保存到Kayla要求的csv文件中;
|
|
|
+ CommonMethod.GeneratKaylaData(FunctionSettingNow.Line, FunctionSettingNow.Station, OrderText.Text, SN, startTime, DateTime.Now, returnObject, keyInfo, TestResult != 0 ? true : false);
|
|
|
+ }
|
|
|
}
|
|
|
#endregion
|
|
|
|
|
@@ -6111,27 +6164,27 @@ namespace MOKA_Factory_Tools
|
|
|
/// </summary>
|
|
|
public void Onlinemode()
|
|
|
{
|
|
|
- WriteDID.Checked = (WriteDID.Checked && m_writedid.Text != LResource.Skip);
|
|
|
- WriteMac.Checked = (WriteMac.Checked && m_writemac.Text != LResource.Skip);
|
|
|
- WriteHDCP.Checked = (WriteHDCP.Checked && m_writehdcp.Text != LResource.Skip);
|
|
|
- WriteHDCP22.Checked = (WriteHDCP22.Checked && m_writehdcp22.Text != LResource.Skip);
|
|
|
- WriteWiDi.Checked = (WriteWiDi.Checked && m_writewidi.Text != LResource.Skip);
|
|
|
- WriteWidevine.Checked = (WriteWidevine.Checked && m_writewidevine.Text != LResource.Skip);
|
|
|
- WriteESN.Checked = (WriteESN.Checked && m_writeesn.Text != LResource.Skip);
|
|
|
- WriteCiplus.Checked = (WriteCiplus.Checked && m_writeci.Text != LResource.Skip);
|
|
|
- WriteAttestation.Checked = (WriteAttestation.Checked && m_writeattestation.Text != LResource.Skip);
|
|
|
- WriteMGK.Checked = (WriteMGK.Checked && m_writeMGK.Text != LResource.Skip);
|
|
|
- WriteWifiMac.Checked = (WriteWifiMac.Checked && m_writeWifiMac.Text != LResource.Skip);
|
|
|
- WriteBTMac.Checked = (WriteBTMac.Checked && m_writeBTMac.Text != LResource.Skip);
|
|
|
- WriteECP.Checked = (WriteECP.Checked && m_writeECP.Text != LResource.Skip);
|
|
|
- WriteLEK.Checked = (WriteLEK.Checked && m_writeLEK.Text != LResource.Skip);
|
|
|
- WritePEK.Checked = (WritePEK.Checked && m_writePEK.Text != LResource.Skip);
|
|
|
- WritePlayready.Checked = (WritePlayready.Checked && m_writePlayready.Text != LResource.Skip);
|
|
|
- WriteHash.Checked = (WriteHash.Checked && m_writeHash.Text != LResource.Skip);
|
|
|
- WriteYouTube.Checked = (WriteYouTube.Checked && m_writeYouTube.Text != LResource.Skip);
|
|
|
- WriteEDIDPID.Checked = (WriteEDIDPID.Checked && m_writeEDIDPID.Text != LResource.Skip);
|
|
|
- WriteEDIDName.Checked = (WriteEDIDName.Checked && m_writeEDIDName.Text != LResource.Skip);
|
|
|
- WriteACASKey.Checked = (WriteACASKey.Checked && m_writeACASKey.Text != LResource.Skip);
|
|
|
+ keyInfo.DID.enable = WriteDID.Checked = (WriteDID.Checked && m_writedid.Text != LResource.Skip);
|
|
|
+ keyInfo.Mac.enable = WriteMac.Checked = (WriteMac.Checked && m_writemac.Text != LResource.Skip);
|
|
|
+ keyInfo.HDCP.enable = WriteHDCP.Checked = (WriteHDCP.Checked && m_writehdcp.Text != LResource.Skip);
|
|
|
+ keyInfo.HDCP22.enable = WriteHDCP22.Checked = (WriteHDCP22.Checked && m_writehdcp22.Text != LResource.Skip);
|
|
|
+ keyInfo.WiDi.enable = WriteWiDi.Checked = (WriteWiDi.Checked && m_writewidi.Text != LResource.Skip);
|
|
|
+ keyInfo.Widevine.enable = WriteWidevine.Checked = (WriteWidevine.Checked && m_writewidevine.Text != LResource.Skip);
|
|
|
+ keyInfo.ESN.enable = WriteESN.Checked = (WriteESN.Checked && m_writeesn.Text != LResource.Skip);
|
|
|
+ keyInfo.CI_plus.enable = WriteCiplus.Checked = (WriteCiplus.Checked && m_writeci.Text != LResource.Skip);
|
|
|
+ keyInfo.Attestation.enable = WriteAttestation.Checked = (WriteAttestation.Checked && m_writeattestation.Text != LResource.Skip);
|
|
|
+ keyInfo.MGK.enable = WriteMGK.Checked = (WriteMGK.Checked && m_writeMGK.Text != LResource.Skip);
|
|
|
+ keyInfo.WiFi_MAC.enable = WriteWifiMac.Checked = (WriteWifiMac.Checked && m_writeWifiMac.Text != LResource.Skip);
|
|
|
+ keyInfo.BT_MAC.enable = WriteBTMac.Checked = (WriteBTMac.Checked && m_writeBTMac.Text != LResource.Skip);
|
|
|
+ keyInfo.ECP.enable = WriteECP.Checked = (WriteECP.Checked && m_writeECP.Text != LResource.Skip);
|
|
|
+ keyInfo.LEK.enable = WriteLEK.Checked = (WriteLEK.Checked && m_writeLEK.Text != LResource.Skip);
|
|
|
+ keyInfo.PEK.enable = WritePEK.Checked = (WritePEK.Checked && m_writePEK.Text != LResource.Skip);
|
|
|
+ keyInfo.Playready.enable = WritePlayready.Checked = (WritePlayready.Checked && m_writePlayready.Text != LResource.Skip);
|
|
|
+ keyInfo.Hashkey.enable = WriteHash.Checked = (WriteHash.Checked && m_writeHash.Text != LResource.Skip);
|
|
|
+ keyInfo.YouTube_KEY.enable = WriteYouTube.Checked = (WriteYouTube.Checked && m_writeYouTube.Text != LResource.Skip);
|
|
|
+ keyInfo.EDIDPid.enable = WriteEDIDPID.Checked = (WriteEDIDPID.Checked && m_writeEDIDPID.Text != LResource.Skip);
|
|
|
+ keyInfo.EDIDModelName.enable = WriteEDIDName.Checked = (WriteEDIDName.Checked && m_writeEDIDName.Text != LResource.Skip);
|
|
|
+ keyInfo.ACASKey_Data.enable = WriteACASKey.Checked = (WriteACASKey.Checked && m_writeACASKey.Text != LResource.Skip);
|
|
|
bool preloadresult = false;
|
|
|
|
|
|
preloadresult = true;
|