Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get name method inconsistencies #32

Open
zeroSteiner opened this issue Jun 18, 2021 · 1 comment
Open

Get name method inconsistencies #32

zeroSteiner opened this issue Jun 18, 2021 · 1 comment

Comments

@zeroSteiner
Copy link
Contributor

There are inconsistencies with the return value of the #getsockname method of Rex::Socket instances. This creates a problem when users of the socket call that method because they then need to know whether it's a Rex::Socket or a native Ruby socket. The return value of the Rex version should be the same as the native Ruby counterpart. Additionally, Rex also provides a #getlocalname method which is not provided by Ruby. The return value of this is also an array, which it seems like it should probably be a string like the other get name methods. This would be a breaking API change though.

The following table shows the return types of the various methods.

Rex::Socket Native Ruby
#getsockname array string
#getpeername string string
#getlocalname array N/A
@sempervictus
Copy link

Heh, we used to have handlers for jruby cases iirc.
This is "fixable" but the consumer audit would be BRUTAL, and we need to fix the logger thing first or this will be like blind clowns running a marathon in full-dress through a minefield.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants