Skip to content

Support field filtering in CSV output (-f option for -csv) #1371

@soonghee2

Description

@soonghee2

Currently, the -csv option outputs all available fields in the CSV format. However, users may want to extract only specific fields to reduce unnecessary data and improve readability.

Please describe your feature request:

When -csv is used alone, all fields are included (default behavior).
When -csv is used with -f "ip,port", only the specified fields will be included in the CSV output.
The -f option will be ignored if -csv is not specified.

Describe the use case of this feature:

naabu -csv          # Outputs all fields in CSV
naabu -csv -f "ip,port"  # Outputs only "ip" and "port" columns

Expected Benefits

More flexibility for users who need only specific fields.
Reduces unnecessary data processing for downstream applications.
Enhances usability of the CSV output feature.

Metadata

Metadata

Assignees

Labels

Type: EnhancementMost issues will probably ask for additions or changes.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions