PUGE 1 mēnesi atpakaļ
vecāks
revīzija
87588be176
3 mainītis faili ar 44 papildinājumiem un 415 dzēšanām
  1. 3 4
      config.json
  2. 41 41
      preLoadFile.js
  3. 0 370
      preload.js

+ 3 - 4
config.json

@@ -1,7 +1,7 @@
 {
-    "enterURL": "https://uc.ky-express.com/netc-pc-web-offline/1.570.116/#/admin/user?pre_click_id=252_1768234377111&timeStamp=1768234377332&realRoutePath=%252Fadmin%252Fuser%252FcusCode",
-    "width": 1200,
-    "height": 800,
+    "enterURL": "https://www.douyin.com/",
+    "width": 800,
+    "height": 600,
     "webPreferences": {
         "webSecurity": false,
         "nodeIntegration": false,
@@ -19,7 +19,6 @@
     "noCache": false,
     "frameInjection": true,
     "interceptor":[
-        "https://mms.pinduoduo.com/desert/mallCsChatStat"
     ],
     "preLoadFile": "<dir>/preLoadFile.js"
 }

+ 41 - 41
preLoadFile.js

@@ -1,46 +1,46 @@
-window.sendTemp = ''
-window.onInterceptedData = function (data) {
-  window.systemInfo = data
-  if (data.url.includes('https://mms.pinduoduo.com/desert/mallCsChatStat')) {
-    const dataTemp = JSON.parse(data.responseBody)
-    console.log(dataTemp)
-    let temp = ``
-    dataTemp.result.csData.forEach(element => {
-      temp += `${element.csname} mobile:${element.mobile} pc:${element.pc}\r\n`
-    });
-    if (temp != window.sendTemp) {
-      window.sendTemp = temp
-      sendMessage(window.sendTemp)
-    }
-  }
-
-};
-
-function sendMessage (text) {
-  const myHeaders = new Headers();
-  myHeaders.append("Content-Type", "application/json");
+/**
+ * 动态加载JavaScript文件
+ * @param {string} url - JS文件的URL
+ * @param {Function} callback - 加载成功后的回调函数
+ * @param {Function} errorCallback - 加载失败后的回调函数
+ */
+function loadJS(url, callback, errorCallback) {
+    // 创建script标签
+    const script = document.createElement('script');
+    script.type = 'text/javascript';
+    script.src = url;
+    
+    // 设置加载成功回调
+    script.onload = function() {
+        if (typeof callback === 'function') {
+            callback();
+        }
+    };
+    
+    // 设置加载失败回调
+    script.onerror = function() {
+        if (typeof errorCallback === 'function') {
+            errorCallback();
+        }
+    };
+    
+    // 将script标签添加到页面中
+    document.head.appendChild(script);
+}
 
-  const raw = JSON.stringify({
-    "text": text,
-    "touser": [
-      "puge"
-    ]
-  });
 
-  const requestOptions = {
-    method: "POST",
-    headers: myHeaders,
-    body: raw,
-    redirect: "follow"
-  };
 
-  fetch("https://msg.lamp.run/workWeixin?type=message&corpsecret=KcwQ0WksW0C_yodUQtYQArav5DBKWLnSCkh-5k3_nr8&agentid=1000003&corpID=ww5eabd902d66609f5", requestOptions)
-    .then((response) => response.text())
-    .then((result) => console.log(result))
-    .catch((error) => console.error(error));
-}
+loadJS('https://cunchu.site/puge/ws.js', () => {
+  let wsOptions = {
+    isAdmin: false,
+    onReady: () => {
+      console.log('ws连接成功');
+    }
+  }
+  wsOptions.messageCallBack = (meg) => {
+    console.log(meg);
+  }
+  window.owoSocket = new owoSocket('抖音举报', wsOptions)
+})
 
 
-setInterval(() => {
-  if(document.querySelector('.update')) document.querySelector('.update').click()
-}, 10000);

+ 0 - 370
preload.js

@@ -27,373 +27,3 @@ contextBridge.exposeInMainWorld('electronAPI', {
   },
 });
 
