There no checking on platform or sessiontype on post modules?

--- Original Message ---

From: "jlee-r7" <notifications@github.com>
Sent: May 7, 2013 11:26 PM
To: "rapid7/metasploit-framework" <metasploit-framework@noreply.github.com>
Cc: "Meatballs1" <campbell_ab@hotmail.com>
Subject: Re: [metasploit-framework] Windows SSO Post Module (mimikatz) (#1789)

> +                     'Author'         => ['Ben Campbell <eat_meatballs[at]hotmail.co.uk>'],
> +                     'Platform'       => ['win'],
> +                     'SessionTypes'   => ['meterpreter' ]
> +             ))
> +     end
> +
> +     def run
> +             print_status("Running module against #{sysinfo['Computer']}")
> +             if (client.platform =~ /x86/) and (client.sys.config.sysinfo['Architecture'] =~ /x64/)
> +                     print_error("x64 platform requires x64 meterpreter and mimikatz extension")
> +                     return
> +             end
> +
> +             unless client.mimikatz
> +                     vprint_status("Loading mimikatz extension...")
> +                     client.core.use("mimikatz")

This will fail on any session that isn't a native windows meterpreter, with an `Errno::ENOENT` exception (yeah, that's a terrible exception, but them's the breaks).

---
Reply to this email directly or view it on GitHub:
https://github.com/rapid7/metasploit-framework/pull/1789/files#r4125635