#coding:utf-8
require "watir"
require "kconv"
require "open-uri"
time = 6000
def peko_cc
a = "コナンバーペロッ" .split ( // )
szz = ( rand ( a.size ) + 1 )
a.shuffle !.take ( szz) .permutation ( szz) .take ( 1 ) .each do | m|
c = m.join
c << "「"
c <<
if a.drop ( szz) .size < 2
"ンー"
else
a.drop ( szz) .shuffle .join
end
c << "w" * ( rand ( 4 ..35 ) )
c << "」"
break c
end
end
def rem_cc
a = [
[ "ゴミ" ] * 5 ,
"死ね" ,
] .flatten
case rand ( 70 )
when 0 ..4
a.sample + "w" * rand ( 2 ..65 )
when 4 ..20
a.sample + "ゴミ" * ( 3 ..25 ) .select ( & :even?) .sample + "w" * rand ( 2 ..15 )
when 20 ..30
a.sample + "ゴミ" * ( 2 ..6 ) .select ( & :even?) .sample + "w" * rand ( 2 ..55 )
when 30 ..40
a.sample + a.sample + "w" * rand ( 2 ..55 )
when 40 ..60
peko_cc
else
"ゴミ"
end
end
# puts rem_cc
# -------------------
agent = Watir::Browser .new :ie
begin
thread = open ( "http://t...content-available-to-author-only...h.net/tech/subject.txt" ) .read .each_line .to_a
thread = thread[ 6 ..14 ] +
thread.select do | m|
m.toutf8 =~ / C言語なら俺に
| py】
| Win32API
| 自治スレッド
| 何年待ってもruby以上の言語が出てこない
| プログラミング雑談/ xi
end
thread.uniq !
puts thread
thread.sample =~ / ( .* ) .dat /
puts ad = "http://t...content-available-to-author-only...h.net/test/read.cgi/tech/#{$1}/l1"
# agent.visible = true
agent.goto ad
sleep 1
agent.text_field ( :name , "MESSAGE" ) .value = rem_cc
agent.button ( :name , "submit" ) .click
# agent.close
sleep time + rand ( 1040 )
rescue ; p $! ; sleep 60 ;
end while true
I2NvZGluZzp1dGYtOAoKcmVxdWlyZSAid2F0aXIiCnJlcXVpcmUgImtjb252IgpyZXF1aXJlICJvcGVuLXVyaSIKCgp0aW1lID0gNjAwMAoKZGVmIHBla29fY2MKCWEgICA9ICLjgrPjg4rjg7Pjg5Djg7zjg5rjg63jg4MiLn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