forked from rapid7/metasploit-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests for aux and exploit cmd_check and cmd_run
- Loading branch information
1 parent
2fa2709
commit e5241b4
Showing
8 changed files
with
1,251 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
spec/file_fixtures/modules/payloads/singles/generic/no_session_payload.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
## | ||
# This module requires Metasploit: https://metasploit.com/download | ||
# Current source: https://github.com/rapid7/metasploit-framework | ||
## | ||
|
||
module MetasploitModule | ||
|
||
CachedSize = 12 | ||
|
||
include Msf::Payload::Single | ||
include Msf::Sessions::CommandShellOptions | ||
|
||
def initialize(info = {}) | ||
super( | ||
merge_info( | ||
info, | ||
'Name' => 'mock payload which gives no session', | ||
'Description' => 'mock payload which gives no session', | ||
'Author' => ['unknown'], | ||
'License' => MSF_LICENSE, | ||
'Platform' => ['unix'], | ||
'Arch' => ARCH_CMD, | ||
# 'Handler' => Msf::Handler::ReverseTcp, | ||
'Session' => Msf::Sessions::CommandShell, | ||
'PayloadType' => 'cmd', | ||
'Payload' => { 'Offsets' => {}, 'Payload' => '' } | ||
) | ||
) | ||
end | ||
|
||
def wait_for_session(_t = wfs_delay) | ||
# noop | ||
end | ||
|
||
def generate | ||
'mock payload' | ||
end | ||
end |
Oops, something went wrong.