Skip to content

Commit 910ae8a

Browse files
committed
Fix rapid7#5461, actually stop a job from the RPC service
Fix rapid7#5461. The RPC service is incorrectly using the wrong method to stop a job, this patch should fix that.
1 parent 26785b3 commit 910ae8a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/msf/core/rpc/v10/rpc_job.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@ def rpc_list
2828
# @example Here's how you would use this from the client:
2929
# rpc.call('job.stop', 0)
3030
def rpc_stop(jid)
31-
obj = self.framework.jobs[jid.to_s]
31+
jid = jid.to_s
32+
obj = self.framework.jobs[jid]
3233
error(500, "Invalid Job") if not obj
33-
obj.stop
34+
self.framework.jobs.stop_job(jid)
3435
{ "result" => "success" }
3536
end
3637

0 commit comments

Comments
 (0)