Kolpa

Mail Lua

Apr 10th, 2012
921
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.72 KB | None | 0 0
  1. function split(pString, pPattern)
  2. local Table = {}
  3. local fpat = "(.-)" .. pPattern
  4. local last_end = 1
  5. local s, e, cap = pString:find(fpat, 1)
  6. while s do
  7. if s ~= 1 or cap ~= "" then
  8. table.insert(Table,cap)
  9. end
  10. last_end = e+1
  11. s, e, cap = pString:find(fpat, last_end)
  12. end
  13. if last_end <= #pString then
  14. cap = pString:sub(last_end)
  15. table.insert(Table, cap)
  16. end
  17. return Table
  18. end
  19.  
  20. term.clear()
  21. term.setCursorPos(1,1)
  22. print("MoAr Email System")
  23. term.setCursorPos(5,5)
  24. print("Username:")
  25. term.setCursorPos(5,6)
  26. local lusr = read()
  27. local file = http.get("http://localhost/rcv.php?data="..lusr)
  28. local hash = file:readAll()
  29. stuff = split(hash,"µ")
  30. print(stuff[2].."Has Sendet"..stuff[3].."mail ID is"..stuff[1])
  31. end
Advertisement
Add Comment
Please, Sign In to add comment