#!/usr/bin/env ruby ## # This file is part of the Metasploit Framework and may be subject to # redistribution and commercial restrictions. Please see the Metasploit # Framework web site for more information on licensing and terms of use. # http://metasploit.com/framework/ ## require 'msf/core' require 'net/http' class Metasploit3 < Msf::Auxiliary include Msf::Auxiliary::Report def initialize(info = {}) super(update_info(info, 'Name' => 'Pull Del.icio.us Links (URLs) for a domain', 'Description' => %q{ This module pulls and parses the URLs stored by Del.icio.us users for the purpose of replaying during a web assessment. Finding unlinked and old pages. }, 'Author' => [ 'Rob Fuller ' ], 'License' => MSF_LICENSE, 'Version' => '$Revision: 7206 $')) register_options( [ OptString.new('DOMAIN', [ true, "Domain to request URLS for"]), OptString.new('OUTFILE', [ false, "Where to output the list for use"]) ], self.class) register_advanced_options( [ OptString.new('PROXY', [ false, "Proxy server to route connection. :",nil]), OptString.new('PROXY_USER', [ false, "Proxy Server User",nil]), OptString.new('PROXY_PASS', [ false, "Proxy Server Password",nil]) ], self.class) end def pull_urls(targetdom) response = "" list = [] lastpage = 0 pagenum = 1 while lastpage == 0 print_status("Page number: " + pagenum.to_s) header = { 'User-Agent' => "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/4.0.221.6 Safari/525.13"} clnt = Net::HTTP::Proxy(@proxysrv,@proxyport,@proxyuser,@proxypass).new("delicious.com") resp, data = clnt.get2("/search?p=site%3A"+targetdom+"&page="+pagenum.to_s,header) response << data response.each do |line| list << line.gsub!(/(.+