Realized the option of specifying the local address of zgrab2#487
Closed
Baoxd123 wants to merge 2 commits intozmap:masterfrom
Closed
Realized the option of specifying the local address of zgrab2#487Baoxd123 wants to merge 2 commits intozmap:masterfrom
Baoxd123 wants to merge 2 commits intozmap:masterfrom
Conversation
Contributor
|
Hey @Baoxd123! Thanks for opening this issue + PR. /tmp/zgrab2-baoxd on fix-local-addr ⌚ 18:21:08
$ echo "prstephens.com" | ./zgrab2 tls --local-addr="171.67.71.210:45678"An initial TCP connection is opened with the correct
I'm working on adding support for this so if you want to wait for that to be done, feel free. Or if you get something working for all modules, I'll review that! |
phillip-stephens
requested changes
Feb 4, 2025
Contributor
phillip-stephens
left a comment
There was a problem hiding this comment.
Mentioned in prior comment, this is an incomplete fix and currently modules are ignoring this flag in at minimum the TLS case.
Contributor
|
Closing with #519 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Realized the option of specifying the local address of zgrab2, which can be verified by tcpdump, example: 'echo "172.67.161.24, renovatepattaya.com" | ./zgrab2 --local-addr=128.192.12.101:0 tls'
How to Test
(long:"local-addr" description:"Local source address for outgoing connections (e.g. 192.168.10.2:0, port is required even if it's 0)")
In terminal 1, run zgrab2:
'echo "172.67.161.24, renovatepattaya.com" | ./zgrab2 --local-addr=128.192.12.101:0 tls'
In terminal 2, run tcpdump to verify the local address:
sudo tcpdump -i any -nn port 443
Notes & Caveats
In the previous version of zgrab2, 'config.go' had the 'local-addr' option but could not be used. I fixed the 'local-addr' option which will be shown by 'zgrab -h'. Users can specify different local addresses, if any.
Issue Tracking
#486