This commit is contained in:
Liwanyi 2023-06-01 11:06:30 +08:00
parent 8d8b78c6a1
commit 7b661965a9
5 changed files with 69 additions and 17 deletions

View File

@ -5,6 +5,14 @@
# CHANGE # CHANGE
## 0.9.6
2023年06月01日
### 添加
- PC病毒快速操作
## 0.9.5 ## 0.9.5
2023年05月31日 2023年05月31日

View File

@ -1,6 +1,6 @@
{ {
"name": "wuhu-torn-helper", "name": "wuhu-torn-helper",
"version": "0.9.5", "version": "0.9.6",
"description": "芜湖助手", "description": "芜湖助手",
"scripts": { "scripts": {
"release": "cross-env NODE_ENV=production rollup -c && node build.mjs", "release": "cross-env NODE_ENV=production rollup -c && node build.mjs",

File diff suppressed because one or more lines are too long

View File

@ -79,7 +79,6 @@ import { inject, ref, shallowRef } from 'vue';
import { LoggerKey } from "../ts/class/Logger"; import { LoggerKey } from "../ts/class/Logger";
import ForeignStock from "./ForeignStock.vue"; import ForeignStock from "./ForeignStock.vue";
import { MoonNight } from "@element-plus/icons-vue"; import { MoonNight } from "@element-plus/icons-vue";
// import { ArrowRight, MoonNight } from "@element-plus/icons-vue";
import Config from "./Config.vue"; import Config from "./Config.vue";
import { QuickGymTrainKey } from "../ts/class/action/QuickGymTrain"; import { QuickGymTrainKey } from "../ts/class/action/QuickGymTrain";
import { BATTLE_STAT } from "../ts/class/utils/NetHighLvlWrapper"; import { BATTLE_STAT } from "../ts/class/utils/NetHighLvlWrapper";
@ -89,6 +88,7 @@ import QuickCrime from "./QuickCrime.vue";
import EventsViewer from "./EventsViewer.vue"; import EventsViewer from "./EventsViewer.vue";
import CityUItems from "./CityUItems.vue"; import CityUItems from "./CityUItems.vue";
import AutoLoginForm from "./AutoLoginForm.vue"; import AutoLoginForm from "./AutoLoginForm.vue";
import VirusProgramming from "./VirusProgramming.vue";
const logger = inject(LoggerKey); const logger = inject(LoggerKey);
const quickGymTrain = inject(QuickGymTrainKey); const quickGymTrain = inject(QuickGymTrainKey);
@ -184,18 +184,10 @@ const menuItemList = [
title: '🩼 配置自动登陆', title: '🩼 配置自动登陆',
template: AutoLoginForm, template: AutoLoginForm,
}, },
// { {
// title: '🔫 LOOT', title: '💻 PC',
// template: Test, template: VirusProgramming,
// }, },
// {
// title: '👮 NNB',
// template: ForeignStock,
// },
// {
// title: '🖥 ',
// template: () => ElMessage('this is a message.'),
// },
{ {
title: '⚙️ 插件配置', title: '⚙️ 插件配置',
template: Config, template: Config,

View File

@ -0,0 +1,52 @@
<template>
<div>
<el-button type="primary" @click="doProgramVirus(false)">造简单病毒</el-button>
<el-button type="danger" @click="doProgramVirus(true)">取消病毒编程</el-button>
</div>
<div v-loading="loading" v-html="html"></div>
</template>
<script lang="ts">
export default {
name: "VirusProgramming"
}
</script>
<script lang="ts" setup>
import { inject, ref } from "vue";
import { LoggerKey } from "../ts/class/Logger";
const logger = inject(LoggerKey);
const html = ref('');
const loading = ref(false);
const doProgramVirus = async (isCancel: boolean) => {
loading.value = true;
html.value = '';
try {
html.value = await (await fetch(window.addRFC("https://www.torn.com/pc.php"), {
"headers": {
"accept": "*/*",
"content-type": "application/x-www-form-urlencoded; charset=UTF-8",
"sec-ch-ua-mobile": "?0",
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "same-origin",
"x-requested-with": "XMLHttpRequest"
},
"referrer": "https://www.torn.com/pc.php",
"referrerPolicy": "strict-origin-when-cross-origin",
"body": isCancel ? "step=cancelProgramming" : "step=startProgramming&type=simple",
"method": "POST",
"mode": "cors",
"credentials": "include"
})).text();
} catch (e) {
logger.error(e.stack);
}
loading.value = false;
};
</script>
<style scoped>
</style>