Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added scan_pause method to scan.rb #12

Merged
merged 1 commit into from
Aug 22, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Added scan_pause option to scan.rb
  • Loading branch information
MickUbuntu committed Aug 22, 2012
commit a221dd519a9aff5a2bf0c426e0b8ce0c86048c0b
12 changes: 12 additions & 0 deletions lib/nexpose/scan.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,18 @@ def scan_resume(scan_id)
r.success ? r.attributes['status'] : nil
end


#----------------------------------------------------------------
# Pauses a scan.
#
# @param scan_id The scan ID.
# @return The status(true|false) if it exists or null.
#----------------------------------------------------------------
def scan_pause(scan_id)
r = execute(make_xml('ScanPauseRequest',{ 'scan-id' => scan_id}))
r.success ? r.attributes['status'] : nil
end

def scan_activity
r = execute(make_xml('ScanActivityRequest', {}))
if (r.success)
Expand Down