generated from Meekdai/Gmeek-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
blogBase.json
1 lines (1 loc) · 30.8 KB
/
blogBase.json
1
{"singlePage": [], "startSite": "09/29/2024", "filingNum": "", "onePageListNum": 15, "commentLabelColor": "#006b75", "yearColorList": ["#bc4c00", "#0969da", "#1f883d", "#A333D0"], "i18n": "CN", "themeMode": "manual", "dayTheme": "light", "nightTheme": "dark", "urlMode": "pinyin", "script": "<script src='https://blog.meekdai.com/Gmeek/plugins/lightbox.js'></script><script src='https://blog.meekdai.com/Gmeek/plugins/articletoc.js'></script>", "style": "", "head": "", "indexScript": "", "indexStyle": "", "bottomText": "", "showPostSource": 1, "iconList": {}, "UTC": 8, "rssSplit": "sentence", "exlink": {}, "needComment": 1, "allHead": "", "title": "Blog", "subTitle": "\u4ec5\u4f5c\u4e3a\u4e2a\u4eba\u5b66\u4e60\u8f93\u51fa", "avatarUrl": "https://avatars.githubusercontent.com/u/89264167?u=2b839a9613f690b43f7f3fb63ba6b8e0d536f208&v=4", "GMEEK_VERSION": "last", "homeUrl": "https://blog.kfcviwo50.us.kg", "postListJson": {"P1": {"htmlDir": "docs/post/Gmeek-bo-ke-zhi-nan.html", "labels": ["\u65e5\u5e38\u5206\u4eab"], "postTitle": "Gmeek\u535a\u5ba2\u6307\u5357", "postUrl": "post/Gmeek-bo-ke-zhi-nan.html", "postSourceUrl": "https://github.com/ic1123/ic1123.github.io/issues/1", "commentNum": 0, "wordCount": 604, "description": "### Gmeek\u4f5c\u8005\u535a\u5ba2\r\n[Gmeek\u4f5c\u8005\u535a\u5ba2](https://blog.meekdai.com)\r\n\r\n### Mrakdown\u8bed\u6cd5\u7684\u5b9e\u73b0\u6848\u4f8b\uff1a\r\n[Mrakdown\u8bed\u6cd5\u7684\u5b9e\u73b0\u6848\u4f8b](https://diyingisader.github.io/zang_diying.github.io/post/guan-yu-Gmeek%20-bo-ke-%20-%20-dai-ma-%E3%80%81-zhu-ye-she-zhi-de-meng-xin-jiao-cheng.html)\r\n\r\n### \u76f8\u5173\u535a\u5ba2\u4f5c\u8005\r\n[CJW](https://blog.freeblock.cn/) [\u62fe\u5149](https://blog.mado.us.kg/)\r\n### \u76f8\u5173\u89c6\u9891\r\n\r\n`Gmeek-html<iframe src='//player.bilibili.com/player.html?isOutside=true&aid=1305790042&bvid=BV1GM4m1m7ZD&cid=1588230883&p=1&autoplay=0' scrolling='no' border='0' frameborder='no' framespacing='0' allowfullscreen='true' width='100%' height='460px'></iframe>`\u3002", "top": 1, "createdAt": 1727576069, "style": "", "script": "<script src='https://blog.meekdai.com/Gmeek/plugins/lightbox.js'></script><script src='https://blog.meekdai.com/Gmeek/plugins/articletoc.js'></script>", "head": "", "ogImage": "https://avatars.githubusercontent.com/u/89264167?u=2b839a9613f690b43f7f3fb63ba6b8e0d536f208&v=4", "createdDate": "2024-09-29", "dateLabelColor": "#bc4c00"}, "P2": {"htmlDir": "docs/post/vps-bi-mian-bao-li-sao-miao--Fail2ban-an-zhuang.html", "labels": ["\u6280\u672f\u5b66\u4e60", "VPS"], "postTitle": "vps\u907f\u514d\u66b4\u529b\u626b\u63cf-Fail2ban\u5b89\u88c5", "postUrl": "post/vps-bi-mian-bao-li-sao-miao--Fail2ban-an-zhuang.html", "postSourceUrl": "https://github.com/ic1123/ic1123.github.io/issues/2", "commentNum": 0, "wordCount": 1743, "description": "> [!NOTE]\r\n> \u6587\u7ae0\u6765\u6e90\uff1a[\u5317\u4eac\u5927\u5b66](https://its.pku.edu.cn/faq_fail2ban.jsp)\r\n \r\n\u5bf9\u4e8e\u6821\u56ed\u7f51\u4e2d\u8fd1\u671f\u53d1\u73b0\u7684\u9488\u5bf9Linux\u7cfb\u7edf\u7684ssh\u66b4\u529b\u7834\u89e3\u884c\u4e3a\uff0c\u53ef\u4ee5\u901a\u8fc7\u5b89\u88c5fail2ban\u52a0\u5f3a\u9632\u62a4\u3002", "top": 0, "createdAt": 1727584357, "style": "<style>.markdown-alert{padding:0.5rem 1rem;margin-bottom:1rem;border-left:.25em solid var(--borderColor-default,var(--color-border-default));}.markdown-alert .markdown-alert-title {display:flex;font-weight:var(--base-text-weight-medium,500);align-items:center;line-height:1;}.markdown-alert>:first-child {margin-top:0;}.markdown-alert>:last-child {margin-bottom:0;}</style><style>.markdown-alert.markdown-alert-note {border-left-color:var(--borderColor-accent-emphasis, var(--color-accent-emphasis));background-color:var(--color-accent-subtle);}.markdown-alert.markdown-alert-note .markdown-alert-title {color: var(--fgColor-accent,var(--color-accent-fg));}</style>", "script": "<script src='https://blog.meekdai.com/Gmeek/plugins/lightbox.js'></script><script src='https://blog.meekdai.com/Gmeek/plugins/articletoc.js'></script>", "head": "", "ogImage": "https://avatars.githubusercontent.com/u/89264167?u=2b839a9613f690b43f7f3fb63ba6b8e0d536f208&v=4", "createdDate": "2024-09-29", "dateLabelColor": "#bc4c00"}, "P3": {"htmlDir": "docs/post/Serv00-jian-kong-bao-huo.html", "labels": ["\u6280\u672f\u5b66\u4e60", "serv00"], "postTitle": "Serv00\u76d1\u63a7\u4fdd\u6d3b", "postUrl": "post/Serv00-jian-kong-bao-huo.html", "postSourceUrl": "https://github.com/ic1123/ic1123.github.io/issues/3", "commentNum": 0, "wordCount": 2819, "description": "> [!NOTE]\r\n> \u6587\u7ae0\u6765\u6e90\uff1a[\u62fe\u5149](https://blog.mado.us.kg/)\r\n\r\n### 1. \u521b\u5efa Telegram Bot \u5e76\u83b7\u53d6 Token\r\n\u9996\u5148\uff0c\u9700\u8981\u5728 Telegram \u4e0a\u521b\u5efa\u4e00\u4e2a Bot \u5e76\u83b7\u53d6\u5176 Token\u3002", "top": 0, "createdAt": 1728091578, "style": "<style>.markdown-alert{padding:0.5rem 1rem;margin-bottom:1rem;border-left:.25em solid var(--borderColor-default,var(--color-border-default));}.markdown-alert .markdown-alert-title {display:flex;font-weight:var(--base-text-weight-medium,500);align-items:center;line-height:1;}.markdown-alert>:first-child {margin-top:0;}.markdown-alert>:last-child {margin-bottom:0;}</style><style>.markdown-alert.markdown-alert-note {border-left-color:var(--borderColor-accent-emphasis, var(--color-accent-emphasis));background-color:var(--color-accent-subtle);}.markdown-alert.markdown-alert-note .markdown-alert-title {color: var(--fgColor-accent,var(--color-accent-fg));}</style>", "script": "<script src='https://blog.meekdai.com/Gmeek/plugins/lightbox.js'></script><script src='https://blog.meekdai.com/Gmeek/plugins/articletoc.js'></script>", "head": "", "ogImage": "https://avatars.githubusercontent.com/u/89264167?u=2b839a9613f690b43f7f3fb63ba6b8e0d536f208&v=4", "createdDate": "2024-10-05", "dateLabelColor": "#bc4c00"}, "P4": {"htmlDir": "docs/post/Serv00-li-yong-Cloudflare-bao-huo---jie-ru-tong-zhi.html", "labels": ["\u6280\u672f\u5b66\u4e60", "serv00"], "postTitle": "Serv00\u5229\u7528Cloudflare\u4fdd\u6d3b-\u63a5\u5165\u901a\u77e5", "postUrl": "post/Serv00-li-yong-Cloudflare-bao-huo---jie-ru-tong-zhi.html", "postSourceUrl": "https://github.com/ic1123/ic1123.github.io/issues/4", "commentNum": 0, "wordCount": 7637, "description": "> [!NOTE]\r\n> \u6587\u7ae0\u6765\u6e90\uff1a[XJFKKK](https://linux.do/t/topic/180293)\r\n\r\n\u73b0\u5728\u5728cloudflare worker\u4e2d\u76f4\u63a5\u4e00\u4e2a\u4ee3\u7801\u5c31\u89e3\u51b3\u4e86\uff0c\u7136\u540e\u5728\u53d8\u91cf\u52a0\u5165\u4e00\u4e2acron\u5c31\u884c\u4e86\u3002", "top": 0, "createdAt": 1728181023, "style": "<style>.markdown-alert{padding:0.5rem 1rem;margin-bottom:1rem;border-left:.25em solid var(--borderColor-default,var(--color-border-default));}.markdown-alert .markdown-alert-title {display:flex;font-weight:var(--base-text-weight-medium,500);align-items:center;line-height:1;}.markdown-alert>:first-child {margin-top:0;}.markdown-alert>:last-child {margin-bottom:0;}</style><style>.markdown-alert.markdown-alert-note {border-left-color:var(--borderColor-accent-emphasis, var(--color-accent-emphasis));background-color:var(--color-accent-subtle);}.markdown-alert.markdown-alert-note .markdown-alert-title {color: var(--fgColor-accent,var(--color-accent-fg));}</style>", "script": "<script src='https://blog.meekdai.com/Gmeek/plugins/lightbox.js'></script><script src='https://blog.meekdai.com/Gmeek/plugins/articletoc.js'></script>", "head": "", "ogImage": "https://avatars.githubusercontent.com/u/89264167?u=2b839a9613f690b43f7f3fb63ba6b8e0d536f208&v=4", "createdDate": "2024-10-06", "dateLabelColor": "#bc4c00"}, "P5": {"htmlDir": "docs/post/Serv00-li-yong-Cloudflare-bao-huo-xiang-mu-jie-ru-tong-zhi.html", "labels": ["\u6280\u672f\u5b66\u4e60", "serv00"], "postTitle": "Serv00\u5229\u7528Cloudflare\u4fdd\u6d3b\u9879\u76ee\u63a5\u5165\u901a\u77e5", "postUrl": "post/Serv00-li-yong-Cloudflare-bao-huo-xiang-mu-jie-ru-tong-zhi.html", "postSourceUrl": "https://github.com/ic1123/ic1123.github.io/issues/5", "commentNum": 0, "wordCount": 19661, "description": "> [!NOTE]\r\n> \u6587\u7ae0\u6765\u6e90\uff1a[XJFKKK](https://linux.do/t/topic/181957)\r\n\r\n### \u4e00\u3001\u521b\u5efaworker\r\n\u5c06\u4e0b\u9762\u4ee3\u7801\u590d\u5236\u8fdbworker\r\n```\r\naddEventListener('fetch', event => {\r\n event.respondWith(handleRequest(event.request))\r\n})\r\n\r\naddEventListener('scheduled', event => {\r\n event.waitUntil(handleScheduled(event.scheduledTime))\r\n})\r\n\r\nasync function handleRequest(request) {\r\n const url = new URL(request.url)\r\n \r\n if (url.pathname === '/login' && request.method === 'POST') {\r\n const formData = await request.formData()\r\n const password = formData.get('password')\r\n \r\n if (password === PASSWORD) {\r\n const response = new Response(JSON.stringify({ success: true }), {\r\n headers: { 'Content-Type': 'application/json' }\r\n })\r\n response.headers.set('Set-Cookie', `auth=${PASSWORD}; HttpOnly; Secure; SameSite=Strict; Path=/; Max-Age=86400`)\r\n return response\r\n } else {\r\n return new Response(JSON.stringify({ success: false }), {\r\n headers: { 'Content-Type': 'application/json' }\r\n })\r\n }\r\n } else if (url.pathname === '/run' && request.method === 'POST') {\r\n if (!isAuthenticated(request)) {\r\n return new Response('Unauthorized', { status: 401 })\r\n }\r\n \r\n await handleScheduled(new Date().toISOString())\r\n const results = await CRON_RESULTS.get('lastResults', 'json')\r\n return new Response(JSON.stringify(results), {\r\n headers: { 'Content-Type': 'application/json' }\r\n })\r\n } else if (url.pathname === '/results' && request.method === 'GET') {\r\n if (!isAuthenticated(request)) {\r\n return new Response(JSON.stringify({ authenticated: false }), {\r\n headers: { 'Content-Type': 'application/json' }\r\n })\r\n }\r\n const results = await CRON_RESULTS.get('lastResults', 'json')\r\n return new Response(JSON.stringify({ authenticated: true, results: results || [] }), {\r\n headers: { 'Content-Type': 'application/json' }\r\n })\r\n } else if (url.pathname === '/check-auth' && request.method === 'GET') {\r\n return new Response(JSON.stringify({ authenticated: isAuthenticated(request) }), {\r\n headers: { 'Content-Type': 'application/json' }\r\n })\r\n } else {\r\n // \u663e\u793a\u767b\u5f55\u9875\u9762\u6216\u7ed3\u679c\u9875\u9762\u7684 HTML\r\n return new Response(getHtmlContent(), {\r\n headers: { 'Content-Type': 'text/html' },\r\n })\r\n }\r\n}\r\n\r\nfunction isAuthenticated(request) {\r\n const cookies = request.headers.get('Cookie')\r\n if (cookies) {\r\n const authCookie = cookies.split(';').find(c => c.trim().startsWith('auth='))\r\n if (authCookie) {\r\n const authValue = authCookie.split('=')[1]\r\n return authValue === PASSWORD\r\n }\r\n }\r\n return false\r\n}\r\n\r\nfunction getHtmlContent() {\r\n return `\r\n <!DOCTYPE html>\r\n <html lang='en'>\r\n <head>\r\n <meta charset='UTF-8'>\r\n <meta name='viewport' content='width=device-width, initial-scale=1.0'>\r\n <title>Worker Control Panel</title>\r\n <style>\r\n body {\r\n font-family: Arial, sans-serif;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n min-height: 100vh;\r\n margin: 0;\r\n background-color: #f0f0f0;\r\n }\r\n .container {\r\n text-align: center;\r\n padding: 20px;\r\n background-color: white;\r\n border-radius: 8px;\r\n box-shadow: 0 2px 4px rgba(0,0,0,0.1);\r\n max-width: 800px;\r\n width: 100%;\r\n }\r\n input, button {\r\n margin: 10px 0;\r\n padding: 10px;\r\n width: 200px;\r\n border-radius: 4px;\r\n border: 1px solid #ddd;\r\n }\r\n button {\r\n background-color: #4CAF50;\r\n border: none;\r\n color: white;\r\n cursor: pointer;\r\n }\r\n #status {\r\n margin-top: 20px;\r\n font-weight: bold;\r\n }\r\n table {\r\n width: 100%;\r\n border-collapse: collapse;\r\n margin-top: 20px;\r\n }\r\n th, td {\r\n border: 1px solid #ddd;\r\n padding: 8px;\r\n text-align: left;\r\n }\r\n th {\r\n background-color: #f2f2f2;\r\n }\r\n #loginForm, #dashboard {\r\n display: none;\r\n }\r\n </style>\r\n </head>\r\n <body>\r\n <div class='container'>\r\n <h1>Worker Control Panel</h1>\r\n <div id='loginForm'>\r\n <input type='password' id='password' placeholder='Enter password'>\r\n <button onclick='login()'>Login</button>\r\n </div>\r\n <div id='dashboard'>\r\n <button onclick='runScript()'>Run Script</button>\r\n <div id='status'></div>\r\n <table id='resultsTable'>\r\n <thead>\r\n <tr>\r\n <th>Account</th>\r\n <th>Type</th>\r\n <th>Status</th>\r\n <th>Message</th>\r\n <th>Last Run</th>\r\n </tr>\r\n </thead>\r\n <tbody></tbody>\r\n </table>\r\n </div>\r\n </div>\r\n <script>\r\n let password = '';\r\n\r\n function showLoginForm() {\r\n document.getElementById('loginForm').style.display = 'block';\r\n document.getElementById('dashboard').style.display = 'none';\r\n }\r\n\r\n function showDashboard() {\r\n document.getElementById('loginForm').style.display = 'none';\r\n document.getElementById('dashboard').style.display = 'block';\r\n fetchResults();\r\n }\r\n\r\n async function checkAuth() {\r\n const response = await fetch('/check-auth');\r\n const data = await response.json();\r\n if (data.authenticated) {\r\n showDashboard();\r\n } else {\r\n showLoginForm();\r\n }\r\n }\r\n\r\n async function login() {\r\n password = document.getElementById('password').value;\r\n const formData = new FormData();\r\n formData.append('password', password);\r\n const response = await fetch('/login', { \r\n method: 'POST',\r\n body: formData\r\n });\r\n const result = await response.json();\r\n if (result.success) {\r\n showDashboard();\r\n } else {\r\n alert('Incorrect password');\r\n }\r\n }\r\n\r\n async function runScript() {\r\n const statusDiv = document.getElementById('status');\r\n statusDiv.textContent = 'Executing script...';\r\n try {\r\n const response = await fetch('/run', { method: 'POST' });\r\n if (response.ok) {\r\n const results = await response.json();\r\n displayResults(results);\r\n statusDiv.textContent = 'Script executed successfully!';\r\n } else if (response.status === 401) {\r\n statusDiv.textContent = 'Unauthorized. Please login again.';\r\n showLoginForm();\r\n } else {\r\n statusDiv.textContent = 'Error executing script.';\r\n }\r\n } catch (error) {\r\n statusDiv.textContent = 'Error: ' + error.message;\r\n }\r\n }\r\n\r\n async function fetchResults() {\r\n try {\r\n const response = await fetch('/results');\r\n if (response.ok) {\r\n const data = await response.json();\r\n if (data.authenticated) {\r\n displayResults(data.results);\r\n } else {\r\n showLoginForm();\r\n }\r\n } else {\r\n console.error('Failed to fetch results');\r\n showLoginForm();\r\n }\r\n } catch (error) {\r\n console.error('Error fetching results:', error);\r\n showLoginForm();\r\n }\r\n }\r\n\r\n function displayResults(results) {\r\n const tbody = document.querySelector('#resultsTable tbody');\r\n tbody.innerHTML = '';\r\n results.forEach(result => {\r\n result.cronResults.forEach((cronResult, index) => {\r\n const row = tbody.insertRow();\r\n if (index === 0) {\r\n row.insertCell(0).textContent = result.username;\r\n row.insertCell(1).textContent = result.type;\r\n } else {\r\n row.insertCell(0).textContent = '';\r\n row.insertCell(1).textContent = '';\r\n }\r\n row.insertCell(2).textContent = cronResult.success ? 'Success' : 'Failed';\r\n row.insertCell(3).textContent = cronResult.message;\r\n row.insertCell(4).textContent = new Date(result.lastRun).toLocaleString();\r\n });\r\n });\r\n }\r\n\r\n // \u9875\u9762\u52a0\u8f7d\u65f6\u68c0\u67e5\u8ba4\u8bc1\u72b6\u6001\r\n document.addEventListener('DOMContentLoaded', checkAuth);\r\n </script>\r\n </body>\r\n </html>\r\n `;\r\n}\r\n\r\nasync function handleScheduled(scheduledTime) {\r\n const accountsData = JSON.parse(ACCOUNTS_JSON);\r\n const accounts = accountsData.accounts;\r\n \r\n let results = [];\r\n for (const account of accounts) {\r\n const result = await loginAccount(account);\r\n results.push(result);\r\n await delay(Math.floor(Math.random() * 8000) + 1000);\r\n }\r\n\r\n // \u4fdd\u5b58\u7ed3\u679c\u5230 KV \u5b58\u50a8\r\n await CRON_RESULTS.put('lastResults', JSON.stringify(results));\r\n}\r\n\r\nfunction generateRandomUserAgent() {\r\n const browsers = ['Chrome', 'Firefox', 'Safari', 'Edge', 'Opera'];\r\n const browser = browsers[Math.floor(Math.random() * browsers.length)];\r\n const version = Math.floor(Math.random() * 100) + 1;\r\n const os = ['Windows NT 10.0', 'Macintosh', 'X11'];\r\n const selectedOS = os[Math.floor(Math.random() * os.length)];\r\n const osVersion = selectedOS === 'X11' ? 'Linux x86_64' : selectedOS === 'Macintosh' ? 'Intel Mac OS X 10_15_7' : 'Win64; x64';\r\n\r\n return `Mozilla/5.0 (${selectedOS}; ${osVersion}) AppleWebKit/537.36 (KHTML, like Gecko) ${browser}/${version}.0.0.0 Safari/537.36`;\r\n}\r\n\r\nasync function loginAccount(account) {\r\n const { username, password, panelnum, type, cronCommands } = account\r\n let baseUrl = type === 'ct8' \r\n ? 'https://panel.ct8.pl' \r\n : `https://panel${panelnum}.serv00.com`\r\n let loginUrl = `${baseUrl}/login/?next=/cron/`\r\n\r\n const userAgent = generateRandomUserAgent();\r\n\r\n try {\r\n const response = await fetch(loginUrl, {\r\n method: 'GET',\r\n headers: {\r\n 'User-Agent': userAgent,\r\n },\r\n })\r\n\r\n const pageContent = await response.text()\r\n const csrfMatch = pageContent.match(/name='csrfmiddlewaretoken' value='([^']*)'/)\r\n const csrfToken = csrfMatch ? csrfMatch[1] : null\r\n\r\n if (!csrfToken) {\r\n throw new Error('CSRF token not found')\r\n }\r\n\r\n const initialCookies = response.headers.get('set-cookie') || ''\r\n\r\n const formData = new URLSearchParams({\r\n 'username': username,\r\n 'password': password,\r\n 'csrfmiddlewaretoken': csrfToken,\r\n 'next': '/cron/'\r\n })\r\n\r\n const loginResponse = await fetch(loginUrl, {\r\n method: 'POST',\r\n headers: {\r\n 'Content-Type': 'application/x-www-form-urlencoded',\r\n 'Referer': loginUrl,\r\n 'User-Agent': userAgent,\r\n 'Cookie': initialCookies,\r\n },\r\n body: formData.toString(),\r\n redirect: 'manual'\r\n })\r\n\r\n if (loginResponse.status === 302 && loginResponse.headers.get('location') === '/cron/') {\r\n const loginCookies = loginResponse.headers.get('set-cookie') || ''\r\n const allCookies = combineCookies(initialCookies, loginCookies)\r\n\r\n // \u8bbf\u95ee cron \u5217\u8868\u9875\u9762\r\n const cronListUrl = `${baseUrl}/cron/`\r\n const cronListResponse = await fetch(cronListUrl, {\r\n headers: {\r\n 'Cookie': allCookies,\r\n 'User-Agent': userAgent,\r\n }\r\n })\r\n const cronListContent = await cronListResponse.text()\r\n\r\n console.log(`Cron list URL: ${cronListUrl}`)\r\n console.log(`Cron list response status: ${cronListResponse.status}`)\r\n console.log(`Cron list content (first 1000 chars): ${cronListContent.substring(0, 1000)}`)\r\n\r\n let cronResults = [];\r\n for (const cronCommand of cronCommands) {\r\n if (!cronListContent.includes(cronCommand)) {\r\n // \u8bbf\u95ee\u6dfb\u52a0 cron \u4efb\u52a1\u9875\u9762\r\n const addCronUrl = `${baseUrl}/cron/add`\r\n const addCronPageResponse = await fetch(addCronUrl, {\r\n headers: {\r\n 'Cookie': allCookies,\r\n 'User-Agent': userAgent,\r\n 'Referer': cronListUrl,\r\n }\r\n })\r\n const addCronPageContent = await addCronPageResponse.text()\r\n\r\n console.log(`Add cron page URL: ${addCronUrl}`)\r\n console.log(`Add cron page response status: ${addCronPageResponse.status}`)\r\n console.log(`Add cron page content (first 1000 chars): ${addCronPageContent.substring(0, 1000)}`)\r\n\r\n const newCsrfMatch = addCronPageContent.match(/name='csrfmiddlewaretoken' value='([^']*)'/)\r\n const newCsrfToken = newCsrfMatch ? newCsrfMatch[1] : null\r\n\r\n if (!newCsrfToken) {\r\n throw new Error('New CSRF token not found for adding cron task')\r\n }\r\n\r\n const formData = new URLSearchParams({\r\n 'csrfmiddlewaretoken': newCsrfToken,\r\n 'spec': 'manual',\r\n 'minute_time_interval': 'on',\r\n 'minute': '15',\r\n 'hour_time_interval': 'each',\r\n 'hour': '*',\r\n 'day_time_interval': 'each',\r\n 'day': '*',\r\n 'month_time_interval': 'each',\r\n 'month': '*',\r\n 'dow_time_interval': 'each',\r\n 'dow': '*',\r\n 'command': cronCommand,\r\n 'comment': 'Auto added cron job'\r\n })\r\n\r\n console.log('Form data being sent:', formData.toString())\r\n\r\n const { success, response: addCronResponse, content: addCronResponseContent } = await addCronWithRetry(addCronUrl, {\r\n method: 'POST',\r\n headers: {\r\n 'Content-Type': 'application/x-www-form-urlencoded',\r\n 'Cookie': allCookies,\r\n 'User-Agent': userAgent,\r\n 'Referer': addCronUrl,\r\n 'Origin': baseUrl,\r\n 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',\r\n 'Accept-Language': 'en-US,en;q=0.5',\r\n 'Upgrade-Insecure-Requests': '1'\r\n },\r\n body: formData.toString(),\r\n })\r\n\r\n console.log('Full response content:', addCronResponseContent)\r\n\r\n if (success) {\r\n if (addCronResponseContent.includes('Cron job has been added') || addCronResponseContent.includes('Zadanie cron zosta\u0142o dodane')) {\r\n const message = `\u6dfb\u52a0\u4e86\u65b0\u7684 cron \u4efb\u52a1\uff1a${cronCommand}`;\r\n console.log(message);\r\n await sendTelegramMessage(`\u8d26\u53f7 ${username} (${type}) ${message}`);\r\n cronResults.push({ success: true, message });\r\n } else {\r\n // \u5982\u679c\u54cd\u5e94\u4e2d\u6ca1\u6709\u6210\u529f\u4fe1\u606f\uff0c\u518d\u6b21\u68c0\u67e5cron\u5217\u8868\r\n const checkCronListResponse = await fetch(cronListUrl, {\r\n headers: {\r\n 'Cookie': allCookies,\r\n 'User-Agent': userAgent,\r\n }\r\n });\r\n const checkCronListContent = await checkCronListResponse.text();\r\n \r\n if (checkCronListContent.includes(cronCommand)) {\r\n const message = `\u786e\u8ba4\u6dfb\u52a0\u4e86\u65b0\u7684 cron \u4efb\u52a1\uff1a${cronCommand}`;\r\n console.log(message);\r\n await sendTelegramMessage(`\u8d26\u53f7 ${username} (${type}) ${message}`);\r\n cronResults.push({ success: true, message });\r\n } else {\r\n const message = `\u5c1d\u8bd5\u6dfb\u52a0 cron \u4efb\u52a1\uff1a${cronCommand}\uff0c\u4f46\u5728\u5217\u8868\u4e2d\u672a\u627e\u5230\u3002", "top": 0, "createdAt": 1728181606, "style": "<style>.markdown-alert{padding:0.5rem 1rem;margin-bottom:1rem;border-left:.25em solid var(--borderColor-default,var(--color-border-default));}.markdown-alert .markdown-alert-title {display:flex;font-weight:var(--base-text-weight-medium,500);align-items:center;line-height:1;}.markdown-alert>:first-child {margin-top:0;}.markdown-alert>:last-child {margin-bottom:0;}</style><style>.markdown-alert.markdown-alert-note {border-left-color:var(--borderColor-accent-emphasis, var(--color-accent-emphasis));background-color:var(--color-accent-subtle);}.markdown-alert.markdown-alert-note .markdown-alert-title {color: var(--fgColor-accent,var(--color-accent-fg));}</style>", "script": "<script src='https://blog.meekdai.com/Gmeek/plugins/lightbox.js'></script><script src='https://blog.meekdai.com/Gmeek/plugins/articletoc.js'></script>", "head": "", "ogImage": "https://avatars.githubusercontent.com/u/89264167?u=2b839a9613f690b43f7f3fb63ba6b8e0d536f208&v=4", "createdDate": "2024-10-06", "dateLabelColor": "#bc4c00"}, "P6": {"htmlDir": "docs/post/Serv00-zhong-zhi-cao-zuo-ming-ling.html", "labels": ["\u6280\u672f\u5b66\u4e60", "serv00"], "postTitle": "Serv00\u91cd\u7f6e\u64cd\u4f5c\u547d\u4ee4", "postUrl": "post/Serv00-zhong-zhi-cao-zuo-ming-ling.html", "postSourceUrl": "https://github.com/ic1123/ic1123.github.io/issues/6", "commentNum": 0, "wordCount": 553, "description": "> [!NOTE]\r\n> \u6587\u7ae0\u6765\u6e90\uff1a[hebaodan](https://linux.do/t/topic/181957)\r\n\r\n### Serv00\u91cd\u7f6e\u7cfb\u7edf\u547d\u4ee4\r\n\r\n#### 1.\u66f4\u6539\u6743\u9650\uff1a\r\n```\r\nfind ~ -type f -exec chmod 644 {} \\; 2>/dev/null\r\nfind ~ -type d -exec chmod 755 {} \\; 2>/dev/null\r\n```\r\n\r\n#### 2.\u5220\u9664\u6587\u4ef6\uff1a\r\n```\r\nfind ~ -type f -exec rm -f {} \\; 2>/dev/null\r\n```\r\n\r\n#### 3.\u5220\u9664\u7a7a\u76ee\u5f55\uff1a\r\n```\r\nfind ~ -type d -empty -exec rmdir {} \\; 2>/dev/null\r\n```\r\n\r\n#### 4.\u518d\u6b21\u5c1d\u8bd5\u5220\u9664\u5269\u4f59\u7684\u6587\u4ef6\u548c\u76ee\u5f55\uff1a\r\n```\r\nfind ~ -exec rm -rf {} \\; 2>/dev/null\r\n```\r\n\r\n---\r\n#### \u5220\u9664\u6240\u6709\u8fdb\u7a0b\u547d\u4ee4\r\n\r\n```\r\nbash <(curl -Ls https://raw.githubusercontent.com/eooce/sing-box/main/sb_serv00.sh)\r\n```\u3002", "top": 0, "createdAt": 1728368813, "style": "<style>.markdown-alert{padding:0.5rem 1rem;margin-bottom:1rem;border-left:.25em solid var(--borderColor-default,var(--color-border-default));}.markdown-alert .markdown-alert-title {display:flex;font-weight:var(--base-text-weight-medium,500);align-items:center;line-height:1;}.markdown-alert>:first-child {margin-top:0;}.markdown-alert>:last-child {margin-bottom:0;}</style><style>.markdown-alert.markdown-alert-note {border-left-color:var(--borderColor-accent-emphasis, var(--color-accent-emphasis));background-color:var(--color-accent-subtle);}.markdown-alert.markdown-alert-note .markdown-alert-title {color: var(--fgColor-accent,var(--color-accent-fg));}</style>", "script": "<script src='https://blog.meekdai.com/Gmeek/plugins/lightbox.js'></script><script src='https://blog.meekdai.com/Gmeek/plugins/articletoc.js'></script>", "head": "", "ogImage": "https://avatars.githubusercontent.com/u/89264167?u=2b839a9613f690b43f7f3fb63ba6b8e0d536f208&v=4", "createdDate": "2024-10-08", "dateLabelColor": "#bc4c00"}, "P7": {"htmlDir": "docs/post/ling-cheng-ben-da-jian-yue-hou-ji-fen-wang-zhan-\uff0c-bi-mian-yin-si-xie-lou.html", "labels": ["\u6280\u672f\u5b66\u4e60", "serv00"], "postTitle": "\u96f6\u6210\u672c\u642d\u5efa\u9605\u540e\u5373\u711a\u7f51\u7ad9\uff0c\u907f\u514d\u9690\u79c1\u6cc4\u6f0f", "postUrl": "post/ling-cheng-ben-da-jian-yue-hou-ji-fen-wang-zhan-%EF%BC%8C-bi-mian-yin-si-xie-lou.html", "postSourceUrl": "https://github.com/ic1123/ic1123.github.io/issues/7", "commentNum": 0, "wordCount": 3523, "description": "> [!NOTE]\r\n> \u6587\u7ae0\u6765\u6e90\uff1a[\u6211\u7684\u6728\u5c4b](https://mymuwu.net/?p=1218)\r\n\r\n\u9605\u540e\u5373\u711a\u987e\u540d\u601d\u4e49\uff0c\u5c31\u662f\u9605\u8bfb\u540e\u5373\u711a\u6bc1\uff0c\u5f53\u60f3\u7ed9\u5176\u4ed6\u7ae5\u978b\u5206\u4eab\u6084\u6084\u8bdd\u7684\u65f6\u5019\uff0c\u53c8\u4e0d\u65b9\u4fbf\u5728\u804a\u5929\u8f6f\u4ef6\u53d1\u9001\uff0c\u53ef\u4ee5\u5728\u7f51\u7ad9\u4e0a\u5199\u4e0a\u9700\u8981\u544a\u8bc9\u5bf9\u65b9\u7684\u8bdd\uff0c\u518d\u8ba9\u5bf9\u65b9\u901a\u8fc7\u94fe\u63a5\u8bbf\u95ee\uff0c\u5bf9\u65b9\u67e5\u770b\u540e\u8fd9\u6761\u6d88\u606f\u5c31\u4f1a\u88ab\u9500\u6bc1\uff0c\u540c\u65f6\u4e5f\u53ef\u4ee5\u8bbe\u7f6e\u5bc6\u7801\uff0c\u8bbe\u7f6e\u67e5\u770b\u6b21\u6570\uff0c\u5206\u4eab\u7ed9\u591a\u4eba\uff0c\u4e00\u8d77\u67e5\u770b\u3001\u8ba8\u8bba\uff0c\u907f\u514d\u4e86\u9690\u79c1\u6cc4\u9732\uff08\u53ea\u662f\u76f8\u5bf9\u800c\u8a00\uff09\uff0c\u5f53\u7136\u4e5f\u53ef\u4ee5\u53d1\u9001\u6587\u4ef6\uff0c\u4e00\u6837\u53ef\u4ee5\u9605\u540e\u5373\u711a\u3002", "top": 0, "createdAt": 1728970524, "style": "<style>.markdown-alert{padding:0.5rem 1rem;margin-bottom:1rem;border-left:.25em solid var(--borderColor-default,var(--color-border-default));}.markdown-alert .markdown-alert-title {display:flex;font-weight:var(--base-text-weight-medium,500);align-items:center;line-height:1;}.markdown-alert>:first-child {margin-top:0;}.markdown-alert>:last-child {margin-bottom:0;}</style><style>.markdown-alert.markdown-alert-note {border-left-color:var(--borderColor-accent-emphasis, var(--color-accent-emphasis));background-color:var(--color-accent-subtle);}.markdown-alert.markdown-alert-note .markdown-alert-title {color: var(--fgColor-accent,var(--color-accent-fg));}</style>", "script": "<script src='https://blog.meekdai.com/Gmeek/plugins/lightbox.js'></script><script src='https://blog.meekdai.com/Gmeek/plugins/articletoc.js'></script>", "head": "", "ogImage": "https://avatars.githubusercontent.com/u/89264167?u=2b839a9613f690b43f7f3fb63ba6b8e0d536f208&v=4", "createdDate": "2024-10-15", "dateLabelColor": "#bc4c00"}}, "singeListJson": {}, "labelColorDict": {"enhancement": "#a2eeef", "good first issue": "#7057ff", "help wanted": "#008672", "question": "#d876e3", "serv00": "#78F81B", "VPS": "#cfd3d7", "\u6280\u672f\u5b66\u4e60": "#d73a4a", "\u65e5\u5e38\u5206\u4eab": "#0075ca", "\u8bfb\u4e66\u7b14\u8bb0": "#e4e669"}, "displayTitle": "Blog", "faviconUrl": "https://avatars.githubusercontent.com/u/89264167?u=2b839a9613f690b43f7f3fb63ba6b8e0d536f208&v=4", "ogImage": "https://avatars.githubusercontent.com/u/89264167?u=2b839a9613f690b43f7f3fb63ba6b8e0d536f208&v=4", "primerCSS": "<link href='https://mirrors.sustech.edu.cn/cdnjs/ajax/libs/Primer/21.0.7/primer.css' rel='stylesheet' />", "prevUrl": "disabled", "nextUrl": "disabled"}