Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- file, M = ...
- FF = fs.open(file,"rb")
- FF2 = fs.open("."..file,"wb")
- print("Special thanks to Anavrins for showing me security flaws")
- print("Password: ")
- z = read(string.char(4))
- N = 0
- math.randomseed(string.byte(string.sub(z,string.len(z)-1,string.len(z))))
- for i = 1,string.len(z) do
- N = N+math.random(string.byte(z,i))
- end
- Char = "PH"
- -- (RaidPro API coming soon)
- function spl(FR,F1,F2)
- FR = fs.open(FR,"rb")
- F1 = fs.open(F1,"wb")
- F2 = fs.open(F2,"wb")
- repeat
- CH = FR.read()
- if CH ~= nil then
- F1.write(CH)
- end
- CH = FR.read()
- if CH ~= nil then
- F2.write(CH)
- end
- until CH == nil
- FR.close()
- F1.close()
- F2.close()
- end
- function com(FW,F1,F2)
- FW = fs.open(FW,"wb")
- F1 = fs.open(F1,"rb")
- F2 = fs.open(F2,"rb")
- repeat
- CH = F1.read()
- if CH ~= nil then
- FW.write(CH)
- end
- CH = F2.read()
- if CH ~= nil then
- FW.write(CH)
- end
- until CH == nil
- FW.close()
- F1.close()
- F2.close()
- end
- -- (RaidPro API coming soon)
- if M == "enc" then
- while Char ~= nil do
- Char = FF.read()
- if Char ~= nil then
- Char = Char+N
- while Char > 255 do Char = Char-255 end
- FF2.write(Char)
- end
- end
- FF2.close()
- math.randomseed(string.byte(string.sub(z,string.len(z)-1,string.len(z))))
- spl("."..file,"."..file..1,"."..file..2)
- com("."..file,"."..file..2,"."..file..1)
- elseif M == "dec" then
- while Char ~= nil do
- Char = FF.read()
- if Char ~= nil then
- Char = Char-N
- while Char < 0 do Char = Char+255 end
- FF2.write(Char)
- end
- end
- FF2.close()
- math.randomseed(string.byte(string.sub(z,string.len(z)-1,string.len(z))))
- spl("."..file,"."..file..2,"."..file..1)
- com("."..file,"."..file..1,"."..file..2)
- end
- FF.close()
- fs.delete(file)
- fs.move("."..file,file)
- fs.delete("."..file..1)
- fs.delete("."..file..2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement