
暂无信息!

啊?
最近发现代理服务频繁出现对时错误。。。
timedatectl
注意到 Edge 中 IE 兼容模式按钮消失了,以下为原因。
Internet Explorer 不具备现代 Chromium 浏览器所拥有的深度防御架构。近期安全情报显示,黑客正滥用 Microsoft Edge 浏览器中的 Internet Explorer 模式 (以下简称 “IE 模式”) 入侵用户设备。
2025 年 8 月,Microsoft Edge 安全团队收到可靠情报:黑客正结合社会工程学与 IE JavaScript 引擎 0-day 漏洞入侵用户设备。攻击者诱骗受害者访问伪造的官方网站,然后通过弹出窗口要求用户以 IE 模式重新加载页面。随后,攻击者利用 Chakra 漏洞执行远程代码,突破浏览器限制提升权限,最终完全控制受害者设备。此攻击路径极度危险,它通过回退至 IE 旧版环境绕过了 Chromium 内核内置的安全机制。
Edge 安全团队果断采取行动,决定移除个人 / 家庭设备中 “使用 IE 模式加载页面” 的高风险入口。自 142.0.3553.0 版本起,不再显示 IE 模式工具栏按钮,不再提供添加按钮的选项。
Active Code Page 导致 IDEA 崩溃的问题起因是最近部署了一个本地主机运行的 OpenClaw 示例,但是由于 我的 OS 激活版本为 简体中文,默认 Active Code Page 会导致 Windows OS 工具命令输出中文信息。但是在 OpenClaw 端显示为乱码,所以我想到了修改 Active Code Page 来直接将工具输出修改为英文输出。
我修改了 注册表 中 \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor,的 auto_run 项,添加了修改 活动分页 的命令 chcp 437。
在 golang 中有时候会需要用到类似其他语言中 enum 类型的通过值获取字段名称功能,通过以下脚本可以读取 go 文件中所有 全局 var/const 定义,并根据 值/iota值 生成 值:常量名 map。
import io
import regex
class Const:
const_name: str
const_value: str
def declare_str(self):
return f'\t{self.const_value}: "{self.const_name}",\n'
class ConstGroup:
const_type: str
const_list: list[Const]
map_keys: dict
def __init__(self):
self.map_keys = {}
self.const_list = []
def declare_str(self):
s = f'var {self.const_type}Map = map[{self.const_type}]string{{\n'
for c in self.const_list:
s += c.declare_str()
return s + "}\n"
const_map = {}
type_underlying = {}
with io.open("const.go", "rb") as f:
const_file = f.read().decode("utf-8")
lines = const_file.split("\n")
cursor_type = ""
const_syntax = False
iota = -1
# 自定义常量的前缀
trim_prefix_reg = regex.compile("^(?P<prefix>Clz|SV|BT|TD|SP|FM|SGP|PassType|ShaderCompilerPlatform).+")
# extract const
for line in lines:
params = [key.strip() for key in line.split(" ") if key != ""]
if not params:
continue
if params[0] == "type":
# type declare
type_underlying[params[1]] = params[2]
if params[0] == "const" and params[1] == "(":
# const definition
const_syntax = True
continue
elif params[0] == ")":
const_syntax = False
iota = -1
cursor_type = ""
if const_syntax:
const_name = params[0]
if len(params) == 4:
# type declared
const_type = params[1]
const_value = params[3]
if const_value == "iota":
cursor_type = const_type
iota = 0
const_value = iota.__str__()
iota += 1
else:
const_value = iota.__str__()
const_type = cursor_type
iota += 1
if const_name == "_":
continue
if const_type in const_map:
group = const_map[const_type]
else:
group = ConstGroup()
group.const_type = const_type
const_map[const_type] = group
if const_value in group.map_keys:
continue
# trim prefix
m = trim_prefix_reg.match(const_name)
if m:
prefix = m.group("prefix")
const_name = const_name.removeprefix(prefix)
# trim prefix type
if const_name.startswith(const_type):
const_name = const_name[len(const_type):]
group.map_keys[const_value] = True # avoid duplicated key
const = Const()
const.const_name = const_name
const.const_value = const_value
group.const_list.append(const)
print(f"ConstTypes: {type_underlying}")
# 修改包名
sb = "package unity\n\n"
sb += "// This is generated file. Do not modify.\n\n"
# write const
for k in const_map:
group = const_map[k]
sb += group.declare_str()
sb += "\n"
with io.open("const_map.go", "wb") as f:
f.write(sb.encode("utf-8"))
print("generated const_map.go")
在 python 迁移到 go 的过程中,面对已经成型的对象类定义,迁移和修改类定义不同于逻辑代码,是很枯燥痛苦的过程。
通过以下脚本文件可以实现快速转换。
使用注意
dict 字符串,可能被替换修改,如果出现该问题,请根据实际业务情况修改 map_go_type 方法。msg tag 为我个人业务需求,可以直接删除或修改为其他tag。在 lazy=true 模式的 el-tree 中,节点通过 load 方法加载。如果有需要手动刷新节点数据的需求,可以使用以下方法:
return {
treeRootNode: null
}
先说结论。
在调用 stringify 之前把 Date 类型先格式化为字符串避免。
export default {
/**
* 解决 stringify 导致的时区丢失,提前把所有日期类型字段转化为字符串
* @param data 转换对象
* @returns {*}
*/
formatDateTime(data){
for (const key in data){
const value = data[key]
if (value instanceof Date) {
const year = value.getFullYear()
const month = (value.getMonth() < 9 ? '0' : '') + (value.getMonth() + 1)
const day = (value.getDate() < 10 ? '0' : '') + value.getDate()
const hour = (value.getHours() < 10 ? '0' : '') + value.getHours()
const minute = (value.getMinutes() < 10 ? '0' : '') + value.getMinutes()
const second = (value.getSeconds() < 10 ? '0' : '') + value.getSeconds()
const milliseconds = (value.getSeconds() < 100 ? value.getSeconds() < 10 ? '00' : '0' : '') + value.getSeconds()
data[key] = `${year}-${month}-${day}T${hour}:${minute}:${second}.${milliseconds}Z`
}
}
return data
}
}
今天使用 httpx/requests 对部分 httpx 网站进行访问,出现以下问题:
httpx.ConnectError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1002)
近几年为了解决一些不同项目的业务问题陆续开发了很多工具类。但是每次新建项目都要把这些工具类拽来拽去特别麻烦。 所以搞了一个工具包,提交到了中央仓库。每次新建项目的时候只需要引入依赖即可。