1
mirror of https://github.com/rapid7/metasploit-framework synced 2024-11-05 14:57:30 +01:00

whitespace and remove useless comments

This commit is contained in:
Brent Cook 2016-05-13 21:45:41 -05:00
parent c3e618ad37
commit 7b83b06ad5
2 changed files with 8 additions and 14 deletions

View File

@ -1,7 +1,4 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
#
# $Id$
# $Revision$
msfbase = __FILE__ msfbase = __FILE__
while File.symlink?(msfbase) while File.symlink?(msfbase)
@ -25,11 +22,11 @@ module PatternCreate
opt.banner = "Usage: #{__FILE__} [options]\nExample: #{__FILE__} -l 50 -s ABC,def,123\nAd1Ad2Ad3Ae1Ae2Ae3Af1Af2Af3Bd1Bd2Bd3Be1Be2Be3Bf1Bf" opt.banner = "Usage: #{__FILE__} [options]\nExample: #{__FILE__} -l 50 -s ABC,def,123\nAd1Ad2Ad3Ae1Ae2Ae3Af1Af2Af3Bd1Bd2Bd3Be1Be2Be3Bf1Bf"
opt.separator '' opt.separator ''
opt.separator 'Options:' opt.separator 'Options:'
opt.on('-l', '--length <length>', Integer, "The length of the pattern") do |len| opt.on('-l', '--length <length>', Integer, "The length of the pattern") do |len|
options[:length] = len options[:length] = len
end end
opt.on('-s', '--sets <ABC,def,123>', Array, "Custom Pattern Sets") do |sets| opt.on('-s', '--sets <ABC,def,123>', Array, "Custom Pattern Sets") do |sets|
options[:sets] = sets options[:sets] = sets
end end
@ -62,7 +59,7 @@ class Driver
exit exit
end end
end end
def run def run
pattern = Rex::Text.pattern_create(@opts[:length], @opts[:sets]) pattern = Rex::Text.pattern_create(@opts[:length], @opts[:sets])
puts pattern puts pattern

View File

@ -1,7 +1,4 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
#
# $Id$
# $Revision$
msfbase = __FILE__ msfbase = __FILE__
while File.symlink?(msfbase) while File.symlink?(msfbase)
@ -29,14 +26,14 @@ module PatternOffset
options[:query] = query options[:query] = query
end end
opt.on('-l', '--length <length>', Integer, "The length of the pattern") do |len| opt.on('-l', '--length <length>', Integer, "The length of the pattern") do |len|
options[:length] = len options[:length] = len
end end
opt.on('-s', '--sets <ABC,def,123>', Array, "Custom Pattern Sets") do |sets| opt.on('-s', '--sets <ABC,def,123>', Array, "Custom Pattern Sets") do |sets|
options[:sets] = sets options[:sets] = sets
end end
opt.on_tail('-h', '--help', 'Show this message') do opt.on_tail('-h', '--help', 'Show this message') do
$stdout.puts opt $stdout.puts opt
exit exit
@ -55,7 +52,7 @@ module PatternOffset
options[:sets] = nil unless options[:sets] options[:sets] = nil unless options[:sets]
options[:length] = 1024 unless options[:length] options[:length] = 1024 unless options[:length]
options options
end end
end end
@ -69,7 +66,7 @@ class Driver
exit exit
end end
end end
def run def run
query = (@opts[:query]) query = (@opts[:query])
pattern = Rex::Text.pattern_create(@opts[:length], @opts[:sets]) pattern = Rex::Text.pattern_create(@opts[:length], @opts[:sets])