rapid7/metasploit-framework — comment on commit e204923966ecee6efb8aaf8e79df3e81e22a4913
File: modules/post/windows/recon/winlocalprv_esc.rb line 360
By todb-r7:

This should use `session.sys.config.sysinfo` instead. See how post/windows/gather/enum_chrome does this and lots of other session.sys.* calls. There should be very few cases where you need to shell out with a command.