Skip to content

Commit

Permalink
Merge pull request #238 from 0xa13d/add-wsaconnect-api
Browse files Browse the repository at this point in the history
  • Loading branch information
williballenthin authored Mar 4, 2024
2 parents 078db94 + 48fcfa9 commit 5a9eb33
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions speakeasy/winenv/api/usermode/ws2_32.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,24 @@ def WSAIoctl(self, emu, argv, ctx={}):

return windefs.ERROR_SUCCESS

@apihook('WSAConnect', argc=7, conv=_arch.CALL_CONV_STDCALL)
def WSAConnect(self, emu, argv, ctx={}):
"""
int WSAAPI WSAConnect(
SOCKET s,
const sockaddr *name,
int namelen,
LPWSABUF lpCallerData,
LPWSABUF lpCalleeData,
LPQOS lpSQOS,
LPQOS lpGQOS
);
"""

# TODO: Add actual function logic. However, for now, just call connect()

return self.connect(emu, argv[:3], ctx)

@apihook('socket', argc=3, conv=_arch.CALL_CONV_STDCALL, ordinal=23)
def socket(self, emu, argv, ctx={}):
"""
Expand Down

0 comments on commit 5a9eb33

Please sign in to comment.