#!/usr/local/bin/ruby -w
puts "Hello World"
Save file as helloworld.rb
Penetration Testing Blog
#!/usr/local/bin/ruby -w
puts "Hello World"
Save file as helloworld.rb
Python
Paradigm: Object-oriented, imperative, functional, procedural, reflective
Typing discipline: Duck, dynamic, strong
Ruby
Paradigm: Multi-paradigm: Object-oriented, imperative, functional, reflective
Typing discipline: Duck, dynamic, strong
C
Paradigm: Imperative (procedural), structured
Typing discipline: Static, weak, manifest, nominal
C++
Paradigm: Multi-paradigm: procedural, functional, object-oriented, generic
Typing discipline: Static, nominative, partially inferred
C#
Paradigm: Structured, imperative, object-oriented, event-driven, task-driven, functional, generic, reflective, concurrent
Typing discipline: Static, dynamic, strong, safe, nominative, partially inferred
Perl
Paradigm: Multi-paradigm, functional, imperative, object-oriented (class-based), reflective, procedural, event-driven, generic
Typing discipline: Dynamic
Java
Paradigm: Multi-paradigm: object-oriented (class-based), structured, imperative, generic, reflective, concurrent
Typing discipline: Static, strong, safe, nominative, manifest
PHP
Paradigm: Imperative, functional, object-oriented, procedural, reflective
Typing discipline: Dynamic, weak
An error occurred while installing pcaprub (0.12.4), and Bundler cannot
continue.
Make sure that `gem install pcaprub -v '0.12.4'` succeeds before bundling.
This occurs during the installation process for Bundled Gems in Metasploit and within its local Git repository, e.g.:
cd ~/git/metasploit-framework/
bundle install
Note, ~/git/metasploit-framework/
is my locally defined directory for my Github repository in Kali Linux.
In the top example (see above), the error effects the “pcaprub” Gem. To fix this issue, run the following command:
sudo apt-get install libpcap-dev
This will install the package for libpcap-dev (development library for libpcap) – libpcap-dev Debian package
Once the libpcap-dev package has been installed, the bundle install command can be ran:
cd ~/git/metasploit-framework/
bundle install
Note, for other Gem installation errors during bundle install, it is likely to be an issue with missing packages in your system. The missing packages can be installed via sudo apt-get install [package_name]
.
##
# This module requires Metasploit: http://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Exploit::Remote
Rank = NormalRanking
def initialize(info={})
super(update_info(info,
'Name' => "[Vendor] [Software] [Root Cause] [Vulnerability type]",
'Description' => %q{
Say something that the user might need to know
},
'License' => MSF_LICENSE,
'Author' => [ 'Name' ],
'References' =>
[
[ 'URL', '' ]
],
'Platform' => 'win',
'Targets' =>
[
[ 'System or software version',
{
'Ret' => 0x41414141 # This will be available in `target.ret`
}
]
],
'Payload' =>
{
'BadChars' => "\x00"
},
'Privileged' => false,
'DisclosureDate' => "",
'DefaultTarget' => 0))
end
def check
# For the check command
end
def exploit
# Main function
end
end