首页
留言板
友链
关于
推荐
wszx博客
Search
1
x-ui面板实现多ip分流出站
25 阅读
2
NAT机商家合集【2024年08月18】
22 阅读
3
常用安装脚本知识24年10月27日更新
21 阅读
4
精美的桌面壁纸2
21 阅读
5
精美的手机壁纸3
21 阅读
默认
日常
学习
技术
登录
Search
标签搜索
cloudflare
壁纸
CF
白嫖
安装
脚本
图片
Linux
docker
域名
桌面壁纸
手机壁纸
NAT
LXC
HTML
网页
代码
哪吒
高清壁纸
优选
ws01
累计撰写
68
篇文章
累计收到
5
条评论
首页
栏目
默认
日常
学习
技术
页面
留言板
友链
关于
推荐
wszx博客
搜索到
1
篇与
的结果
2024-08-12
serv00注册等系列教程,服务器清理,ssh连接不上问题轻松解决,非挂代理
serv00系列教程,服务器清理,ssh连接不上问题轻松解决,非挂代理一、FTP、ssh 无法连接1、修改链接地址,sXXX.serv00.com 换成 webXXX.serv00.comssh服务器清理pkill -kill -u ${username} chmod -R 755 ~/* chmod -R 755 ~/.* rm -rf ~/.* rm -rf ~/*sN.serv00.com 18(或其IP)+端口22(或80或443)webN.serv00.com 12(或其IP)+端口22cacheN.serv00.com 8(或其IP)+端口22panelN.serv00.com 5 +端口22panelN.serv00.net +端口22USER.serv00.net +端口22其中大写的 N 是邮件中给定的服务器号2、ip被blockip解锁地址:https://www.serv00.com/ip_unban二、注册1、serv00注册对ip要求较高,邮箱也有可能收不到邮件和在垃圾箱中,所以正常注册不上就只能 换ip,换邮箱 。2、推荐下面方法:打开ProxySite-免费网络代理,在代理中注册,地址随意,最好选波兰ProxySite-免费网络代理 serv00注册输入:https://www.serv00.com/offer/create_new_accountct8注册输入【代理地址必须选择🇵🇱波兰】:https://www.ct8.pl/offer/create_new_account可选临时邮箱 ,最好是自己的邮箱,信息填完后serv00最下面一栏填写:freect8最下面一栏填写:MyDevil.net三、cloudflare保活1、登录 cloudflare ,创建 Workers 或 Pages 项目2、复制以下代码到 Workers 并部署addEventListener('fetch', event => { event.respondWith(handleRequest(event.request)) }) addEventListener('scheduled', event => { event.waitUntil(handleScheduled(event.scheduledTime)) }) async function handleRequest(request) { return new Response('Worker is running') } async function handleScheduled(scheduledTime) { const accounts = JSON.parse(ACCOUNTS_JSON) const results = await loginAccounts(accounts) await sendSummary(results) } async function loginAccounts(accounts) { const results = [] for (const account of accounts) { const result = await loginAccount(account) results.push({ ...account, ...result }) await delay(Math.floor(Math.random() * 8000) + 1000) } return results } function generateRandomUserAgent() { const browsers = ['Chrome', 'Firefox', 'Safari', 'Edge', 'Opera']; const browser = browsers[Math.floor(Math.random() * browsers.length)]; const version = Math.floor(Math.random() * 100) + 1; const os = ['Windows NT 10.0', 'Macintosh', 'X11']; const selectedOS = os[Math.floor(Math.random() * os.length)]; const osVersion = selectedOS === 'X11' ? 'Linux x86_64' : selectedOS === 'Macintosh' ? 'Intel Mac OS X 10_15_7' : 'Win64; x64'; return `Mozilla/5.0 (${selectedOS}; ${osVersion}) AppleWebKit/537.36 (KHTML, like Gecko) ${browser}/${version}.0.0.0 Safari/537.36`; } async function loginAccount(account) { const { username, password, panelnum, type } = account let url = type === 'ct8' ? 'https://panel.ct8.pl/login/?next=/' : `https://panel${panelnum}.serv00.com/login/?next=/` const userAgent = generateRandomUserAgent(); try { const response = await fetch(url, { method: 'GET', headers: { 'User-Agent': userAgent, }, }) const pageContent = await response.text() const csrfMatch = pageContent.match(/name="csrfmiddlewaretoken" value="([^"]*)"/) const csrfToken = csrfMatch ? csrfMatch[1] : null if (!csrfToken) { throw new Error('CSRF token not found') } const initialCookies = response.headers.get('set-cookie') || '' const formData = new URLSearchParams({ 'username': username, 'password': password, 'csrfmiddlewaretoken': csrfToken, 'next': '/' }) const loginResponse = await fetch(url, { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', 'Referer': url, 'User-Agent': userAgent, 'Cookie': initialCookies, }, body: formData.toString(), redirect: 'manual' }) console.log(`Login response status: ${loginResponse.status}`) console.log(`Login response headers: ${JSON.stringify(Object.fromEntries(loginResponse.headers))}`) const loginResponseBody = await loginResponse.text() console.log(`Login response body: ${loginResponseBody.substring(0, 200)}...`) if (loginResponse.status === 302 && loginResponse.headers.get('location') === '/') { const loginCookies = loginResponse.headers.get('set-cookie') || '' const allCookies = combineCookies(initialCookies, loginCookies) const dashboardResponse = await fetch(url.replace('/login/', '/'), { headers: { 'Cookie': allCookies, 'User-Agent': userAgent, } }) const dashboardContent = await dashboardResponse.text() console.log(`Dashboard content: ${dashboardContent.substring(0, 200)}...`) if (dashboardContent.includes('href="/logout/"') || dashboardContent.includes('href="/wyloguj/"')) { const nowUtc = formatToISO(new Date()) const nowBeijing = formatToISO(new Date(Date.now() + 8 * 60 * 60 * 1000)) const message = `账号 ${username} (${type}) 于北京时间 ${nowBeijing}(UTC时间 ${nowUtc})登录成功!` console.log(message) await sendTelegramMessage(message) return { success: true, message } } else { const message = `账号 ${username} (${type}) 登录后未找到登出链接,可能登录失败。` console.error(message) await sendTelegramMessage(message) return { success: false, message } } } else if (loginResponseBody.includes('Nieprawidłowy login lub hasło')) { const message = `账号 ${username} (${type}) 登录失败:用户名或密码错误。` console.error(message) await sendTelegramMessage(message) return { success: false, message } } else { const message = `账号 ${username} (${type}) 登录失败,未知原因。请检查账号和密码是否正确。` console.error(message) await sendTelegramMessage(message) return { success: false, message } } } catch (error) { const message = `账号 ${username} (${type}) 登录时出现错误: ${error.message}` console.error(message) await sendTelegramMessage(message) return { success: false, message } } } function combineCookies(cookies1, cookies2) { const cookieMap = new Map() const parseCookies = (cookieString) => { cookieString.split(',').forEach(cookie => { const [fullCookie] = cookie.trim().split(';') const [name, value] = fullCookie.split('=') if (name && value) { cookieMap.set(name.trim(), value.trim()) } }) } parseCookies(cookies1) parseCookies(cookies2) return Array.from(cookieMap.entries()).map(([name, value]) => `${name}=${value}`).join('; ') } async function sendSummary(results) { const successfulLogins = results.filter(r => r.success) const failedLogins = results.filter(r => !r.success) let summaryMessage = '登录结果统计:\n' summaryMessage += `成功登录的账号:${successfulLogins.length}\n` summaryMessage += `登录失败的账号:${failedLogins.length}\n` if (failedLogins.length > 0) { summaryMessage += '\n登录失败的账号列表:\n' failedLogins.forEach(({ username, type, message }) => { summaryMessage += `- ${username} (${type}): ${message}\n` }) } console.log(summaryMessage) await sendTelegramMessage(summaryMessage) } async function sendTelegramMessage(message) { const telegramConfig = JSON.parse(TELEGRAM_JSON) const { telegramBotToken, telegramBotUserId } = telegramConfig const url = `https://api.telegram.org/bot${telegramBotToken}/sendMessage` try { await fetch(url, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ chat_id: telegramBotUserId, text: message }) }) } catch (error) { console.error('Error sending Telegram message:', error) } } function formatToISO(date) { return date.toISOString().replace('T', ' ').replace('Z', '').replace(/\.\d{3}Z/, '') } function delay(ms) { return new Promise(resolve => setTimeout(resolve, ms)) }3、设置变量,都在Workers 或 Pages设置中变量1变量名称:ACCOUNTS_JSON其中“帐号1服务器”为,如:你的帐号在s2.serv00.com,则填写:2,帐号可随意增加和减少,最后一个大括号后没逗号。[ { "username": "serv00帐号1", "password": "serv00帐号1密码", "panelnum": "帐号1服务器", "type": "serv00" }, { "username": "serv00帐号2", "password": "serv00帐号2密码", "panelnum": "帐号1服务器", "type": "serv00" }, { "username": "serv00帐号3", "password": "serv00帐号3密码", "panelnum": "帐号1服务器", "type": "serv00" } ]变量2变量名称:ACCOUNTS_JSON设置TG通知,不用不设置{ "telegramBotToken": "TG Token:如72492745590000:AAGCNhe663WD3z_PxTaUvSAYlKFBJ5Q3A2YQQQQ", "telegramBotUserId": "59515042110000" }变量3设置“触发事件”,如以下设置是:每月12号11时4分触发启动,可修改为任意时间11 4 12 * *
2024年08月12日
11 阅读
0 评论
0 点赞
您是第
100804
位访客