From 3105ff3626fdd7c540243170841688dbe628df59 Mon Sep 17 00:00:00 2001 From: agix Date: Thu, 23 Jun 2016 15:44:35 +0200 Subject: [PATCH] fix error when encoder is nil --- lib/msf/core/payload_generator.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/msf/core/payload_generator.rb b/lib/msf/core/payload_generator.rb index 51aa1b9ebd..3b780eaca3 100644 --- a/lib/msf/core/payload_generator.rb +++ b/lib/msf/core/payload_generator.rb @@ -340,7 +340,8 @@ module Msf else raw_payload = generate_raw_payload raw_payload = add_shellcode(raw_payload) - if encoder.start_with?("@") + + if encoder != nil and encoder.start_with?("@") encoded_payload = multiple_encode_payload(raw_payload) else encoded_payload = encode_payload(raw_payload)