Rewrite the logic to be positive
unless is the devil. unless/else doubly so.bug/bundler_fix
parent
a1bd640eff
commit
4b01213fb5
|
@ -30,7 +30,7 @@ module Payload::Linux::BindTcp
|
|||
}
|
||||
|
||||
# Generate the more advanced stager if we have the space
|
||||
unless self.available_space.nil? || required_space > self.available_space
|
||||
if self.available_space && required_space < self.available_space
|
||||
conf[:exitfunk] = datastore['EXITFUNC'],
|
||||
conf[:reliable] = true
|
||||
end
|
||||
|
|
|
@ -33,7 +33,7 @@ module Payload::Linux::ReverseTcp
|
|||
}
|
||||
|
||||
# Generate the advanced stager if we have space
|
||||
unless self.available_space.nil? || required_space > self.available_space
|
||||
if self.available_space && required_space < self.available_space
|
||||
conf[:exitfunk] = datastore['EXITFUNC']
|
||||
conf[:reliable] = true
|
||||
end
|
||||
|
|
|
@ -34,7 +34,7 @@ module Payload::Windows::BindTcp
|
|||
}
|
||||
|
||||
# Generate the more advanced stager if we have the space
|
||||
unless self.available_space.nil? || required_space > self.available_space
|
||||
if self.available_space && required_space < self.available_space
|
||||
conf[:exitfunk] = datastore['EXITFUNC'],
|
||||
conf[:reliable] = true
|
||||
end
|
||||
|
|
|
@ -32,7 +32,7 @@ module Payload::Windows::BindTcpRc4
|
|||
}
|
||||
|
||||
# Generate the more advanced stager if we have the space
|
||||
unless self.available_space.nil? || required_space > self.available_space
|
||||
if self.available_space && required_space < self.available_space
|
||||
conf[:exitfunk] = datastore['EXITFUNC'],
|
||||
conf[:reliable] = true
|
||||
end
|
||||
|
|
|
@ -50,7 +50,7 @@ module Payload::Windows::ReverseHttp
|
|||
}
|
||||
|
||||
# Add extra options if we have enough space
|
||||
unless self.available_space.nil? || required_space > self.available_space
|
||||
if self.available_space && required_space < self.available_space
|
||||
conf[:url] = luri + generate_uri
|
||||
conf[:exitfunk] = datastore['EXITFUNC']
|
||||
conf[:ua] = datastore['MeterpreterUserAgent']
|
||||
|
|
|
@ -34,7 +34,7 @@ module Payload::Windows::ReverseTcp
|
|||
}
|
||||
|
||||
# Generate the advanced stager if we have space
|
||||
unless self.available_space.nil? || required_space > self.available_space
|
||||
if self.available_space && required_space < self.available_space
|
||||
conf[:exitfunk] = datastore['EXITFUNC']
|
||||
conf[:reliable] = true
|
||||
end
|
||||
|
|
|
@ -38,7 +38,7 @@ module Payload::Windows::ReverseTcpDns
|
|||
}
|
||||
|
||||
# Generate the advanced stager if we have space
|
||||
unless self.available_space.nil? || required_space > self.available_space
|
||||
if self.available_space && required_space < self.available_space
|
||||
conf[:exitfunk] = datastore['EXITFUNC']
|
||||
conf[:reliable] = true
|
||||
end
|
||||
|
|
|
@ -34,7 +34,7 @@ module Payload::Windows::ReverseTcpRc4
|
|||
}
|
||||
|
||||
# Generate the advanced stager if we have space
|
||||
unless self.available_space.nil? || required_space > self.available_space
|
||||
if self.available_space && required_space < self.available_space
|
||||
conf[:exitfunk] = datastore['EXITFUNC']
|
||||
conf[:reliable] = true
|
||||
end
|
||||
|
|
|
@ -34,7 +34,7 @@ module Payload::Windows::ReverseTcpRc4Dns
|
|||
}
|
||||
|
||||
# Generate the advanced stager if we have space
|
||||
unless self.available_space.nil? || required_space > self.available_space
|
||||
if self.available_space && required_space < self.available_space
|
||||
conf[:exitfunk] = datastore['EXITFUNC']
|
||||
conf[:reliable] = true
|
||||
end
|
||||
|
|
|
@ -36,7 +36,7 @@ module Payload::Windows::ReverseWinHttp
|
|||
}
|
||||
|
||||
# Add extra options if we have enough space
|
||||
unless self.available_space.nil? || required_space > self.available_space
|
||||
if self.available_space && required_space < self.available_space
|
||||
conf[:uri] = generate_uri
|
||||
conf[:exitfunk] = datastore['EXITFUNC']
|
||||
conf[:verify_cert_hash] = opts[:verify_cert_hash]
|
||||
|
|
|
@ -32,7 +32,7 @@ module Payload::Windows::BindTcp_x64
|
|||
}
|
||||
|
||||
# Generate the more advanced stager if we have the space
|
||||
unless self.available_space.nil? || required_space > self.available_space
|
||||
if self.available_space && required_space < self.available_space
|
||||
conf[:exitfunk] = datastore['EXITFUNC'],
|
||||
conf[:reliable] = true
|
||||
end
|
||||
|
|
|
@ -54,7 +54,7 @@ module Payload::Windows::ReverseHttp_x64
|
|||
}
|
||||
|
||||
# add extended options if we do have enough space
|
||||
unless self.available_space.nil? || required_space > self.available_space
|
||||
if self.available_space && required_space < self.available_space
|
||||
conf[:url] = luri + generate_uri
|
||||
conf[:exitfunk] = datastore['EXITFUNC']
|
||||
conf[:ua] = datastore['MeterpreterUserAgent']
|
||||
|
|
|
@ -41,7 +41,7 @@ module Payload::Windows::ReverseTcp_x64
|
|||
}
|
||||
|
||||
# Generate the advanced stager if we have space
|
||||
unless self.available_space.nil? || required_space > self.available_space
|
||||
if self.available_space && required_space < self.available_space
|
||||
conf[:exitfunk] = datastore['EXITFUNC']
|
||||
conf[:reliable] = true
|
||||
end
|
||||
|
|
|
@ -37,7 +37,7 @@ module Payload::Windows::ReverseWinHttp_x64
|
|||
}
|
||||
|
||||
# Add extra options if we have enough space
|
||||
unless self.available_space.nil? || required_space > self.available_space
|
||||
if self.available_space && required_space < self.available_space
|
||||
conf[:uri] = generate_uri
|
||||
conf[:exitfunk] = datastore['EXITFUNC']
|
||||
conf[:verify_cert_hash] = opts[:verify_cert_hash]
|
||||
|
|
Loading…
Reference in New Issue