Closed buddyho closed 5 years ago
貌似是不支持多个关键字,一个关键字的情况下无问题,配置两个及以上即在邮件中报该错误。
运行报错如下:
2019-06-20 16:47:20,377 [GSIL] [CRITICAL] please config GSIL/rules.gsil!
2019-06-20 16:47:20,378 [GSIL] [CRITICAL] Traceback (most recent call last):
File "/home/work/tool/app/GSIL/gsil/config.py", line 145, in
2019-06-20 16:47:20,423 [GSIL] [INFO] start monitor github information leakage: zrb
rules.gsil配置错误,可以贴上来看看
{ "zrb": { "kejidai": { "kejidai": { "mode": "normal-match", "ext": "php,java,python,node.js,properties" } } "zhijiandai"{ "zhijiandai":{ "mode": "normal-match", "ext": "php,java,python,node.js,properties" } } "caixiaoxian"{ "caixiaoxian":{ "mode": "normal-match", "ext": "php,java,python,node.js,properties" } }
}
}
JSON格式有问题,少了逗号和冒号,可以使用https://jsonformatter.curiousconcept.com/ 验证下。
问题解决,非常感谢。
/usr/work/tool/app/GSIL/gsil.py zrb Traceback (most recent call last): File "/usr/work/tool/app/GSIL/gsil.py", line 28, in sys.exit(gsil()) File "/home/work/tool/app/GSIL/gsil/init.py", line 105, in gsil start(sys.argv[1]) File "/home/work/tool/app/GSIL/gsil/init.py", line 65, in start rules = get_rules(rule_types) File "/home/work/tool/app/GSIL/gsil/config.py", line 166, in get_rules for types, rule_list in rules_dict.items(): NameError: name 'rules_dict' is not defined