Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local alpha = {"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"}
- local alphaCap = {"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"}
- local decimal = {"1","2","3","4","5","6","7","8","9","0"}
- --file generator
- local function fNameGen() --generate filename
- local tempFile = {}
- for i = 1,8 do
- local tabNum = math.random(1,3)
- if tabNum == 1 then
- local k = math.random(1,#alpha)
- tempFile[i] = alpha[k]
- elseif tabNum == 2 then
- local k = math.random(1,#alphaCap)
- tempFile[i] = alphaCap[k]
- elseif tabNum ==3 then
- local k = math.random(1,#decimal)
- tempFile[i] = decimal[k]
- end
- end
- local filename = table.concat(tempFile)
- return filename
- end
- local function existing( code )
- local response = http.get("http://pastebin.com/raw.php?i="..code)
- if response then
- local site = response.readAll()
- response.close()
- local file = fs.open(".spam/"..code,"w")
- file.write(site)
- file.close()
- return "COMPLETE"
- else return "FAILURE!"
- end
- end
- print("---------+----------+----------+----------+")
- while true do
- local code1 = fNameGen()
- local code2 = fNameGen()
- local code3 = fNameGen()
- local code4 = fNameGen()
- print(code1.. " | " ..code2.. " | " ..code3.. " | " ..code4.. " |")
- print(existing(code1).. " | " ..existing(code2).. " | " ..existing(code3).. " | " ..existing(code4).. " |")
- print("---------+----------+----------+----------+")
- end
Advertisement
Add Comment
Please, Sign In to add comment