When running (e.g.) --os-pwnmsfconsole called from within the sqlmap automatically terminates with an error Session manipulation failed: no implicit conversion of nil into String (not displayed from sqlmap, but can be found inside $HOME/.msf4/logs/framework.log):
It seems that subprocess-ing the msfconsole is crashing because of the (included) library RbReadline, which doesn't like to be run inside the pseudo-terminal environment (similar issue: https://github.com/ConnorAtherton/rb-readline/pull/135). Easy fix would be to put the ss = StringScanner.new(seq.to_s) instead of the current (problematic) ss = StringScanner.new(seq) in metasploit/apps/pro/vendor/bundle/ruby/2.3.0/gems/rb-readline-0.5.4/lib/rbreadline.rb:2398, but that would require patching of thirdparty code.
Also, it seems that rbreadline used by metasploit is causing problems all around (Google dork: rbreadline metasploit)
When running (e.g.)
--os-pwn
msfconsole
called from within the sqlmap automatically terminates with an errorSession manipulation failed: no implicit conversion of nil into String
(not displayed from sqlmap, but can be found inside$HOME/.msf4/logs/framework.log
):It seems that
subprocess
-ing themsfconsole
is crashing because of the (included) libraryRbReadline
, which doesn't like to be run inside the pseudo-terminal environment (similar issue: https://github.com/ConnorAtherton/rb-readline/pull/135). Easy fix would be to put thess = StringScanner.new(seq.to_s)
instead of the current (problematic)ss = StringScanner.new(seq)
inmetasploit/apps/pro/vendor/bundle/ruby/2.3.0/gems/rb-readline-0.5.4/lib/rbreadline.rb:2398
, but that would require patching of thirdparty code.Also, it seems that
rbreadline
used by metasploit is causing problems all around (Google dork:rbreadline metasploit
)