Skip to content

Get name method inconsistencies #32

@zeroSteiner

Description

@zeroSteiner

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions