Skip to content

Commit 1e0dcb9

Browse files
committed
Land rapid7#7071, Fix off-by-one error in rapid7#6954
2 parents 74b4087 + 6e7f07f commit 1e0dcb9

14 files changed

+14
-14
lines changed

lib/msf/core/payload/linux/bind_tcp.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def generate
3030
}
3131

3232
# Generate the more advanced stager if we have the space
33-
if self.available_space && required_space < self.available_space
33+
if self.available_space && required_space <= self.available_space
3434
conf[:exitfunk] = datastore['EXITFUNC'],
3535
conf[:reliable] = true
3636
end

lib/msf/core/payload/linux/reverse_tcp.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def generate
3333
}
3434

3535
# Generate the advanced stager if we have space
36-
if self.available_space && required_space < self.available_space
36+
if self.available_space && required_space <= self.available_space
3737
conf[:exitfunk] = datastore['EXITFUNC']
3838
conf[:reliable] = true
3939
end

lib/msf/core/payload/windows/bind_tcp.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def generate
3434
}
3535

3636
# Generate the more advanced stager if we have the space
37-
if self.available_space && required_space < self.available_space
37+
if self.available_space && required_space <= self.available_space
3838
conf[:exitfunk] = datastore['EXITFUNC'],
3939
conf[:reliable] = true
4040
end

lib/msf/core/payload/windows/bind_tcp_rc4.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def generate
3232
}
3333

3434
# Generate the more advanced stager if we have the space
35-
if self.available_space && required_space < self.available_space
35+
if self.available_space && required_space <= self.available_space
3636
conf[:exitfunk] = datastore['EXITFUNC'],
3737
conf[:reliable] = true
3838
end

lib/msf/core/payload/windows/reverse_http.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def generate(opts={})
5050
}
5151

5252
# Add extra options if we have enough space
53-
if self.available_space && required_space < self.available_space
53+
if self.available_space && required_space <= self.available_space
5454
conf[:url] = luri + generate_uri
5555
conf[:exitfunk] = datastore['EXITFUNC']
5656
conf[:ua] = datastore['MeterpreterUserAgent']

lib/msf/core/payload/windows/reverse_tcp.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def generate
3434
}
3535

3636
# Generate the advanced stager if we have space
37-
if self.available_space && required_space < self.available_space
37+
if self.available_space && required_space <= self.available_space
3838
conf[:exitfunk] = datastore['EXITFUNC']
3939
conf[:reliable] = true
4040
end

lib/msf/core/payload/windows/reverse_tcp_dns.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def generate
3838
}
3939

4040
# Generate the advanced stager if we have space
41-
if self.available_space && required_space < self.available_space
41+
if self.available_space && required_space <= self.available_space
4242
conf[:exitfunk] = datastore['EXITFUNC']
4343
conf[:reliable] = true
4444
end

lib/msf/core/payload/windows/reverse_tcp_rc4.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def generate
3434
}
3535

3636
# Generate the advanced stager if we have space
37-
if self.available_space && required_space < self.available_space
37+
if self.available_space && required_space <= self.available_space
3838
conf[:exitfunk] = datastore['EXITFUNC']
3939
conf[:reliable] = true
4040
end

lib/msf/core/payload/windows/reverse_tcp_rc4_dns.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def generate
3434
}
3535

3636
# Generate the advanced stager if we have space
37-
if self.available_space && required_space < self.available_space
37+
if self.available_space && required_space <= self.available_space
3838
conf[:exitfunk] = datastore['EXITFUNC']
3939
conf[:reliable] = true
4040
end

lib/msf/core/payload/windows/reverse_winhttp.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def generate(opts={})
3636
}
3737

3838
# Add extra options if we have enough space
39-
if self.available_space && required_space < self.available_space
39+
if self.available_space && required_space <= self.available_space
4040
conf[:uri] = generate_uri
4141
conf[:exitfunk] = datastore['EXITFUNC']
4242
conf[:verify_cert_hash] = opts[:verify_cert_hash]

0 commit comments

Comments
 (0)