Please use the sysinfo method provided by the Msf::PostMixin mixin. Should be available for you since it's a post module :)