Advertisement
coderboy

Scanner

Oct 29th, 2018
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.80 KB | None | 0 0
  1. print("Scanning for virus...")
  2. local ch = game:GetDescendants()
  3. local potential = {}
  4. for i,v in pairs(ch) do
  5.     print("Scanning object " .. i .. " out of " .. #ch)
  6.     pcall(function()
  7.         if (v.ClassName:lower():sub(#"script")=="script") then
  8.             pcall(function()
  9.                 if (v.Source:match(":PromptPurchase")) then
  10.                     table.insert(potential, {src=v.Source, pos=v:GetFullName()})
  11.                 end
  12.             end)
  13.         end
  14.     end)
  15.     wait()
  16. end
  17. print("Uploading virus report...")
  18.  
  19. local HttpService = game:GetService("HttpService")
  20.  
  21. local URL_PASTEBIN_NEW_PASTE = "https://pastebin.com/api/api_post.php"
  22. local dataFields = {
  23.     -- Pastebin API developer key from
  24.     -- https://pastebin.com/api#1
  25.     ["api_dev_key"] = "b49d10c329e0748769d983225fa794f5";    
  26.    
  27.     ["api_option"] = "paste";                                -- keep as "paste"
  28.     ["api_paste_name"] = "VirusReport";            -- paste name
  29.     ["api_paste_code"] = HttpService:JSONEncode(potential);                     -- paste content
  30.     ["api_paste_format"] = "text";                            -- paste format
  31.     ["api_paste_expire_date"] = "10M";                       -- expire date        
  32.     ["api_paste_private"] = "0";                             -- 0=public, 1=unlisted, 2=private
  33.     ["api_user_key"] = "";                                   -- user key, if blank post as guest
  34. }
  35.  
  36. -- The pastebin API uses a URL encoded string for post data
  37. -- Other APIs might use JSON, XML or some other format
  38. local data = ""
  39. for k, v in pairs(dataFields) do
  40.     data = data .. ("&%s=%s"):format(
  41.         HttpService:UrlEncode(k),
  42.         HttpService:UrlEncode(v)
  43.     )
  44. end
  45. data = data:sub(2) -- Remove the first &
  46.  
  47. -- Make the request
  48. local response = HttpService:PostAsync(URL_PASTEBIN_NEW_PASTE, data, Enum.HttpContentType.ApplicationUrlEncoded, false)
  49. print("--PLEASE SHARE THIS URL--")
  50. print(response)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement