分类 默认分类 下的文章

vi /usr/lib/lua/luci/view/sysauth.htm
<!-- 登录前 一键网络唤醒按钮 -->
<%
-- 在这里执行唤醒命令
if luci.http.formvalue("wake") then
    luci.sys.call("/usr/bin/etherwake -D -i 'br-lan' -b 'D8:5E:D3:6A:EA:5C' > /dev/null 2>&1")
end
%>

<div style="text-align:center; margin:20px auto; max-width:320px;">
    <form method="post" style="margin:0;">
        <button 
            type="submit" 
            name="wake" 
            value="wake"
            style="
                background:#007bff; 
                color:white; 
                border:none; 
                padding:12px 24px; 
                border-radius:6px; 
                font-size:16px; 
                cursor:pointer;
                width:100%;
                font-weight:bold;
            ">
            🖥️ 一键开机(网络唤醒)
        </button>
    </form>
</div>
<br>

打开powershell,输入:

$(New-Object -ComObject InternetExplorer.Application).Visible=$true

或者新建一个 .cmd 的 ANSI 编码文件,内容如下:

powershell -command "$(New-Object -ComObject InternetExplorer.Application).Visible=$true"

或者新建一个 .vbs 的 ANSI 编码文件,内容如下(Win11 可能已经失效):

CreateObject("InternetExplorer.Application").Visible = true

或者 打开 internet option ,program 标签页,click Manage add-ons ,Finally, click the Learn more about toolbars and extensions link on the left.

https://winaero.com/how-to-launch-internet-explorer-on-windows-11-if-you-really-need-it/
https://blog.csdn.net/chj_1224365967/article/details/130701129
https://freyagrace.cn/index.php/archives/289/

raw_headers = """Host: open.tool.hexun.com
Pragma: no-cache
Cache-Control: no-cache
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.3
Accept: */*
Referer: http://stock.hexun.com/gsxw/
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9,en;q=0.8"""
def get_headers(header_raw):
 """
 通过原生请求头获取请求头字典
 :param header_raw: {str} 浏览器请求头
 :return: {dict} headers
 """
 return dict(line.split(": ", 1) for line in header_raw.split("\n") if line != '')
def get_cookies(cookie_raw):
 """
 通过原生cookie获取cookie字段
 :param cookie_raw: {str} 浏览器原始cookie
 :return: {dict} cookies
 """
 return dict(line.split("=", 1) for line in cookie_raw.split("; "))

    var list1 = $x('//div[@class="t_l"]//a');
    let all=''
    for (let i=0;i<list1.length;i++){
        all += list1[i].href + '  ' + list1[i].text + '\n'
    }
    console.log(all)
    copy(all)

替换空白行(含有空白字符的行也替换)

#填入查找框
^\s*(?=\r?$)\n  

替换空白行()

#填入查找框,表示查找连续的2 或更多个换行符
\n{2,}
#填入替换框,表示用一个换行符替换连续的多个换行符
\n     

不以某字符串str开头

^(?!str)

不以某字符串str结尾

(?<!str)$

其他几个 ? 元字符用法

(?:str)   非捕获组

(?=str) 肯定式向前查找

(?!str) 否定式向前查找

(?<=str) 肯定式向后查找

(?<!str) 否定式向后查找