Closed neciptomurcuk-biz closed 2 years ago
I realize this issue is over a year old, however, I ran into this same issue and have done a bit of digging. I also believe it is loosely related to #12. I have been trying to better understand why this is occurring, my use case is TLS, and it looks like the HTTP module creates its own Dialer
and applies the local address before creating the TCP connection. TLS, SMTP, and SSH all ultimately rely on the standard Go net
module to create the TCP connection which abstracts away the dialer.
If you are still looking for a quick hack, you can modify DialTimeout
in net/dial.go
to create a Dialer
with the LocalAddr
field hard coded. Once I get a better grasp on why the HTTP module uses the custom connection and others don't, I may be able to create a PR for this issue.
As discussed in other issues, for Go related reasons, you're best off using network namespaces to make this happen.
We have tried zgrab2 with source-ip options. We have some ip address on host. When we have tried "zgrab2 --source-ip=ip_1 smtp --input-file input_file_name --output-file output_file_name" and have got tcpdump for that interface having multiple ips. We saw that only first ip not ip_1. I have also tested zgrab2 on windows and ubuntu both of them not put source-ip correctly for most module like smtp, pop3, ssh etc. except http module work correctly. There is no OS related issues because I have tested source-ips with curl or ping with -interface/source kinds of options and got tcpdump/wireshark I saw that source-ip are correctly matched. But zgrab2 does not work except http module. Thanks.