mirror of
https://github.com/6dylan6/jdpro.git
synced 2026-03-22 11:18:59 +00:00
Compare commits
2 Commits
f08a56079e
...
6d5fe77c5e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6d5fe77c5e | ||
|
|
e728927401 |
34
README.md
34
README.md
@ -6,7 +6,7 @@
|
|||||||
### [TG CHANEL](https://t.me/dylan_jdpro)
|
### [TG CHANEL](https://t.me/dylan_jdpro)
|
||||||
|
|
||||||
|
|
||||||
国内机(带代理):
|
国内机(带加速,也不太稳):
|
||||||
|
|
||||||
```
|
```
|
||||||
ql repo https://js.googo.win/https://github.com/6dylan6/jdpro.git "jd_|jx_|jddj_" "backUp" "^jd[^_]|USER|JD|function|sendNotify|utils"
|
ql repo https://js.googo.win/https://github.com/6dylan6/jdpro.git "jd_|jx_|jddj_" "backUp" "^jd[^_]|USER|JD|function|sendNotify|utils"
|
||||||
@ -22,17 +22,14 @@ ql repo https://github.com/6dylan6/jdpro.git "jd_|jx_|jddj_" "backUp" "^jd[^_]|U
|
|||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
线报监控类,[入口](https://github.com/6dylan6/jdm.git)
|
|
||||||
|
|
||||||
|
## 使用
|
||||||
|
|
||||||
|
1、部署青龙登陆,版本不用追新,稳定才好,推荐部署到内网(不要外网访问,2.20.2以下版本面板会被免密登录偷家,如果必须外网就用最新版本吧)。
|
||||||
## 简要流程
|
|
||||||
|
|
||||||
1、部署青龙并登陆,版本不用追新,稳定才好,推荐whyour/qinglong:2.17.9镜像部署。
|
|
||||||
|
|
||||||
2、到订阅管理创建订阅并运行;正确配置[参考](https://github.com/6dylan6/jdpro/issues/22)
|
2、到订阅管理创建订阅并运行;正确配置[参考](https://github.com/6dylan6/jdpro/issues/22)
|
||||||
|
|
||||||
3、订阅执行完,到定时任务搜索依赖安装(jd_indeps.sh)任务执行;
|
3、订阅执行完,到定时任务搜索依赖安装(jd_indeps)任务执行;
|
||||||
|
|
||||||
4、到环境变量,创建变量,名称: JD_COOKIE,值:抓的CK(要安全就手抓),多个每行建一个,不要全写在一个;
|
4、到环境变量,创建变量,名称: JD_COOKIE,值:抓的CK(要安全就手抓),多个每行建一个,不要全写在一个;
|
||||||
|
|
||||||
@ -75,26 +72,11 @@ export NOTIFY_SHOWNAMETYPE="4" 效果是 : 账号名称:备注
|
|||||||
|
|
||||||
5、建议调整任务运行超时时间,青龙默认1小时有些跑不完就被强制结束,config.sh里配置。CommandTimeoutTime="3h" 即改为3小时,根据自己ck数量调整。
|
5、建议调整任务运行超时时间,青龙默认1小时有些跑不完就被强制结束,config.sh里配置。CommandTimeoutTime="3h" 即改为3小时,根据自己ck数量调整。
|
||||||
|
|
||||||
6、如需禁止某些CK参加所有活动或某些活动功能,实现重组CK顺序功能,包括随机、优先、轮换、组队、分段等功能,把[task_before](./docker/task_before.sh)文件内容复制到配置管理task_before.sh保存
|
|
||||||
|
|
||||||
常用变量举例:
|
|
||||||
|
|
||||||
Recombin_CK_Mode="1" 全部顺序随机
|
|
||||||
|
|
||||||
Recombin_CK_Mode="2" Recombin_CK_ARG1="15" 假设有100个CK,前15个CK按正常顺序靠前,其余CK随机乱序
|
|
||||||
|
|
||||||
Recombin_CK_Mode="3" Recombin_CK_ARG1="5" Recombin_CK_ARG2="5" 假设有100个CK,希望前5个账号始终保持在前部,剩余95个账号按照轮换模式每天轮换5个
|
|
||||||
|
|
||||||
其他用法具体参考[文档](https://docs.qq.com/doc/DTXh6QUVjRXJ1TFdN)
|
|
||||||
</code></pre>
|
|
||||||
</details>
|
|
||||||
|
|
||||||
|
|
||||||
## 通用环境变量(到配置管理-config.sh里添加变量,export xxx='xxx'格式)
|
## 通用环境变量(到配置管理-config.sh里添加变量,export xxx='xxx'格式)
|
||||||
|
|
||||||
AUTOCFG='true' 自动配置sendNotify文件到deps目录
|
AUTOCFG='true' 自动配置sendNotify文件到deps目录
|
||||||
|
|
||||||
代理API模式部分支持
|
代理API模式(API代理是通过url接得到随机可用代理ip,格式是:xxx.xxx.xxx.xxx:xxxx)
|
||||||
|
|
||||||
DY_PROXY='URL1#URL2' 多个#分割
|
DY_PROXY='URL1#URL2' 多个#分割
|
||||||
|
|
||||||
@ -104,15 +86,15 @@ DY_PROXY_RENUM='5' 获取IP失败重试次数
|
|||||||
|
|
||||||
DY_PROXY_REDELAY='3' 获取失败重试间隔 单位秒
|
DY_PROXY_REDELAY='3' 获取失败重试间隔 单位秒
|
||||||
|
|
||||||
****API代理的意思就是通过url得到随机可用代理,response的格式就是:xxx.xxx.xxx.xxx:xxxx**
|
|
||||||
|
|
||||||
代理池模式支持全部js
|
|
||||||
|
代理池模式(就是一个代理服务器的地址)
|
||||||
|
|
||||||
DP_POOL='http://xxx' 代理池url
|
DP_POOL='http://xxx' 代理池url
|
||||||
|
|
||||||
PERMIT_JS='farm&plant&opencard' 需要走代理池的js关键词,多个&分割(可不设置,如果不设置就是所有的js都会走)
|
PERMIT_JS='farm&plant&opencard' 需要走代理池的js关键词,多个&分割(可不设置,如果不设置就是所有的js都会走)
|
||||||
|
|
||||||
**代理池是一个固定不变的地址,通过这个地址服务,服务会自动转发请求到可用代理,本质上代理池就是一个代理服务器**
|
|
||||||
|
|
||||||
BANPIN 禁止某pin执行任务
|
BANPIN 禁止某pin执行任务
|
||||||
|
|
||||||
|
|||||||
@ -96,7 +96,7 @@ if (process.env.ALLOWPIN) {
|
|||||||
console.log(`\n====================共${CookieJDs.length}个京东账号Cookie=================`);
|
console.log(`\n====================共${CookieJDs.length}个京东账号Cookie=================`);
|
||||||
console.log(`===========脚本执行时间:${formatdate(new Date(new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000))}============`);
|
console.log(`===========脚本执行时间:${formatdate(new Date(new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000))}============`);
|
||||||
console.log('>>>>>>>>>>>>6dylan6提醒您:有问题先更新不行在反馈>>>>>>>>>>>>>\n');
|
console.log('>>>>>>>>>>>>6dylan6提醒您:有问题先更新不行在反馈>>>>>>>>>>>>>\n');
|
||||||
console.log(`Tips:到客户服务-在线客服发'火爆',如出滑块就拼一下会解除一些活动火爆\n`);
|
console.log(`Tips:‼️青龙2.20.2以下版本不要外网访问,已被爆破可任意登录!必须要外网的就升级青龙吧\n`);
|
||||||
|
|
||||||
for (let i = 0; i < CookieJDs.length; i++) {
|
for (let i = 0; i < CookieJDs.length; i++) {
|
||||||
if (!CookieJDs[i].match(/pt_pin=(.+?);/) || !CookieJDs[i].match(/pt_key=(.+?);/)) console.log(`\n提示:京东cookie 【${CookieJDs[i]}】填写不规范,可能会影响部分脚本正常使用。正确格式为: pt_key=xxx;pt_pin=xxx;(分号;不可少)\n`);
|
if (!CookieJDs[i].match(/pt_pin=(.+?);/) || !CookieJDs[i].match(/pt_key=(.+?);/)) console.log(`\n提示:京东cookie 【${CookieJDs[i]}】填写不规范,可能会影响部分脚本正常使用。正确格式为: pt_key=xxx;pt_pin=xxx;(分号;不可少)\n`);
|
||||||
|
|||||||
127
jd_clean_muma.py
127
jd_clean_muma.py
@ -1,127 +0,0 @@
|
|||||||
# !/usr/bin/env python3
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
#最近由于很多中木马病毒,仅对该木马做检测清除
|
|
||||||
'''
|
|
||||||
new Env('病毒检测清除');
|
|
||||||
8 8 29 2 * jd_clean_muma.py
|
|
||||||
'''
|
|
||||||
import os
|
|
||||||
import shutil
|
|
||||||
import subprocess
|
|
||||||
import sys
|
|
||||||
|
|
||||||
def get_malicious_pids(process_name):
|
|
||||||
try:
|
|
||||||
result = subprocess.run(['pgrep', '-f', process_name], capture_output=True, text=True)
|
|
||||||
if result.returncode == 0:
|
|
||||||
return result.stdout.strip().split('\n')
|
|
||||||
except Exception:
|
|
||||||
pass
|
|
||||||
return []
|
|
||||||
|
|
||||||
def clean_config_file(config_file_path):
|
|
||||||
if not os.path.exists(config_file_path):
|
|
||||||
return False
|
|
||||||
|
|
||||||
# 备份原始文件
|
|
||||||
backup_file_path = f"{config_file_path}.bak"
|
|
||||||
try:
|
|
||||||
shutil.copyfile(config_file_path, backup_file_path)
|
|
||||||
except Exception as e:
|
|
||||||
print(f"警告:备份文件失败: {e}")
|
|
||||||
|
|
||||||
try:
|
|
||||||
with open(config_file_path, 'r', encoding='utf-8', errors='ignore') as f:
|
|
||||||
lines = f.readlines()
|
|
||||||
except Exception as e:
|
|
||||||
print(f"错误:读取文件 {config_file_path} 失败: {e}")
|
|
||||||
return False
|
|
||||||
|
|
||||||
malicious_keywords = [
|
|
||||||
".fullgc",
|
|
||||||
"551911.xyz",
|
|
||||||
"fullgc-linux",
|
|
||||||
"fullgc-macos",
|
|
||||||
"QL_DIR:-/ql}/data/db",
|
|
||||||
"chmod",
|
|
||||||
"curl",
|
|
||||||
"{",
|
|
||||||
"}",
|
|
||||||
"nohup \"$b\" >/dev/null 2>&1 &"
|
|
||||||
]
|
|
||||||
|
|
||||||
new_lines = []
|
|
||||||
removed_count = 0
|
|
||||||
for line in lines:
|
|
||||||
is_malicious = False
|
|
||||||
for keyword in malicious_keywords:
|
|
||||||
if keyword in line:
|
|
||||||
is_malicious = True
|
|
||||||
break
|
|
||||||
|
|
||||||
if is_malicious:
|
|
||||||
removed_count += 1
|
|
||||||
print(f"发现并移除恶意行: {line.strip()}")
|
|
||||||
else:
|
|
||||||
new_lines.append(line)
|
|
||||||
|
|
||||||
if removed_count > 0:
|
|
||||||
try:
|
|
||||||
temp_file_path = f"{config_file_path}.tmp"
|
|
||||||
with open(temp_file_path, 'w', encoding='utf-8') as f:
|
|
||||||
f.writelines(new_lines)
|
|
||||||
shutil.move(temp_file_path, config_file_path)
|
|
||||||
print(f"成功从 {config_file_path} 中清除 {removed_count} 行恶意代码。")
|
|
||||||
return True
|
|
||||||
except Exception as e:
|
|
||||||
print(f"错误:写入或替换文件 {config_file_path} 失败: {e}")
|
|
||||||
return False
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
MALICIOUS_PROCESS_NAME = ".fullgc"
|
|
||||||
MALICIOUS_FILE = "/ql/data/db/.fullgc"
|
|
||||||
|
|
||||||
print(f"--- 开始木马检测 [{MALICIOUS_PROCESS_NAME}] ---")
|
|
||||||
|
|
||||||
pids = get_malicious_pids(MALICIOUS_PROCESS_NAME)
|
|
||||||
if not pids:
|
|
||||||
print(f"未发现名为 '{MALICIOUS_PROCESS_NAME}' 的木马进程。请注意安全,不要开到公网访问,不要弱密码!!!")
|
|
||||||
sys.exit(0)
|
|
||||||
|
|
||||||
print(f"‼️警告:发现 {len(pids)} 个木马进程,PID 列表: {', '.join(pids)}")
|
|
||||||
print(f"正在强制终止这些进程...")
|
|
||||||
try:
|
|
||||||
subprocess.run(['pkill', '-9', '-f', MALICIOUS_PROCESS_NAME], capture_output=True)
|
|
||||||
print(f"✅已成功终止所有木马进程。")
|
|
||||||
except Exception as e:
|
|
||||||
print(f"终止进程时发生错误: {e}")
|
|
||||||
|
|
||||||
if os.path.exists(MALICIOUS_FILE):
|
|
||||||
print(f"‼️发现恶意文件 '{MALICIOUS_FILE}',正在删除...")
|
|
||||||
try:
|
|
||||||
os.remove(MALICIOUS_FILE)
|
|
||||||
print(f"✅恶意文件 '{MALICIOUS_FILE}' 已删除。")
|
|
||||||
except Exception as e:
|
|
||||||
print(f"警告:无法删除恶意文件: {e}")
|
|
||||||
|
|
||||||
print(f"正在清理配置文件中的持久化代码...")
|
|
||||||
config_paths = ["/ql/data/config/config.sh", "/ql/config/config.sh"]
|
|
||||||
for path in config_paths:
|
|
||||||
if os.path.exists(path):
|
|
||||||
clean_config_file(path)
|
|
||||||
print("正在扫描 /ql/data/db/ 目录下的其他可疑隐藏文件...")
|
|
||||||
if os.path.exists("/ql/data/db/"):
|
|
||||||
found_suspicious = False
|
|
||||||
for root, _, files in os.walk("/ql/data/db/"):
|
|
||||||
for file in files:
|
|
||||||
if file.startswith('.') and not file.endswith('.db'):
|
|
||||||
file_path = os.path.join(root, file)
|
|
||||||
if os.access(file_path, os.X_OK):
|
|
||||||
print(f"警告:发现可疑隐藏执行文件: {file_path}")
|
|
||||||
found_suspicious = True
|
|
||||||
if not found_suspicious:
|
|
||||||
print("未发现其他可疑隐藏文件。")
|
|
||||||
|
|
||||||
print("--- 木马清理过程全部完成 ---")
|
|
||||||
print("🚫🚫面板不要开到公网上访问,等待漏洞修复,以免再次中招!!!修改登录密码,不要弱密码")
|
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user