{"action":"closed","issue":{"url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/4273","labels_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/4273/labels{/name}","comments_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/4273/comments","events_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/4273/events","html_url":"https://github.com/rapid7/metasploit-framework/issues/4273","id":50251006,"number":4273,"title":"Exceptions during session creation are invisible to the user","user":{"login":"hdm","id":1171392,"avatar_url":"https://avatars.githubusercontent.com/u/1171392?v=3","gravatar_id":"","url":"https://api.github.com/users/hdm","html_url":"https://github.com/hdm","followers_url":"https://api.github.com/users/hdm/followers","following_url":"https://api.github.com/users/hdm/following{/other_user}","gists_url":"https://api.github.com/users/hdm/gists{/gist_id}","starred_url":"https://api.github.com/users/hdm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hdm/subscriptions","organizations_url":"https://api.github.com/users/hdm/orgs","repos_url":"https://api.github.com/users/hdm/repos","events_url":"https://api.github.com/users/hdm/events{/privacy}","received_events_url":"https://api.github.com/users/hdm/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rapid7/metasploit-framework/labels/bug","name":"bug","color":"e11d21"},{"url":"https://api.github.com/repos/rapid7/metasploit-framework/labels/library","name":"library","color":"fad8c7"}],"state":"closed","locked":false,"assignee":{"login":"wchen-r7","id":1170914,"avatar_url":"https://avatars.githubusercontent.com/u/1170914?v=3","gravatar_id":"","url":"https://api.github.com/users/wchen-r7","html_url":"https://github.com/wchen-r7","followers_url":"https://api.github.com/users/wchen-r7/followers","following_url":"https://api.github.com/users/wchen-r7/following{/other_user}","gists_url":"https://api.github.com/users/wchen-r7/gists{/gist_id}","starred_url":"https://api.github.com/users/wchen-r7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wchen-r7/subscriptions","organizations_url":"https://api.github.com/users/wchen-r7/orgs","repos_url":"https://api.github.com/users/wchen-r7/repos","events_url":"https://api.github.com/users/wchen-r7/events{/privacy}","received_events_url":"https://api.github.com/users/wchen-r7/received_events","type":"User","site_admin":false},"milestone":null,"comments":0,"created_at":"2014-11-27T03:35:54Z","updated_at":"2015-11-23T12:02:24Z","closed_at":"2015-11-23T12:02:24Z","body":"Exceptions thrown during handle_connection() and handle_stage_connection() are logged, but not shown to the user. For example, connecting to a meterpreter reverse_tcp listener results in the following log entry, but shows no output in the console. Fixing this is relatively easy (handler.rb needs a begin/rescue/print_error sequence).\r\n```\r\n[11/26/2014 21:22:36] [w(0)] core: Generating SSL certificate for Meterpreter sessions\r\n[11/26/2014 21:22:36] [w(0)] core: Generated SSL certificate for Meterpreter sessions\r\n[11/26/2014 21:22:36] [e(0)] core: Exception raised from handle_connection: OpenSSL::SSL::SSLError: SSL_accept returned=1 errno=0 state=unknown state: unknown protocol\r\n\r\n/data/work/msf-hdm/lib/rex/post/meterpreter/client.rb:168:in `accept'\r\n/data/work/msf-hdm/lib/rex/post/meterpreter/client.rb:168:in `swap_sock_plain_to_ssl'\r\n/data/work/msf-hdm/lib/rex/post/meterpreter/client.rb:146:in `init_meterpreter'\r\n/data/work/msf-hdm/lib/msf/base/sessions/meterpreter.rb:75:in `initialize'\r\n/data/work/msf-hdm/lib/msf/base/sessions/meterpreter_x86_win.rb:16:in `initialize'\r\n/data/work/msf-hdm/lib/msf/core/handler.rb:189:in `new'\r\n/data/work/msf-hdm/lib/msf/core/handler.rb:189:in `create_session'\r\n/data/work/msf-hdm/lib/msf/core/payload/stager.rb:199:in `handle_connection_stage'\r\n/data/work/msf-hdm/lib/msf/core/payload/stager.rb:185:in `handle_connection'\r\n/data/work/msf-hdm/lib/msf/core/handler/reverse_tcp.rb:169:in `block in start_handler'\r\n/data/work/msf-hdm/lib/msf/core/thread_manager.rb:100:in `call'\r\n/data/work/msf-hdm/lib/msf/core/thread_manager.rb:100:in `block in spawn'\r\n```"}}