We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f0da090 commit a78fa7cCopy full SHA for a78fa7c
lib/msf/core/handler.rb
@@ -189,7 +189,14 @@ def create_session(conn, opts={})
189
# If the payload we merged in with has an associated session factory,
190
# allocate a new session.
191
if (self.session)
192
- s = self.session.new(conn, opts)
+ begin
193
+ s = self.session.new(conn, opts)
194
+ rescue ::Exception => e
195
+ # We just wanna show and log the error, not trying to swallow it.
196
+ print_error("#{e.class} #{e.message}")
197
+ elog("#{e.class} #{e.message}\n#{e.backtrace * "\n"}")
198
+ raise e
199
+ end
200
201
# Pass along the framework context
202
s.framework = framework
0 commit comments