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

Bug fix for scan_pause and scan_resume #13

Merged
merged 1 commit into from
Aug 31, 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
8 changes: 4 additions & 4 deletions lib/nexpose/scan.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@ def scan_status(param)
# Resumes a scan.
#
# @param scan_id The scan ID.
# @return The status(true|false) if it exists or null.
# @return Success(0|1) if it exists or null.
#----------------------------------------------------------------
def scan_resume(scan_id)
r = execute(make_xml('ScanResumeRequest', {'scan-id' => scan_id}))
r.success ? r.attributes['status'] : nil
r.success ? r.attributes['success'] : nil
end


#----------------------------------------------------------------
# Pauses a scan.
#
# @param scan_id The scan ID.
# @return The status(true|false) if it exists or null.
# @return Success(0|1) 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
r.success ? r.attributes['success'] : nil
end

def scan_activity
Expand Down