mirror of
https://github.com/rapid7/metasploit-framework
synced 2024-11-05 14:57:30 +01:00
style compliance fixes
git-svn-id: file:///home/svn/framework3/trunk@10911 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
parent
385450b40d
commit
e84e69c5ef
@ -47,6 +47,6 @@ end
|
||||
outp.rstrip!
|
||||
outp << "\n"
|
||||
|
||||
fd = File.open(path, "w")
|
||||
fd = File.open(path, "wb")
|
||||
fd.write(outp)
|
||||
fd.close
|
||||
fd.close
|
||||
|
@ -59,7 +59,7 @@ insert_statement = database.prepare("INSERT INTO requests(host,port,ssl,meth,pat
|
||||
target_ips = {}
|
||||
|
||||
# Try to open the conversationlog file
|
||||
File.open("#{ws_directory+File::SEPARATOR}conversationlog", "r") do |log|
|
||||
File.open("#{ws_directory+File::SEPARATOR}conversationlog", "rb") do |log|
|
||||
|
||||
# regulare expressions to extract the stuff that we really need
|
||||
# i know that the url stuff can be handeled in one request but
|
||||
@ -175,7 +175,3 @@ File.open("#{ws_directory+File::SEPARATOR}conversationlog", "r") do |log|
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -14,7 +14,7 @@ require 'rex'
|
||||
require 'msf/ui'
|
||||
require 'msf/base'
|
||||
|
||||
Indent = ' '
|
||||
Indent = ' '
|
||||
|
||||
# Initialize the simplified framework instance.
|
||||
$framework = Msf::Simple::Framework.create('DisableDatabase' => true)
|
||||
|
@ -204,7 +204,7 @@ class HttpCrawler
|
||||
#puts "URI LIMIT Reached: #{$maxurilimit} for uri #{hashreq['uri']}"
|
||||
ul = true
|
||||
end
|
||||
else
|
||||
else
|
||||
@UriLimits[hashreq['uri']] = 0
|
||||
end
|
||||
|
||||
@ -449,17 +449,17 @@ class HttpCrawler
|
||||
|
||||
# Taken from http://www.ruby-forum.com/topic/140101 by Rob Biedenharn
|
||||
def canonicalize(uri)
|
||||
u = uri.kind_of?(URI) ? uri : URI.parse(uri.to_s)
|
||||
u.normalize!
|
||||
newpath = u.path
|
||||
while newpath.gsub!(%r{([^/]+)/\.\./?}) { |match|
|
||||
$1 == '..' ? match : ''
|
||||
} do end
|
||||
newpath = newpath.gsub(%r{/\./}, '/').sub(%r{/\.\z}, '/')
|
||||
u.path = newpath
|
||||
u = uri.kind_of?(URI) ? uri : URI.parse(uri.to_s)
|
||||
u.normalize!
|
||||
newpath = u.path
|
||||
while newpath.gsub!(%r{([^/]+)/\.\./?}) { |match|
|
||||
$1 == '..' ? match : ''
|
||||
} do end
|
||||
newpath = newpath.gsub(%r{/\./}, '/').sub(%r{/\.\z}, '/')
|
||||
u.path = newpath
|
||||
# Ugly fix
|
||||
u.path = u.path.gsub("\/..\/","\/")
|
||||
u.to_s
|
||||
u.to_s
|
||||
end
|
||||
|
||||
|
||||
@ -535,24 +535,24 @@ end
|
||||
|
||||
turl = nil
|
||||
$args.parse(ARGV) { |opt, idx, val|
|
||||
case opt
|
||||
when "-d"
|
||||
$dbs = true
|
||||
when "-t"
|
||||
$crun = true
|
||||
turl = val
|
||||
when "-u"
|
||||
$useproxy = true
|
||||
when "-v"
|
||||
$verbose = true
|
||||
when "-x"
|
||||
$proxyhost = val
|
||||
when "-p"
|
||||
$proxyposrt = val
|
||||
when "-h"
|
||||
puts("\n" + " Usage: #{$0} <options>\n" + $args.usage)
|
||||
exit
|
||||
end
|
||||
case opt
|
||||
when "-d"
|
||||
$dbs = true
|
||||
when "-t"
|
||||
$crun = true
|
||||
turl = val
|
||||
when "-u"
|
||||
$useproxy = true
|
||||
when "-v"
|
||||
$verbose = true
|
||||
when "-x"
|
||||
$proxyhost = val
|
||||
when "-p"
|
||||
$proxyposrt = val
|
||||
when "-h"
|
||||
puts("\n" + " Usage: #{$0} <options>\n" + $args.usage)
|
||||
exit
|
||||
end
|
||||
}
|
||||
|
||||
if $crun
|
||||
|
@ -6,7 +6,7 @@ $:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
||||
|
||||
require 'rex'
|
||||
|
||||
if ARGV.length < 1
|
||||
if ARGV.length < 1
|
||||
$stderr.puts("Usage: #{File.basename($0)} <search item> <length of buffer>")
|
||||
$stderr.puts("Default length of buffer if none is inserted: 8192")
|
||||
$stderr.puts("This buffer is generated by pattern_create() in the Rex library automatically")
|
||||
|
@ -15,10 +15,10 @@
|
||||
# $Revision$
|
||||
#
|
||||
|
||||
infile = ARGV[0]
|
||||
infile = ARGV[0]
|
||||
unless(infile && File.readable?(infile))
|
||||
puts "Usage: #{$0} /path/to/module.rb"
|
||||
exit(1)
|
||||
exit(1)
|
||||
end
|
||||
|
||||
verbose = false
|
||||
@ -55,7 +55,7 @@ mod.each_line do |line|
|
||||
next unless in_opts
|
||||
if line.match regex[:is_opt]
|
||||
# Assumes only one!
|
||||
declared_datastores[$2] ||= $1
|
||||
declared_datastores[$2] ||= $1
|
||||
end
|
||||
end
|
||||
|
||||
@ -81,7 +81,7 @@ end
|
||||
class Fakemod < $class
|
||||
$mixins.each {|m| include m}
|
||||
end
|
||||
fakemod = Fakemod.new
|
||||
fakemod = Fakemod.new
|
||||
inhereted_datastores = fakemod.options.keys
|
||||
|
||||
undeclared_datastores = referenced_datastores - (declared_datastores.keys + inhereted_datastores)
|
||||
@ -89,7 +89,7 @@ undeclared_datastores = referenced_datastores - (declared_datastores.keys + inhe
|
||||
# It's common to not use some inhereted datastores, don't bother talking about them
|
||||
unused_datastores = declared_datastores.keys - referenced_datastores
|
||||
|
||||
if verbose
|
||||
if verbose
|
||||
puts "[+] --- Referenced datastore keys for #{infile}"
|
||||
referenced_datastores.uniq.sort.each {|ds| puts ds}
|
||||
puts "[+] --- Declared datastore keys for #{infile}"
|
||||
|
@ -1,5 +1,7 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
# $Id$
|
||||
|
||||
#
|
||||
# This script scans a memory dump or firmware image for any password hashes that
|
||||
# happen to match the "master password" list generated by vxmaster. This is a
|
||||
|
@ -1,3 +1,4 @@
|
||||
# $Id$
|
||||
#
|
||||
# This script can be used to calculate hash values for VxWorks passwords.
|
||||
#
|
||||
|
@ -1,5 +1,7 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
# $Id$
|
||||
|
||||
#
|
||||
# This script calculates all possible password hashes for the vxworks platform.
|
||||
# The generated list can be used to bruteforce authentication to any service
|
||||
|
Loading…
Reference in New Issue
Block a user