lib/rex/compat.rb in librex-0.0.42 vs lib/rex/compat.rb in librex-0.0.43

- old
+ new

@@ -219,9 +219,19 @@ exe = Win32API.new("kernel32", "WinExec", ["PL"], "L") exe.call(cmd, 0) end # +# Verify the Console2 environment +# +def self.win32_console2_verify + buf = "\x00" * 512 + out = Win32API.new("kernel32", "GetStdHandle", ["L"], "L").call(STD_OUTPUT_HANDLE) + res = Win32API.new("kernel32","GetConsoleTitle", ["PL"], "L").call(buf, buf.length-1) rescue 0 + ( res > 0 and buf.index("Console2 command").nil? ) ? false : true +end + +# # Platform independent socket pair # def self.pipe if (! is_windows())