mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-10 01:49:25 +08:00
Compare commits
6
Commits
ee9e154fec
...
8ac1d78053
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8ac1d78053 | ||
|
|
468d6d7752 | ||
|
|
f49d789411 | ||
|
|
1f56115fbb | ||
|
|
20d277102e | ||
|
|
47b4036f09 |
@@ -27,6 +27,34 @@ function owPostN(method, args, callback){
|
|||||||
},'json');
|
},'json');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function owPostCallback(method, version, args,callback){
|
||||||
|
var loadT = layer.msg('正在获取...', { icon: 16, time: 0, shade: 0.3 });
|
||||||
|
|
||||||
|
var req_data = {};
|
||||||
|
req_data['name'] = 'op_waf';
|
||||||
|
req_data['script']='op_waf_index';
|
||||||
|
req_data['func'] = method;
|
||||||
|
args['version'] = version;
|
||||||
|
|
||||||
|
if (typeof(args) == 'string'){
|
||||||
|
req_data['args'] = JSON.stringify(str2Obj(args));
|
||||||
|
} else {
|
||||||
|
req_data['args'] = JSON.stringify(args);
|
||||||
|
}
|
||||||
|
|
||||||
|
$.post('/plugins/callback', req_data, function(data) {
|
||||||
|
layer.close(loadT);
|
||||||
|
if (!data.status){
|
||||||
|
layer.msg(data.msg,{icon:0,time:2000,shade: [0.3, '#000']});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(typeof(callback) == 'function'){
|
||||||
|
callback(data);
|
||||||
|
}
|
||||||
|
},'json');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function getRuleByName(rule_name, callback){
|
function getRuleByName(rule_name, callback){
|
||||||
owPost('get_rule', {rule_name:rule_name}, function(data){
|
owPost('get_rule', {rule_name:rule_name}, function(data){
|
||||||
@@ -1593,7 +1621,7 @@ function siteWafConfig(siteName, type) {
|
|||||||
|
|
||||||
|
|
||||||
function wafSite(){
|
function wafSite(){
|
||||||
owPost('get_site_config', {}, function(data){
|
owPostCallback('get_site_config', "", {}, function(data){
|
||||||
var tmp = $.parseJSON(data.data);
|
var tmp = $.parseJSON(data.data);
|
||||||
var rdata = $.parseJSON(tmp.data);
|
var rdata = $.parseJSON(tmp.data);
|
||||||
var tbody = '';
|
var tbody = '';
|
||||||
|
|||||||
Executable
+1458
File diff suppressed because it is too large
Load Diff
@@ -14,6 +14,9 @@ export PATH
|
|||||||
# apt install ncat -y
|
# apt install ncat -y
|
||||||
# nc -u -v www.xx.com 443
|
# nc -u -v www.xx.com 443
|
||||||
|
|
||||||
|
# /www/server/openresty/bin/openresty -v
|
||||||
|
# service openresty restart
|
||||||
|
|
||||||
# cd /www/server/mdserver-web && python3 plugins/openresty/index.py run_info
|
# cd /www/server/mdserver-web && python3 plugins/openresty/index.py run_info
|
||||||
|
|
||||||
curPath=`pwd`
|
curPath=`pwd`
|
||||||
|
|||||||
@@ -1,94 +0,0 @@
|
|||||||
# coding:utf-8
|
|
||||||
|
|
||||||
import sys
|
|
||||||
import io
|
|
||||||
import os
|
|
||||||
import time
|
|
||||||
import re
|
|
||||||
import json
|
|
||||||
import base64
|
|
||||||
import threading
|
|
||||||
|
|
||||||
web_dir = os.getcwd() + "/web"
|
|
||||||
if os.path.exists(web_dir):
|
|
||||||
sys.path.append(web_dir)
|
|
||||||
os.chdir(web_dir)
|
|
||||||
|
|
||||||
import core.mw as mw
|
|
||||||
|
|
||||||
import telebot
|
|
||||||
from telebot import types
|
|
||||||
from telebot.util import quick_markup
|
|
||||||
|
|
||||||
# 广告推送实例
|
|
||||||
|
|
||||||
|
|
||||||
chat_id = -1001578009023
|
|
||||||
# chat_id = 5568699210
|
|
||||||
|
|
||||||
|
|
||||||
def send_msg(bot, tag='ad', trigger_time=300):
|
|
||||||
# 信号只在一个周期内执行一次|start
|
|
||||||
lock_file = mw.getServerDir() + '/tgbot/lock.json'
|
|
||||||
if not os.path.exists(lock_file):
|
|
||||||
mw.writeFile(lock_file, '{}')
|
|
||||||
|
|
||||||
lock_data = json.loads(mw.readFile(lock_file))
|
|
||||||
if tag in lock_data:
|
|
||||||
diff_time = time.time() - lock_data[tag]['do_time']
|
|
||||||
if diff_time >= trigger_time:
|
|
||||||
lock_data[tag]['do_time'] = time.time()
|
|
||||||
else:
|
|
||||||
return False, 0, 0
|
|
||||||
else:
|
|
||||||
lock_data[tag] = {'do_time': time.time()}
|
|
||||||
mw.writeFile(lock_file, json.dumps(lock_data))
|
|
||||||
# 信号只在一个周期内执行一次|end
|
|
||||||
keyboard = [
|
|
||||||
[
|
|
||||||
types.InlineKeyboardButton(
|
|
||||||
text="海内外实名KYC-执照代付✅域名", url='https://t.me/kuadugongzuoshi')
|
|
||||||
],
|
|
||||||
[
|
|
||||||
types.InlineKeyboardButton(
|
|
||||||
text="高价收一切流量 @caifutong555", url='https://t.me/caifutong555')
|
|
||||||
],
|
|
||||||
[
|
|
||||||
types.InlineKeyboardButton(
|
|
||||||
text="18+资源采集", url='https://ckzy1.com')
|
|
||||||
],
|
|
||||||
[
|
|
||||||
types.InlineKeyboardButton(
|
|
||||||
text="实名认证/过人脸🕵️♀️各种账号处理✅", url='https://t.me/niuniu234')
|
|
||||||
],
|
|
||||||
[
|
|
||||||
types.InlineKeyboardButton(
|
|
||||||
text="官网", url='https://github.com/midoks/mdserver-web'),
|
|
||||||
types.InlineKeyboardButton(
|
|
||||||
text="💎DigitalVirt(赞助商)", url='https://digitalvirt.com/aff.php?aff=154')
|
|
||||||
],
|
|
||||||
[
|
|
||||||
types.InlineKeyboardButton(
|
|
||||||
text="论坛", url='https://bbs.midoks.icu'),
|
|
||||||
types.InlineKeyboardButton(
|
|
||||||
text="搜索", url='https://bbs.midoks.icu/search.php'),
|
|
||||||
types.InlineKeyboardButton(
|
|
||||||
text="@ME", url='tg://user?id=5568699210'),
|
|
||||||
types.InlineKeyboardButton(
|
|
||||||
text="300rmb/月", url='tg://user?id=5568699210')
|
|
||||||
]
|
|
||||||
]
|
|
||||||
markup = types.InlineKeyboardMarkup(keyboard)
|
|
||||||
image_file = mw.getPluginDir() + '/tgbot/static/image/ad.png'
|
|
||||||
|
|
||||||
telebot_image = telebot.types.InputFile(image_file)
|
|
||||||
msg = bot.send_photo(chat_id, telebot_image, reply_markup=markup)
|
|
||||||
|
|
||||||
# print(msg.message_id)
|
|
||||||
time.sleep(5 * 60)
|
|
||||||
del_msg = bot.delete_message(chat_id=chat_id, message_id=msg.message_id)
|
|
||||||
# print(del_msg)
|
|
||||||
|
|
||||||
|
|
||||||
def run(bot):
|
|
||||||
send_msg(bot, 'ad', 1 * 60 * 60)
|
|
||||||
@@ -57,6 +57,7 @@ def send_msg(bot, tag='ad', trigger_time=300):
|
|||||||
# 实名认证/过人脸🕵️♀️各种账号处理✅ | 30/m| next,6/30 | @nngzs
|
# 实名认证/过人脸🕵️♀️各种账号处理✅ | 30/m| next,6/30 | @nngzs
|
||||||
# 18+资源采集| 4/m | next,7/14 | @liuxingyu123
|
# 18+资源采集| 4/m | next,7/14 | @liuxingyu123
|
||||||
# 海内外实名KYC-执照代付✅域名| 17/m | next,6/17 | @kdgzs
|
# 海内外实名KYC-执照代付✅域名| 17/m | next,6/17 | @kdgzs
|
||||||
|
# 98影视采集| 21/m | next,11/21 | @liuxingyu123
|
||||||
|
|
||||||
keyboard = [
|
keyboard = [
|
||||||
[
|
[
|
||||||
|
|||||||
@@ -34,7 +34,6 @@ function wsOriginPost(method, version, args, callback){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function wsPost(method, version, args,callback){
|
function wsPost(method, version, args,callback){
|
||||||
var loadT = layer.msg('正在获取...', { icon: 16, time: 0, shade: 0.3 });
|
var loadT = layer.msg('正在获取...', { icon: 16, time: 0, shade: 0.3 });
|
||||||
wsOriginPost(method, version, args,function(data){
|
wsOriginPost(method, version, args,function(data){
|
||||||
@@ -44,8 +43,7 @@ function wsPost(method, version, args,callback){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function wsPostCallback(method, version, args,callback){
|
||||||
function wsPostCallbak(method, version, args,callback){
|
|
||||||
var loadT = layer.msg('正在获取...', { icon: 16, time: 0, shade: 0.3 });
|
var loadT = layer.msg('正在获取...', { icon: 16, time: 0, shade: 0.3 });
|
||||||
|
|
||||||
var req_data = {};
|
var req_data = {};
|
||||||
@@ -2258,7 +2256,7 @@ function wsTableLogRequest(page){
|
|||||||
|
|
||||||
$('#logs_search').attr('req','start');
|
$('#logs_search').attr('req','start');
|
||||||
// wsPost('get_logs_list', '' ,args, function(rdata){
|
// wsPost('get_logs_list', '' ,args, function(rdata){
|
||||||
wsPostCallbak('get_logs_list', '' ,args, function(rdata){
|
wsPostCallback('get_logs_list', '' ,args, function(rdata){
|
||||||
$('#logs_search').attr('req','end');
|
$('#logs_search').attr('req','end');
|
||||||
var rdata = $.parseJSON(rdata.data);
|
var rdata = $.parseJSON(rdata.data);
|
||||||
var list = '';
|
var list = '';
|
||||||
|
|||||||
Reference in New Issue
Block a user