fork download
  1. #coding:utf-8
  2.  
  3. require "watir"
  4. require "kconv"
  5. require "open-uri"
  6.  
  7.  
  8. time = 6000
  9.  
  10. def peko_cc
  11. a = "コナンバーペロッ".split(//)
  12. szz = (rand(a.size)+1)
  13. a.shuffle!.take(szz).permutation(szz).take(1).each do |m|
  14. c = m.join
  15. c << "「"
  16. c <<
  17. if a.drop(szz).size < 2
  18. "ンー"
  19. else
  20. a.drop(szz).shuffle.join
  21. end
  22. c << "w"*(rand(4..35))
  23. c << "」"
  24. break c
  25. end
  26. end
  27.  
  28.  
  29. def rem_cc
  30. a = [
  31. ["ゴミ"]*5,
  32. "死ね",
  33. ].flatten
  34.  
  35. case rand(70)
  36. when 0..4
  37. a.sample + "w"*rand(2..65)
  38. when 4..20
  39. a.sample + "ゴミ"*(3..25).select(&:even?).sample + "w"*rand(2..15)
  40. when 20..30
  41. a.sample + "ゴミ"*(2..6).select(&:even?).sample + "w"*rand(2..55)
  42. when 30..40
  43. a.sample + a.sample + "w"*rand(2..55)
  44. when 40..60
  45. peko_cc
  46. else
  47. "ゴミ"
  48. end
  49. end
  50. # puts rem_cc
  51. # -------------------
  52.  
  53. agent = Watir::Browser.new :ie
  54. begin
  55.  
  56. thread = open("http://t...content-available-to-author-only...h.net/tech/subject.txt" ).read.each_line.to_a
  57. thread = thread[6..14] +
  58. thread.select do |m|
  59. m.toutf8 =~ /C言語なら俺に
  60. |py】
  61. |Win32API
  62. |自治スレッド
  63. |何年待ってもruby以上の言語が出てこない
  64. |プログラミング雑談/xi
  65. end
  66. thread.uniq!
  67. puts thread
  68. thread.sample =~ /(.*).dat/
  69. puts ad = "http://t...content-available-to-author-only...h.net/test/read.cgi/tech/#{$1}/l1"
  70.  
  71. # agent.visible = true
  72. agent.goto ad
  73. sleep 1
  74. agent.text_field(:name, "MESSAGE").value = rem_cc
  75. agent.button(:name, "submit").click
  76. # agent.close
  77.  
  78.  
  79. sleep time + rand(1040)
  80. rescue ; p $! ; sleep 60 ;
  81. end while true
  82.  
Runtime error #stdin #stdout #stderr 0.03s 8416KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- watir (LoadError)
	from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
	from prog.rb:3:in `<main>'