public class Invitation { private static final String bj = "3SFLW"; // 邀请码 private static final int times = 1; // 邀请的人数,建议不要太多 public static void main(String[] args) { int invitedCount = 0; for (int i = 0; i < times; i++) { try { invite(); invitedCount++; System.out.println("\n\t已邀请" + invitedCount + "个人"); } catch (IOException e) { e.printStackTrace(); } } } private static void invite() throws IOException { // 随机手机 String[] phoneNames = {"oppo-pedm00", "oppo-peem00", "oppo-peam00", "oppo-x907", "oppo-x909t", "vivo-v2048a", "vivo-v2072a", "vivo-v2080a", "vivo-v2031ea", "vivo-v2055a", "huawei-tet-an00", "huawei-ana-al00", "huawei-ang-an00", "huawei-brq-an00", "huawei-jsc-an00", "xiaomi-mi 10s", "xiaomi-redmi k40 pro+", "xiaomi-mi 11", "xiaomi-mi 6", "xiaomi-redmi note 7", "meizu-meizu 18", "meizu-meizu 18 pro", "meizu-mx2", "meizu-m355", "meizu-16th plus", "samsung-sm-g9910", "samsung-sm-g9960", "samsung-sm-w2021", "samsung-sm-f7070", "samsung-sm-c7000", "oneplus-le2120", "oneplus-le2110", "oneplus-kb2000", "oneplus-hd1910", "oneplus-oneplus a3010", "sony-xq-as72", "sony-f8132", "sony-f5321", "sony-i4293", "sony-g8231", "google-pixel", "google-pixel xl", "google-pixel 2", "google-pixel 2 xl", "google-pixel 3"}; String phone = phoneNames[new Random().nextInt(phoneNames.length)]; // 邮箱的实现 String email = generateRandomEmail(); String data = "passwd=a5fc859e9c4a1a6c5e7edeab9cc0debc&email=" + email + "&invite_code=" + bj; // 获取时间戳 String t = String.valueOf(System.currentTimeMillis()); // 随机获取id String id = generateRandomId(); // 拼接网页 String url = "https://sm01.googls.net/account/register?" + "platform=2&api_version=14&" + "app_version=1.44&lang=zh&_key=&" + "market_id=1000&" + "pkg=com.bjchuhai&" + "device_id=rk_" + id + "&" + "model=" + phone + "&" + "sys_version=7.1.2&" + "ts=" + t + "&" + "sub_pkg=com.bjchuhai&" + "version_code=44"; OkHttpClient client = new OkHttpClient(); RequestBody body = RequestBody.create(MediaType.parse("application/x-www-form-urlencoded"), data); Request request = new Request.Builder() .url(url) .post(body) .addHeader("Content-Length", String.valueOf(data.length())) .addHeader("Host", "sm01.googls.net") .addHeader("Connection", "Keep-Alive") .addHeader("Accept-Encoding", "gzip") .addHeader("User-Agent", "okhttp/3.5.0") .build(); try (Response response = client.newCall(request).execute()) { if (!response.isSuccessful()) throw new IOException("Unexpected code " + response); // If needed, you can print the response body // System.out.println(response.body().string()); } } private static String generateRandomEmail() { StringBuilder email = new StringBuilder(); Random random = new Random(); for (int i = 0; i < 10; i++) { email.append(random.nextInt(10)); } String xx = ""; for (int i = 0; i < 4; i++) { xx += (char) (random.nextInt(26) + 'A'); } email.append("%40").append(xx).append(".com"); return email.toString(); } private static String generateRandomId() { String characters = "123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; StringBuilder id = new StringBuilder(); Random random = new Random(); for (int i = 0; i < 32; i++) { id.append(characters.charAt(random.nextInt(characters.length()))); } return id.toString(); } }
白鲸加速器刷时长
于 2024-04-09 14:25:18 首次发布