Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tArg = {...}
- local FileName = tArg[1]
- local KeyWords = {"os.reboot()","settings.set","settings.clear()","settings.load","pastebin","fs.delete"}
- local Accept = true
- function CheckForKeyWord(Word)
- local file = fs.open(FileName,"r")
- while true do
- local Line = file.readLine()
- local _, Search = Line:find(Word)
- if Search then
- Accept = false
- elseif Line then
- else
- break
- end
- end
- file.close()
- end
- for i = 1, #KeyWords do
- CheckForKeyWord(KeyWords[i])
- end
- if Accept == false then
- fs.delete(FileName)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement