06 2021 档案

摘要:Take the MAC address and convert the first octet from hexadecimal into binary.Note: The MAC address 11:22:33:44:55:66 will be used for the following e 阅读全文
posted @ 2021-06-09 15:58 bert_qin 阅读(1138) 评论(0) 推荐(0)
摘要:背景 有一个web服务由systemctl控制。 现在要通过web页面升级程序。 升级前要停掉web服务,否则无法更新web相关的文件。 执行systemctl stop web时,升级程序也被杀死了... 原因 默认情况下systemctl stop 时会对同一个control group (cg 阅读全文
posted @ 2021-06-04 14:08 bert_qin 阅读(693) 评论(0) 推荐(0)
摘要:背景 假设现在有一个密码:12345678‘ “ \ 现在需要将这个密码作为一个参数传给一个可执行程序a.exe a.exe ”密码“ 或者a.exe '密码' 这个时候就需要对’或者”,\进行转义。 某些语言只支持双引号字符串,例如C。 repr方法 python repr函数可以解决这个问题。 阅读全文
posted @ 2021-06-04 13:52 bert_qin 阅读(1307) 评论(0) 推荐(0)
摘要:如果一个字符串包含‘ “ \ $ #等特殊字符,转成可以在shell命令中使用的字符串非常麻烦。 这样的字符串常出现在密码字符串中。 如果有’ ”的嵌套,手动转换将更困难,非常容易出错。 现在发现python内建模块shlex可以处理这类问题。shlex是一个shell语义分析器。 具体使用可以参考 阅读全文
posted @ 2021-06-03 15:48 bert_qin 阅读(180) 评论(0) 推荐(0)