Exploit::Remote::HttpServer NameError

The variable "sock" doesn't seems to exist in this context.
This cause the method to throw a "NameError" (when using the "get_uri" method, in my case).

I'm not sure if this variable never exist in the context, so I just added a verification.