public static AccountInfo generateRandom() { AccountInfo accountInfo = new AccountInfo(); accountInfo.mobileid = randomHex(32); accountInfo.udid = "UNKNOWN"; accountInfo.mmac = "pdp_ip0%3d00%3a00%3a00%3a00%3a00%3aB0%7cpdp_ip1%3d00%3a00%3a00%3a00%3a00%3aB0%7cpdp_ip2" + "%3d00%3a00%3a00%3a00%3a00%3a00%7cpdp_ip3%3d00%3a00%3a00%3a00%3a00%3a00%7cap1%3dB6%3aF0%3aAB%3a79" + "%3a2A%3aBA%7cen0%3dB4%3aF0%3aAB%3a79%3a2A%3aBA%7" + randomHex(16); accountInfo.openudid = randomHex(40); accountInfo.ifa = randomHex(8).toUpperCase() + "-" + randomHex(4).toUpperCase() + "-" + randomHex(4).toUpperCase() + "-" + randomHex(4).toUpperCase() + "-" + randomHex(12).toUpperCase(); accountInfo.ifv = randomHex(8).toUpperCase() + "-" + randomHex(4).toUpperCase() + "-" + randomHex(4).toUpperCase() + "-" + randomHex(4).toUpperCase() + "-" + randomHex(12).toUpperCase(); accountInfo.unityDevId = randomHex(32); return accountInfo; }
public static AccountInfo loadFromProperties(Properties properties, String prefix) { AccountInfo accountInfo = new AccountInfo(); accountInfo.mobileid = properties.getProperty(prefix + ".mobileid"); if (accountInfo.mobileid == null) { return null; } accountInfo.kabamid = properties.getProperty(prefix + ".kabamid"); accountInfo.naid = properties.getProperty(prefix + ".naid"); accountInfo.accesstoken = properties.getProperty(prefix + ".accesstoken"); accountInfo.udid = properties.getProperty(prefix + ".udid"); accountInfo.mmac = properties.getProperty(prefix + ".mmac"); accountInfo.openudid = properties.getProperty(prefix + ".openudid"); accountInfo.ifa = properties.getProperty(prefix + ".ifa"); accountInfo.ifv = properties.getProperty(prefix + ".ifv"); accountInfo.unityDevId = properties.getProperty(prefix + ".unitydevid"); return accountInfo; }