mirror of
https://github.com/rapid7/metasploit-payloads
synced 2025-01-08 14:36:22 +01:00
fix sniffer/networkpug breakage
This commit is contained in:
parent
6eb7cb7e79
commit
167c2d380a
@ -460,8 +460,8 @@ DWORD __declspec(dllexport) InitServerExtension(Remote *remote)
|
||||
peername6 = NULL;
|
||||
peername_len = sizeof(peername);
|
||||
|
||||
if (remote->transport->get_socket) {
|
||||
getpeername(remote->transport->get_socket(remote->transport), &peername, &peername_len);
|
||||
if (remote->transport->get_handle) {
|
||||
getpeername(remote->transport->get_handle(remote->transport), &peername, &peername_len);
|
||||
}
|
||||
else {
|
||||
// TODO: not sure what to do here.
|
||||
|
@ -769,8 +769,8 @@ DWORD __declspec(dllexport) InitServerExtension(Remote *remote)
|
||||
peername4 = NULL;
|
||||
peername6 = NULL;
|
||||
peername_len = sizeof(peername);
|
||||
if (remote->transport->get_socket) {
|
||||
getpeername(remote->transport->get_socket(remote->transport), &peername, &peername_len);
|
||||
if (remote->transport->get_handle) {
|
||||
getpeername(remote->transport->get_handle(remote->transport), &peername, &peername_len);
|
||||
if(peername.sa_family == PF_INET) peername4 = (struct sockaddr_in *)&peername;
|
||||
|
||||
dprintf("[SERVER] Getting the IPv6 peer name of our socket...");
|
||||
|
Loading…
Reference in New Issue
Block a user