Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
beefproject
GitHub Repository: beefproject/beef
Path: blob/master/extensions/requester/models/http.rb
1154 views
1
#
2
# Copyright (c) 2006-2025 Wade Alcorn - [email protected]
3
# Browser Exploitation Framework (BeEF) - https://beefproject.com
4
# See the file 'doc/COPYING' for copying permission
5
#
6
module BeEF
7
module Core
8
module Models
9
#
10
# Table stores the http requests and responses from the requester.
11
#
12
class Http < BeEF::Core::Model
13
#
14
# Removes a request/response from the data store
15
#
16
def self.delete(id)
17
if id.to_s !~ /\A\d+\z/
18
(print_error 'Failed to remove response. Invalid response ID.'
19
return)
20
end
21
r = BeEF::Core::Models::Http.find(id.to_i)
22
if r.nil?
23
(print_error "Failed to remove response [id: #{id}]. Response does not exist."
24
return)
25
end
26
r.destroy
27
end
28
end
29
end
30
end
31
end
32
33