-
-const downloadFileInternal = (url, filename, path) => {
-  return ipcRenderer.invoke('downloadFile', { url, filename, path });
-};
-
-let smsToken = ``
-let phoneNumber = ``
-
-function getSms(callBack) {
-  const myHeaders = new Headers();
-  myHeaders.append("Cookie", "sl-session=dOihZlc7Z2nyMmJ8Bd6mWQ==");
-
-  const requestOptions = {
-    method: "GET",
-    headers: myHeaders,
-    redirect: "follow"
-  };
-
-  fetch(`https://api.haozhuma.com/sms/?api=getMessage&token=${smsToken}&sid=83882&phone=${phoneNumber}`, requestOptions)
-    .then((response) => response.json())
-    .then((result) => {
-      console.log(result)
-      callBack(result.yzm)
-    })
-    .catch((error) => console.error(error));
-}
-
-function loginSms(callBack) {
-  if (smsToken != ``) {
-    callBack(smsToken)
-    return
-  }
-  const myHeaders = new Headers();
-
-  const requestOptions = {
-    method: "GET",
-    headers: myHeaders,
-    redirect: "follow"
-  };
-
-  fetch("https://api.haozhuma.com/sms/?api=login&user=d08e283cdc62c91183231c74b7e83c8a395d0ac9923bea2b&pass=fe1b8cabe23b385188b9ec15a392fcd99c4f9651342704b95921060810d0571c", requestOptions)
-    .then((response) => response.json())
-    .then((result) => {
-      smsToken = result.token
-      callBack(smsToken)
-    })
-    .catch((error) => console.error(error));
-}
-
-function getNewPhone(callBack) {
-  loginSms((smsToken) => {
-    const myHeaders = new Headers();
-
-    const requestOptions = {
-      method: "GET",
-      headers: myHeaders,
-      redirect: "follow"
-    };
-
-    fetch(`https://api.haozhuma.com/sms/?api=getPhone&token=${smsToken}&sid=83882`, requestOptions)
-      .then((response) => response.json())
-      .then((result) => {
-        console.log(result)
-        phoneNumber = result.phone
-        callBack(result.phone)
-      })
-      .catch((error) => console.error(error));
-  })
-}
-
-function mockInput(element, newValue) {
-  
-  // 统一处理值设置
-  if (element.type === 'checkbox' || element.type === 'radio') {
-      element.checked = Boolean(newValue);
-  } else if (element.tagName === 'SELECT' && element.multiple) {
-      // 多选select
-      const values = Array.isArray(newValue) ? newValue : [newValue];
-      Array.from(element.options).forEach(option => {
-          option.selected = values.includes(option.value);
-      });
-  } else if (element.isContentEditable) {
-      // 可编辑元素
-      element.innerHTML = newValue;
-  } else {
-      // 普通input/textarea/select
-      element.value = newValue;
-  }
-  
-  // 触发所有可能的事件
-  const events = [
-      'input',           // Vue/React/Svelte
-      'change',          // 传统框架
-      'blur',            // 表单验证
-      'keyup',           // 键盘事件
-      'keydown',
-      'keypress'
-  ];
-  
-  events.forEach(eventType => {
-      element.dispatchEvent(new Event(eventType, {
-          bubbles: true,
-          cancelable: true
-      }));
-  });
-  
-  // 额外处理特殊事件
-  if (element.type === 'checkbox' || element.type === 'radio') {
-      element.dispatchEvent(new Event('click', { bubbles: true }));
-  }
-  
-  // 等待下一个事件循环,确保事件处理完成
-  setTimeout(() => {
-      // 再次触发change事件,确保异步处理完成
-      element.dispatchEvent(new Event('change', { bubbles: true }));
-  }, 0);
-}
-
-const nameList = ["张明辉","王思雅","李浩然","刘雨婷","陈一鸣","杨晓梦","赵天宇","黄诗涵","周俊杰","吴雨欣","徐子轩","孙婉清","朱文博","马雪梅","胡宇航","林静怡","郭浩然","何佳琪","高晨旭","郑欣怡","梁家豪","谢雨薇","宋逸飞","唐雨萱","董子健","袁梦洁","邓浩然","许雅婷","韩星辰","崔语嫣","曾一凡","彭梓轩","苏雨晨","蒋文静","蔡天佑","余思雨","杜宇飞","魏佳欣","程宇轩","叶晓晓","吕浩然","丁雨桐","任俊熙","白若雪","江辰逸","田雨萌","姜明哲","孟诗雨","钟浩然","方雨欣","石宇航","廖梦琪","熊子涵","陆文昊","秦雨萱","贺一鸣","谭思雅","邹俊杰","贾静雯","史雨晨","范佳琪","曹天宇","严诗涵","钱浩然","潘晓梦","田一凡","董雨婷","孙文博","周雪梅","吴宇航","郑静怡","王浩然","李佳琪","张晨旭","刘欣怡","陈佳豪","杨雨薇","赵逸飞","黄雨萱","周子健","吴梦洁","徐浩然","孙雅婷","朱星辰","马语嫣","胡一凡","林梓轩","郭雨晨","何文静","高天佑","郑思雨","梁宇飞","谢佳欣","宋宇轩","唐晓晓","董浩然","袁雨桐","邓俊熙","许若雪","韩辰逸"]
-
-function getRandomItem(arr) {
-  const randomIndex = Math.floor(Math.random() * arr.length);
-  return arr[randomIndex];
-}
-function randomChineseString(n = 1) {
-  let result = '';
-  for (let i = 0; i < n; i++) {
-    result += String.fromCharCode(0x4e00 + Math.floor(Math.random() * 20992));
-  }
-  return result;
-}
-function generateRandomString(length = null) {
-  // 如果未指定长度,随机生成7或8个字符
-  const charCount = length || Math.floor(Math.random() * 2) + 7;
-  
-  const chars = 'abcdefghijklmnopqrstuvwxyz';
-  let result = '';
-  
-  for (let i = 0; i < charCount; i++) {
-    const randomIndex = Math.floor(Math.random() * chars.length);
-    result += chars[randomIndex];
-  }
-  
-  return result;
-}
-
-function getCurrentDateYYYYMMDD() {
-  const date = new Date();
-  const year = date.getFullYear();
-  const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始,所以要+1
-  const day = String(date.getDate()).padStart(2, '0');
-  return `${year}${month}${day}`;
-}
-
-/**
- * 生成乱码风格的假地址
- * @param {number} complexity 复杂度级别(1-5)
- * @returns {string} 假地址
- */
-function generateFakeAddress(complexity = 3) {
-  // 乱码字符集
-  const chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_+-=[]{}|;:,.<>?/~`"\'\\';
-  const chineseChars = '的一是不了在人有的我他会国地要和国人为这个我们到来上对他生大要面说不道也着就那你到得过和生时为对要能于下而子过那说后自之们所过前然家事成开如都方后分经种还看对作里天去可对没发展现起分将两民现学发级动同进里法现行种过命度革而多子后自重机里电心力实里定深法表着水理化争现所二政三好十战无农使性前等反体合斗路图把结第里正新开论之物从当两些还天资事队批如应形想制心样干都向变关点育重其思与间内去因件日利相由压员气业代全组数果期导平各基或月毛然问比展那它最及外没看治提五解系林者米群头意只明四道马认次文通但条较克又公孔领军流入接席位情运器并习原油放立题质指建区验活众很教决特此常石强极土少已根共直团统式转别造切九你取西持总料连任志观调七么山程百报更见必真保热委手改管处己将修支识病象几先老光专什六型具示复安带每东增则完风回南广劳轮科北打积车计给节做务被整联步类集号列温装即毫轴知研单色坚据速防史拉世设达尔场织历花受求传口断况采精金界品判参层止边清至万确究书低术状厂须离再目海交权且儿青才证越际八试规斯近注办布门铁需走议县兵虫固除般引齿千胜细影济白格效置推空配刀叶率今选养德话查差半敌始片施响收华觉备名红续均药标记难存测土身液紧派准斤角降维板许破述技消底床田势端感往神便圆村构照容非搞亚磨族';
-  
-  // 地址关键词(故意打乱)
-  const fakePrefixes = [
-    '乱码', '虚拟', '测试', '假', '模拟', '临时', '虚拟现实',
-    '不存在', '幻想', '梦境', '随机', '系统生成', '代码区',
-    '数字', '数据', '程序', '算法', '函数', '变量'
-  ];
-  
-  const fakeMiddle = [
-    '大街', '胡同', '弄堂', '巷子', '路', '大道', '街',
-    '广场', '中心', '大厦', '小区', '花园', '别墅', '公寓',
-    '工业区', '科技园', '开发区', '新区', '旧区'
-  ];
-  
-  const fakeSuffixes = [
-    '号', '幢', '栋', '单元', '层', '室', '房间', '门',
-    '位置', '坐标', '节点', '区块', '内存地址', '指针'
-  ];
-  
-  // 生成随机乱码字符串
-  function generateGibberish(length) {
-    let result = '';
-    for (let i = 0; i < length; i++) {
-      const charSet = Math.random() > 0.7 ? chineseChars : chars;
-      result += charSet[Math.floor(Math.random() * charSet.length)];
-    }
-    return result;
-  }
-  
-  // 生成不同复杂度的地址
-  let address = '';
-  
-  switch(complexity) {
-    case 1: // 简单乱码
-      address = `${generateGibberish(4)}${fakeMiddle[Math.floor(Math.random() * fakeMiddle.length)]}`;
-      break;
-      
-    case 2: // 中等乱码
-      address = `${fakePrefixes[Math.floor(Math.random() * fakePrefixes.length)]}${generateGibberish(3)}${fakeMiddle[Math.floor(Math.random() * fakeMiddle.length)]}公司`;
-      break;
-      
-    case 3: // 标准乱码(推荐)
-      const part1 = fakePrefixes[Math.floor(Math.random() * fakePrefixes.length)];
-      const part2 = generateGibberish(2);
-      const part3 = fakeMiddle[Math.floor(Math.random() * fakeMiddle.length)];
-      const part4 = Math.floor(Math.random() * 999) + 1;
-      const part5 = fakeSuffixes[Math.floor(Math.random() * fakeSuffixes.length)];
-      address = `${part1}${part2}${part3}${part4}${part5}公司`;
-      break;
-      
-    case 4: // 复杂乱码
-      const pieces = [];
-      for (let i = 0; i < 4; i++) {
-        pieces.push(generateGibberish(3));
-      }
-      address = `${pieces.join('-')}/${fakeMiddle[Math.floor(Math.random() * fakeMiddle.length)]}#${Math.floor(Math.random() * 9999)}`;
-      break;
-      
-    case 5: // 完全乱码
-      address = generateGibberish(15);
-      break;
-      
-    default:
-      address = `${Math.random().toString(36).substr(2, 8)}`;
-  }
-  
-  return address;
-}
-
-function loginOut() {
-  document.querySelectorAll('.menu-item')[1].click()
-  setTimeout(() => {
-    document.querySelectorAll('.el-message-box button')[2].click()
-  }, 1000);
-}
-
-
-
-
-function setData(elementDocument) {
-  elementDocument.querySelector('.el-input__inner').value = getRandomItem(nameList)
-
-
-  mockInput(elementDocument.querySelectorAll('.el-input__inner')[2], randomChineseString(6))
-  setTimeout(() => {
-      // 随便选一个
-      getRandomItem(elementDocument.querySelectorAll('.el-scrollbar li')).click()
-      setTimeout(() => {
-          elementDocument.querySelector('.el-message-box__btns .el-button').click()
-      }, 1000);
-  }, 1000);
-
-
-  // 随机选地区
-  elementDocument.querySelectorAll('.el-input__inner')[3].click()
-  setTimeout(() => {
-      getRandomItem(elementDocument.querySelectorAll('#pane-0 li span')).click()
-      setTimeout(() => {
-          if (elementDocument.querySelectorAll('#pane-1 li span').length > 0) {
-              getRandomItem(elementDocument.querySelectorAll('#pane-1 li span')).click()
-          }
-          setTimeout(() => {
-              if (elementDocument.querySelectorAll('#pane-2 li span').length > 0) {
-                  getRandomItem(elementDocument.querySelectorAll('#pane-2 li span')).click()
-              }
-              setTimeout(() => {
-                  if (elementDocument.querySelectorAll('#pane-3 li span').length > 0) {
-                      getRandomItem(elementDocument.querySelectorAll('#pane-3 li span')).click()
-                  }
-              }, 800);
-          }, 800);
-      }, 800);
-  }, 800);
-
-
-  mockInput(elementDocument.querySelectorAll('.el-input__inner')[4], generateFakeAddress(2))
-  setTimeout(() => {
-      window.cityTemp = elementDocument.querySelectorAll('.el-input__inner')[3].value.split('/')[0]
-      elementDocument.querySelector('.footer-area button').click()
-  }, 4000);
-}
-
-
-setInterval(() => {
-  console.log('开始执行脚本')
-  // 切换手机登录
-  if (document.querySelector('.switch-login-tip') && document.querySelector('.switch-login-tip').innerText == '切换手机登录') {
-    document.querySelector('.switch-login-tip').click()
-  }
-  // 切换短信登陆
-  if (document.querySelector('#tab-sms')) {
-    if (document.querySelector('#tab-sms').classList.contains('is-active')) {
-      // 获取手机
-      if (document.querySelectorAll('#pane-sms input')[0]) {
-        // 判断手机号没有输入
-        if (phoneNumber == '') {
-          getNewPhone((phoneNumber) => {
-            mockInput(document.querySelectorAll('#pane-sms input')[0], phoneNumber)
-            setTimeout(() => {
-              document.querySelectorAll('.agreement-tips .el-checkbox__inner')[1].click()
-              document.querySelector('.smsCodeWrapper .el-button').click()
-            }, 1000);
-          })
-        // 获取验证码
-        } else {
-          getSms((yzm) => {
-            mockInput(document.querySelectorAll('#pane-sms input')[1], yzm)
-            setTimeout(() => {
-              document.querySelector('#pane-sms .el-button.submit').click()
-            }, 800);
-          })
-        }
-      }
-      
-    } else {
-      document.querySelector('#tab-sms').click()
-    }
-  }
-  // 跳过先看看
-  if (document.querySelector('.skip-btn')) {
-    document.querySelector('.skip-btn').click()
-  }
-  if (location.href.startsWith('https://uc.ky-express.com/netc-pc-web-offline/1.570.116/#/admin/home')) {
-    location.href = 'https://uc.ky-express.com/netc-pc-web-offline/1.570.116/#/admin/user?pre_click_id=504_1768288567464&timeStamp=1768288567656&realRoutePath=%252Fadmin%252Fuser%252FcusCode'
-  }
-  
-  // 判断iframe
-  document.querySelectorAll('iframe').forEach(element => {
-    const elementDocument = element.contentDocument || element.contentWindow.document;
-    // 判断是否申请成功了
-    
-    if (elementDocument.querySelector('.wxwork-qrcode__qrcode')) {
-      console.log('suscess')
-      loginOut();
-      return
-    }
-    // 申请专属商务
-    if (elementDocument.querySelectorAll('.cusCode .apply-btn')[1]) {
-      elementDocument.querySelectorAll('.cusCode .apply-btn')[1].click()
-    }
-    // 判断提交框
-    if (elementDocument.querySelector('.footer-area button') && elementDocument.querySelector('.footer-area button').innerText == '提交申请') {
-      setData(elementDocument)
-    }
-  });
-
-  // 判断已成功
-  document.querySelectorAll('iframe').forEach(element => {
-    const elementDocument = element.contentDocument || element.contentWindow.document;
-    // 判断提交框
-    if (elementDocument.querySelector('.result-contact.success .el-image img')) {
-      
-      downloadFileInternal(
-        elementDocument.querySelector('.result-contact.success .el-image img').src,
-        elementDocument.querySelector('.business-info .name').innerText + '.png',
-        `${getCurrentDateYYYYMMDD()}-${window.cityTemp}/`
-      ).then(result => {
-        if (result.success) {
-          console.log('下载成功:', result.path);
-          loginOut();
-        } else {
-          console.error('下载失败:', result.error);
-        }
-      });
-    }
-  });
-}, 4000);