Mitglied seit: 15.10.2005
Forenbeiträge: 224
Besuche: 760
www.sekure.ch scheint down zu sein!
ich hab vor kurzen auch einen nützliche, kleinen ruby script geschrieben (nicht das er sich gegen dein sslinfo behaubten kann ; )
ich wollte ihm irgendwo uploaden, deswegen ist alles in englisch, und die beschreibung wie die eines typischen script-kiddi scripts.
vieleicht will ja marc es zu den downloads hinzufügen (auch wenn es nicht wollkommen ist)
naja wie auch immer hier ist er:
#!/usr/bin/env ruby
#17.06.2006
#
#this is my first public script
#it use google to find urls, which you can scann for some thing
#the first argument must be the output file and the others the search words for google
#
#if this script is not functioning anymore it probably means, that google changed sth,
#in this case emayl me!
#
#
# bugs:
#although it seems to be foncioning,
#I have the feeling that there´s a bug anywhere, report him pls
#
# thanks to:
#my mama, because she let me a few extra hours on the pc
#
# I am convinced that:
#eating meet is bad for our enviroment (but its so fucking tasty!!)
#
# feedback:
#always wellcome, reach me at [email protected]
#
# my msg:
#think about ALL thinks you do
#
#
#
# it tooks FUCKING long to write it so be gratefull and enjoy
#
#
require 'net/http'
if ARGV[1] == nil
puts ""
puts "UrlFinder.rb written by costi, [email protected]"
puts "usage: UrlFinder.rb <output file> <so many search keywords you want>"
exit
end
def findUrls(str)
str.scan(/<a\sclass=l\shref="\w+:\/\/.[^">]+">/).to_s.gsub(/<a\sclass=l\shref="/, "").gsub(/">/, "\n").gsub(/.+:\/\//, "").gsub(/\/.+/, "").gsub(/\//, "").split.uniq.join("\n") #I think this must be improved
end
n = 1
bool = false
f = File.new(ARGV[0], "w")
while ARGV[n] != nil
seite = 100
begin
resp = Net::HTTP.get("www.google.de", "/search?q=#{ARGV[n]}&num=100&start=#{seite}&safe=off")
if bool == false
urlsA = findUrls(resp)
f.write(urlsA)
bool = true
else
urlsB = findUrls(resp)
f.write(urlsB)
bool = false
end
seite = seite + 100
end while urlsA != urlsB
puts "completed search for #{ARGV[n]}"
n = n + 1
end
f.close
puts "completed whole search, have a nice day ( :"
<edit>
oh mann, die sache mit den backslashes nervt langsam, ihr könnt ihm von hier ziehen
</edit>
[ Bearbeitet Sa, 17. Jun 2006, 23:17 ]