June 2019
Beginner to intermediate
660 pages
14h 30m
English
We will need string concatenation capabilities throughout our journey in dealing with Metasploit modules. We will have multiple instances where we need to concatenate two different results into a single string. We can perform string concatenation using the + operator. However, we can elongate a variable by appending data to it using the << 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 ...
Read now
Unlock full access