Skip to content

Commit

Permalink
--nargs
Browse files Browse the repository at this point in the history
  • Loading branch information
cn-kali-team committed Jun 20, 2023
1 parent 4ed4e01 commit d080c54
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
<!-- next-header -->

## [Unreleased] - ReleaseDate
## [2023.6.20] - 2023.6.20

### Fixes

- `--nargs`可以添加nuclei扩展参数, 比如:`--nargs "-etags intrusive"`,排除有入侵危险的template。

## [2023.6.13] - 2023.6.13

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Options:
--filter filter mode,Display only the fingerprint that is not empty
--irr include request/response pairs in the JSONL output
--help display usage information

--nargs nuclei args

```

Expand Down Expand Up @@ -290,6 +290,7 @@ iconv -f UTF-8 -t GB18030 Result.csv > Result.csv
- 如果识别到的组件在`plugins`目录下存在和组件同名的文件夹,会对目标调用Nuclei使用匹配到的插件进行检测,存在漏洞会输出到屏幕。
- 因为经过测试在指纹识别过程中同时调用nuclei检测漏洞会影响Web指纹识别的效果,也会拉长识别的时间,所以选择识别完Web指纹后将结果保存到文件,再解析文件调用nuclei检测。
- 目前支持将Web指纹识别的结果保存为`json``csv`格式,所以只能解析这两种格式。
- `--nargs`可以添加nuclei扩展参数, 比如:`--nargs "-etags intrusive"`,排除有入侵危险的template。
```bash
~ ./observer_ward_amd64 -t https://httpbin.org --csv result.csv --plugins 0x727/FingerprintHub/plugins
Expand Down
4 changes: 4 additions & 0 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ pub struct ObserverWardConfig {
#[argh(switch)]
#[serde(skip)]
pub irr: bool,
/// nuclei args
#[argh(option)]
#[serde(skip)]
pub nargs: Option<String>,
}

fn default_thread() -> u32 {
Expand Down
6 changes: 6 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,12 @@ pub async fn get_plugins_by_nuclei(
"-es",
"info", //排除info模板
]);
if let Some(nargs) = &config.nargs {
let args: Vec<&str> = nargs.split(' ').collect();
for arg in args {
command_line.arg(arg);
}
}
for p in exist_plugins.iter() {
command_line.args(["-t", p]);
}
Expand Down

0 comments on commit d080c54

Please sign in to comment.