1
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:
Brent Cook 2017-09-01 03:29:26 -05:00
parent 6eb7cb7e79
commit 167c2d380a
No known key found for this signature in database
GPG Key ID: 1FFAA0B24B708F96
2 changed files with 4 additions and 4 deletions

View File

@ -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.

View File

@ -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...");