-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
windows不会写封禁IP到banip.txt #3
Comments
平台是winserver2019 1809 |
你把.env的内容发给我看看,如果没写入到txt会不会闪退?如果没有闪退就发一下检查到封禁ip时候的行为日志看看 |
env内容 日志文件路径LOG_FILE_PATH=C:\Users\Administrator\Desktop\frp_0.46.0\frp_0.46.0\frps.log 目标连接名称标记内容,逗号分隔TARGET_NAMES=RDP1,RDP2 IP白名单,逗号分隔WHITELIST=1.1.1.1,3.2.3.2 要写入被禁IP的文件路径BAN_FILE_PATH=C:\Users\Administrator\Desktop\frp_0.46.0\frp_0.46.0\banip.txt 当检测到被禁IP时要执行的脚本或程序路径EXECUTE_PATH=C:\Users\Administrator\Downloads\frps-log-ip-ban-main\frps-log-ip-ban-main\banip.ps1 检查日志文件的时间间隔(分钟)CHECK_INTERVAL=1 触发禁用IP的次数阈值THRESHOLD_COUNT=2 |
日志的话就是这两条一直循环 |
不会闪退,会一直重复这两条日志 |
你windows路径格式写错了,用双反斜杠\ |
实测env无论是单斜杠,还是双协杠都没有效果,我env配置上是双斜杠的 |
解决了大佬,log_time = datetime.strptime(match.group(1), '%Y/%m/%d %H:%M:%S'),GPT说日志格式不对,我改了之后,再跑了,感谢大佬 |
应该是frp0.52版本之前的日志时间和当前版本不一样,你也可以更新frp到0.60,因为最新版的frp日志时间精确到毫秒 |
能跑就行,不怕被爆破了,感谢大佬 |
不懂python额,大佬,看不懂。GPT说的都是废话,路径我也提前创建了banip.txt文件,就是无法自动写入进去,封禁脚本我手动执行可以添加防火墙规则,规则是我手动加到banip.txt的
The text was updated successfully, but these errors were encountered: