Skip to content
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

Add port number to CSV input and output #397

Merged
merged 2 commits into from
Feb 18, 2024
Merged

Conversation

AnthraX1
Copy link
Contributor

This PR allows setting a custom port in the CSV input and it also shows the port in output results.
The port number is added to the last field for backward compatibility reasons. However it's ugly when you need just IP, Port. You have to input IP,,,Port instead. You can take the target port number out in the JSON output of zgrab2 later.

How to Test

Domain and port:
echo ',google.com,,80' | ./zgrab2 http

IP and port:
echo '1.2.3.4,,,80' | ./zgrab2 http

Notes & Caveats

Port number won't be shown in the output if the input was not in CSV format. For example, when using just IP or domain per line and using -p option to supply the port number.

Issue Tracking

#344

@AnthraX1 AnthraX1 closed this Oct 14, 2023
@AnthraX1 AnthraX1 reopened this Oct 14, 2023
@zakird zakird merged commit 7c933df into zmap:master Feb 18, 2024
2 checks passed
@AnthraX1 AnthraX1 deleted the csv_port branch February 24, 2024 04:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants