mirror of
https://github.com/rapid7/metasploit-framework
synced 2024-08-28 23:26:18 +02:00
Land #9686, add ipv6 to slowloris, rhost to non-scanner modules
This commit is contained in:
commit
1587b5b682
2
lib/msf/core/modules/external/shim.rb
vendored
2
lib/msf/core/modules/external/shim.rb
vendored
@ -32,7 +32,7 @@ class Msf::Modules::External::Shim
|
|||||||
render_template('common_metadata.erb', meta)
|
render_template('common_metadata.erb', meta)
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.mod_meta_common(mod, meta = {}, drop_rhost: true)
|
def self.mod_meta_common(mod, meta = {}, drop_rhost: false)
|
||||||
meta[:path] = mod.path.dump
|
meta[:path] = mod.path.dump
|
||||||
meta[:name] = mod.meta['name'].dump
|
meta[:name] = mod.meta['name'].dump
|
||||||
meta[:description] = mod.meta['description'].dump
|
meta[:description] = mod.meta['description'].dump
|
||||||
|
@ -76,14 +76,12 @@ def create_random_header_name(size=8, seq=string.ascii_uppercase + string.ascii_
|
|||||||
|
|
||||||
|
|
||||||
def init_socket(host, port, use_ssl=False, rand_user_agent=True):
|
def init_socket(host, port, use_ssl=False, rand_user_agent=True):
|
||||||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
s = socket.create_connection((host, port), 10)
|
||||||
s.settimeout(4)
|
s.settimeout(4)
|
||||||
|
|
||||||
if use_ssl:
|
if use_ssl:
|
||||||
s = ssl.wrap_socket(s)
|
s = ssl.wrap_socket(s)
|
||||||
|
|
||||||
s.connect((host, port))
|
|
||||||
|
|
||||||
s.send("GET /?{} HTTP/1.1\r\n".format(random.randint(0, 2000)).encode("utf-8"))
|
s.send("GET /?{} HTTP/1.1\r\n".format(random.randint(0, 2000)).encode("utf-8"))
|
||||||
|
|
||||||
if rand_user_agent:
|
if rand_user_agent:
|
||||||
|
Loading…
Reference in New Issue
Block a user