一个基于正则匹配的简易代码敏感函数与关键字查找脚本
> python radar.py -h
usage: radar.py [-h] [-d DST] [-c LANGUAGE] [-e EXT] [-r RULE]
[-w [file_path]] [-n]
optional arguments:
-h, --help show this help message and exit
-d DST Directory or Single File Path
-c LANGUAGE code language rule,such as[common,java], default: [java]
-e EXT file extension, default: [all] or set [jsp,jspx,java]
-r RULE rules path, default: [rules.json]
-w [file_path] set result save path, default:[results_datetime.txt]
-n, --no-print don't print the result
# 检查单个文件
python radar.py -c java -d /code/webshell.jsp
# 检查文件夹下后缀为 jsp jspx java 的文件
python radar.py -c java -e jsp,jspx,java -d /code/for/check