Created
February 2, 2015 20:31
-
-
Save wchen-r7/858b90913ca49019099d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
msf > irb | |
[*] Starting IRB shell... | |
>> require 'method_source' | |
=> true | |
>> framework.db.method(:import_ip_list_file).source_location | |
=> ["/Users/sinn3r/rapid7/msf/lib/msf/core/db_manager/import/ip_list.rb", 18] | |
>> framework.db.method(:import_ip_list_file).parameters | |
=> [[:opt, :args]] | |
>> puts framework.db.method(:import_ip_list_file).source | |
def import_ip_list_file(args={}) | |
filename = args[:filename] | |
wspace = args[:wspace] || workspace | |
data = "" | |
::File.open(filename, 'rb') do |f| | |
data = f.read(f.stat.size) | |
end | |
import_ip_list(args.merge(:data => data)) | |
end | |
=> nil | |
>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment