Laine_prikol

OpenComputers Html_view

Mar 18th, 2017
326
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- Интепретатор html by Laine_prikol
  2. local args = {...}
  3. i = math.random(0,1000000)
  4. s = 'wget '..args[1]..' /tmp/'..i
  5. os.execute(s)
  6. os.sleep(1)
  7. i = tostring(i)
  8. local filehtml = io.open("/tmp/"..i, "r")
  9. a = filehtml:read("*a")
  10. a = string.gsub(a, "<p>", "")
  11. a = string.gsub(a, "</p>", "")
  12. a = string.gsub(a, "<h1>", "")
  13. a = string.gsub(a, "</h1>", "")
  14. a = string.gsub(a, "<h2>", "")
  15. a = string.gsub(a, "</h2>", "")
  16. a = string.gsub(a, "<strong>", "")
  17. a = string.gsub(a, "</strong>", "")
  18. a = string.gsub(a, "<strong>", "")
  19. a = string.gsub(a, "</strong>", "")
  20. a = string.gsub(a, "<a>", "")
  21. a = string.gsub(a, "</a>", "")
  22. a = string.gsub(a, "<!DOCTYPE html>", "")
  23. a = string.gsub(a, "!doctype html", "")
  24. a = string.gsub(a, "<html><head>", "")
  25. a = string.gsub(a, "</body></html>", "")
  26. a = string.gsub(a, "<body>", "")
  27. a = string.gsub(a, "<a href=", " ")
  28. a = string.gsub(a, ">", "")
  29. a = string.gsub(a, "<", "")
  30. a = string.gsub(a, "class=", "")
  31. a = string.gsub(a, "footer", "")
  32. a = string.gsub(a, "<meta charset=", "")
  33. a = string.gsub(a, "utf-8", "")
  34. a = string.gsub(a, "meta", "")
  35. a = string.gsub(a, "name", "")
  36. a = string.gsub(a, "content=", "")
  37. a = string.gsub(a, "text/html", "")
  38. a = string.gsub(a, "text/css", "")
  39. a = string.gsub(a, "rel=", " ")
  40. a = string.gsub(a, "stylesheet", "")
  41. a = string.gsub(a, ".css", "")
  42. a = string.gsub(a, "/head", "")
  43. a = string.gsub(a, "/body", "")
  44. a = string.gsub(a, "/html", "")
  45. a = string.gsub(a, "type=", "")
  46. a = string.gsub(a, "<title>", "")
  47. a = string.gsub(a, "</title>", "")
  48. a = string.gsub(a, "link", "")
  49. a = string.gsub(a, "=", "")
  50. a = string.gsub(a, ";", "")
  51. a = string.gsub(a, "/code", "")
  52. a = string.gsub(a, "utf-8", "")
  53. a = string.gsub(a, "viewport", "")
  54. a = string.gsub(a, "content-type", "")
  55. a = string.gsub(a, "title", "")
  56. a = string.gsub(a, "charsetUTF-8", "")
  57. a = string.gsub(a, "charset", "")
  58. a = string.gsub(a, "href", "")
  59. a = string.gsub(a, "http-equiv", "")
  60. a = string.gsub(a, "icon", "")
  61. a = string.gsub(a, "image", "")
  62. a = string.gsub(a, "favicon", "")
  63. a = string.gsub(a, ".png", "")
  64. a = string.gsub(a, '"', "")
  65. a = string.gsub(a, ".ico", "")
  66. a = string.gsub(a, "head", "")
  67. filehtml:close()
  68. local fileconverted = io.open("/webpage"..i, "w")
  69. fileconverted = fileconverted:write(a)
  70. fileconverted:close()
  71. os.execute("view webpage"..i)
  72. os.execute("rm webpage"..i)
  73. print("viewing complete!")
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×