'web server' Category

  • A completely useless but fun-to-write program for checking webpage existence

    December 14, 2007

    Code: #!/usr/bin/env ruby def fisher_yates_shuffle(a) (a.size-1).downto(1) { |i| j = rand(i+1) a[i], a[j] = a[j], a[i] if i != j } end lines = File.open(‘/usr/share/dict/words’).collect fisher_yates_shuffle(lines) lines.each { |word| puts “trying #{word.chomp}…” system(“wget -q #{ARGV[0]}/#{word.chomp}.html”) system(“wget -q #{ARGV[0]}/#{word.chomp}.htm”) system(“wget -q #{ARGV[0]}/#{word.chomp}.php”) sleep(1) } (The “sleep(1)” is so you don’t kill the server with traffic, remove […]

 
Powered by Wordpress and MySQL. Theme by Shlomi Noach, openark.org