December 2017
Intermediate to advanced
860 pages
16h 1m
English
We will need string concatenation capabilities throughout our journey dealing with Metasploit modules. We will have multiple instances where we need to concat two different results into a single string. We can perform string concatenation using + operator. However, we can elongate a variable by appending data to it using << operator:
irb(main):007:0> a = "Nipun" => "Nipun" irb(main):008:0> a << " loves" => "Nipun loves" irb(main):009:0> a << " Metasploit" => "Nipun loves Metasploit" irb(main):010:0> a => "Nipun loves Metasploit" irb(main):011:0> b = " and plays counter strike" => " and plays counter strike" irb(main):012:0> a+b => "Nipun loves Metasploit and plays counter strike"
We can see that we started by assigning ...
Read now
Unlock full access