Added pre_execute, execute and post_execute to modules.

git-svn-id: https://beef.googlecode.com/svn/trunk@1197 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9
This commit is contained in:
passbe
2011-08-17 04:04:32 +00:00
parent 8fe714881a
commit 2e70f86866
37 changed files with 50 additions and 36 deletions

View File

@@ -29,7 +29,7 @@ class Coldfusion_dir_traversal_exploit < BeEF::Core::Command
]
end
def callback
def post_execute
save({'result' => @datastore['result']})
end

View File

@@ -21,7 +21,7 @@ class Detect_local_settings < BeEF::Core::Command
BeEF::Core::NetworkStack::Handlers::AssetHandler.instance.bind('/modules/network/detect_local_settings/Beeffeine.class','/Beeffeine','class')
end
def callback
def post_execute
content = {}
content['internal ip'] = @datastore['internal_ip'] if not @datastore['internal_ip'].nil?
content['internal hostname'] = @datastore['internal_hostname'] if not @datastore['internal_hostname'].nil?

View File

@@ -68,7 +68,7 @@ class Inter_protocol_win_bindshell < BeEF::Core::Command
]
end
def callback
def post_execute
content = {}
content['result'] = @datastore['result'] if not @datastore['result'].nil?
content['fail'] = @datastore['fail'] if not @datastore['fail'].nil?

View File

@@ -30,7 +30,7 @@ class Jboss_jmx_upload_exploit < BeEF::Core::Command
]
end
def callback
def post_execute
save({'result' => @datastore['result']})
end

View File

@@ -37,7 +37,7 @@ class Vtiger_crm_upload_exploit < BeEF::Core::Command
]
end
def callback
def post_execute
return if @datastore['result'].nil?
save({'result' => @datastore['result']})