Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local f = "http://dl.dropbox.com/u/18783800/rr.out"
- local url = f
- fName = "rr.out"
- onF = http.get(url)
- --file = fs.open("test","w")
- test = onF.readAll()
- --file.write(test)
- --file.close()
- onF.close()
- print("Len:"..string.len(test))
- index = 1
- file = fs.open(fName,"wb")
- local t = os.clock()
- while true do
- if test:byte(index) == 239 or test:byte(index) == 189 then
- test = test:sub(0,index-1)..test:sub(index+1)
- index = index - 1
- else
- file.write(test:byte(index))
- end
- index = index + 1
- if index > string.len(test) then
- break
- end
- if os.clock() -t >= 4 then
- sleep(.05)
- t = os.clock()
- end
- print(index)
- end
- file.close()
- print("done")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement