
20.10.2009, 07:09
|
|
Познающий
Регистрация: 23.04.2008
Сообщений: 63
Провел на форуме: 176079
Репутация:
13
|
|
sqid.rb - SQL Injection Digger [need help]
Есть такой проект.
http://sqid.rubyforge.org/
Скрипт ищет скули по запросу гугла.
Начиная от SyBase заканчивая MySQL.
Последнее время у меня что то не пашет не фига.
Не может найти не 1 ссылки проверил может гугл что то поменяд нет все так же... вроде... не могу понять в чем функция поиска
Хотел бы уточнить что скирпт работает через
Код:
google.com/xhtml/search?mrestrict=xhtml&site=search&q={qeury}&start={result_start}&sa=N
Код:
def search
puts "[+] Getting %d links from search %s starting from %d." % [ @nos, @query, @start ]
http_obj = SqidHTTP.new("http://www.google.com",@http_opts)
upto_in_10s(@nos).each do |maxResults|
search_str="/xhtml/search?mrestrict=xhtml&site=search&q=" + URI.escape(@query) + "&start=" + String(@start) + "&sa=N"
http_obj.path = search_str
http_res = http_obj.get
return if http_res == nil
http_res.body.gsub!(/[\r][\n]?/,"")
http_res.body.scan(/href\s*=\s*\"*[^\">]*/) { |t|
@urls.push(t.split("&u=")[1])
}
@start+=maxResults
end
@urls.compact!()
@urls.collect! {|url| URI.unescape(url)}
puts "[+] Done got %d links." % @urls.size
end
def do
check
end
end
class SqidPAGE < SqidURL
def initialize(http_opts,sqid_opts)
@http_opts = http_opts
@page = sqid_opts['page']
super(http_opts,sqid_opts)
end
def do
puts "[+] Getting links from page %s.\n" % @page
get_links(@page) { |link| @urls.push(link) }
puts "[+] Done got %d links." % @urls.size
super
end
def get_links(url)
return if url == nil
a = SqidHTTP.new(url,@http_opts)
r = a.get
page =""
page = r.body if r
yield_url = URI.parse(url)
base_path = URI.parse(url).path
base_path = base_path[1...base_path.length] if base_path.length >= 1
page.scan(/href\s*=\s*["']([^"']+)["']/i) { |link|
link=URI.escape(link[0])
begin
u = URI.parse("#{link}")
if u.scheme
next if !( u.scheme =~ /http[s]?:\/\//i )
end
if u.relative?
next if u.path == "/"
next if u.path.rindex("..")
if u.path[0] == "/"
yield_url.path = u.path
yield yield_url.to_s
end
t = base_path.split("/")
if hasext? base_path
if t.length > 1
t = t[0...t.length-1]
end
end
add_path=t.join("/")
yield_url.path = "/" + add_path + "/" + u.path
yield yield_url.to_s if not skipurl?(yield_url.to_s)
else
yield link if not skipurl?(link)
end
rescue
puts "[*] Invalid URL: " + $!.message
next
end
}
end
end
Скачать можно тут hxxp://rubyforge.org/frs/?group_id=2617
|
|
|