2022-5-21 myluzh
NOTE
netsh advfirewall firewall add rule name="VNC Server" dir=in program="C:\Program Files\RealVNC\VNC Server\vncserver.exe" security=authenticate action=allow
阅读全文>>
标签: vncserver.vnc
评论(0)
(404)
2022-5-18 myluzh
Windows
0x01 常用命令
查看当前防火墙状态:netsh advfirewall show allprofiles
关闭防火墙:netsh advfirewall set allprofiles state off
开启防火墙:netsh advfirewall set allprofiles state on
恢复初始防火墙设置:netsh advfirewall reset
设置默认输入和输出策略:netsh advfirewall set allprofiles firewallpolicy allowinbound,allowoutbound
以上是设置为允许,如果设置为拒绝使用blockinbound,blockoutbound
0x02 常用参数解释
dir=in|out
必备参数,指定进站方向还是出站方向
action=allow|block|bypass
必备参数,设定这个规则是允许还是阻断或者是跳过
program=]
可选参数,为某应用程序设定规则
[service=|any]
可选参数,为某系统服务设定规则
[description=]
可选参数,为这个规则加一个说明描述...
阅读全文>>
标签: 防火墙 windows cmd
评论(0)
(459)
2022-5-13 myluzh
Python
import re
subject = '080045000106309140003F2F7D100A01'
if (len(subject) % 2) == 0:
result = re.sub(r"(?<=\w)(?=(?:\w\w)+$)", "-", subject)
elif (len(subject) % 2) != 0:
a_subject = subject[:-1]
b_subject = subject[-1]
result = re.sub(r"(?<=\w)(?=(?:\w\w)+$)", "-", a_subject) + "-" + b_subject
print(result)
输出内容 08-00-45-00-01-06-30-91-40-00-3F-2F-7D-10-0A-01
阅读全文>>
标签: python
评论(0)
(463)