Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- do
- local a,b,c,d,e,f,g=warn,clonefunction,hookfunction,newcclosure,getgenv and getgenv()or _G,type,string.lower
- local h=function(u)
- if f(u)=="string"and g(u):match("^file://")then
- warn("[BLOCKER] script that you ran has tried to abuse the request vuln but was blocked. "..u:gsub("^file:///",""):sub(1,100))
- return true
- end
- return false
- end
- local i,j,k=b and e.request and b(e.request),b and e.http_request and b(e.http_request),b and syn and syn.request and b(syn.request)
- local l=function(o)
- if not o then return nil end
- local fn=function(p)
- local u=f(p)=="table"and p.Url or p
- if h(u)then return{Success=false,StatusCode=403,Body=""}end
- return o(p)
- end
- return d and d(fn)or fn
- end
- if c then
- if i then c(e.request,l(i))end
- if j then c(e.http_request,l(j))end
- if k then c(syn.request,l(k))end
- end
- local m=d and d(function()end)or function()end
- local n=function()return nil end
- local o=d and d(n)or n
- pcall(function()
- if debug then
- debug.getupvalue,debug.setupvalue,debug.getupvalues,debug.setconstant=o,o,o,o
- debug.getconstant,debug.getconstants,debug.getinfo,debug.getlocal=o,o,o,o
- debug.getlocals,debug.setlocal,debug.getproto,debug.getprotos=o,o,o,o
- debug.getstack,debug.setstack,debug.getregistry=o,o,o
- end
- end)
- if c then
- local p=function(fn,r)
- if fn==e.request or fn==e.http_request or(syn and fn==syn.request)then return fn end
- return c(fn,r)
- end
- e.hookfunction,e.replaceclosure,e.hookfunc=d and d(p)or p,d and d(p)or p,d and d(p)or p
- e.detourfunction,e.replacefunction=d and d(p)or p,d and d(p)or p
- end
- if b then
- local q=function(fn)
- if fn==e.request or fn==e.http_request or(syn and fn==syn.request)then return fn end
- return b(fn)
- end
- e.clonefunction,e.clonefunc=d and d(q)or q,d and d(q)or q
- end
- pcall(function()e.restorefunction,e.restorefunc=m,m end)
- pcall(function()
- if getfenv then e.getfenv=d and d(function(x)if f(x)=="function"then return{}end return getfenv(x)end)or function()return{}end end
- if setfenv then e.setfenv=m end
- end)
- if getrenv then
- pcall(function()
- local r=getrenv()
- if r and c then
- if r.request and i then c(r.request,l(i))end
- if r.http_request and j then c(r.http_request,l(j))end
- end
- end)
- end
- if getgc then
- pcall(function()
- local s=getgc
- e.getgc=d and d(function(...)
- local t=s(...)
- for x=1,#t do if t[x]==i or t[x]==j or t[x]==k then t[x]=nil end end
- return t
- end)or function()return{}end
- end)
- end
- pcall(function()
- if getrawmetatable then
- local u=getrawmetatable
- e.getrawmetatable=d and d(function(x)
- local mt=u(x)
- if mt and(mt.__index==i or mt.__index==j or mt.__namecall==i)then return nil end
- return mt
- end)or u
- end
- end)
- pcall(function()
- if iscclosure then
- local v=iscclosure
- e.iscclosure=d and d(function(fn)
- if fn==e.request or fn==e.http_request or(syn and fn==syn.request)then return true end
- return v(fn)
- end)or v
- e.is_cclosure=e.iscclosure
- end
- if islclosure then
- local w=islclosure
- e.islclosure=d and d(function(fn)
- if fn==e.request or fn==e.http_request or(syn and fn==syn.request)then return false end
- return w(fn)
- end)or w
- e.is_lclosure=e.islclosure
- end
- end)
- pcall(function()
- if getconnections then
- local y=getconnections
- e.getconnections=d and d(function(...)
- local z=y(...)
- for x=1,#z do
- if z[x]and z[x].Function then
- if z[x].Function==e.request or z[x].Function==e.http_request then
- z[x]=nil
- end
- end
- end
- return z
- end)or y
- end
- end)
- pcall(function()
- if getscriptclosure then e.getscriptclosure=o end
- if getscriptfunction then e.getscriptfunction=o end
- if getsenv then
- local z=getsenv
- e.getsenv=d and d(function(scr)
- local env=z(scr)
- if env then
- env.request=e.request
- env.http_request=e.http_request
- end
- return env
- end)or z
- end
- end)
- pcall(function()
- if checkcaller then
- e.checkcaller=d and d(function()return true end)or function()return true end
- end
- end)
- pcall(function()
- if getthreadidentity then
- e.getthreadidentity=d and d(function()return 8 end)or function()return 8 end
- e.getidentity=e.getthreadidentity
- e.getthreadcontext=e.getthreadidentity
- end
- end)
- pcall(function()
- if game and c then
- local hs=game:GetService("HttpService")
- if hs then
- local ab=b and b(hs.GetAsync)or hs.GetAsync
- local ac=b and b(hs.RequestAsync)or hs.RequestAsync
- if ab then
- c(hs.GetAsync,d and d(function(self,url,...)
- if h(url)then return""end
- return ab(self,url,...)
- end)or function(self,url,...)if h(url)then return""end return ab(self,url,...)end)
- end
- if ac then
- c(hs.RequestAsync,d and d(function(self,req,...)
- local url=f(req)=="table"and req.Url or req
- if h(url)then return{Success=false,StatusCode=403,Body=""}end
- return ac(self,req,...)
- end)or function(self,req,...)local url=f(req)=="table"and req.Url or req;if h(url)then return{Success=false,StatusCode=403,Body=""}end return ac(self,req,...)end)
- end
- end
- end
- end)
- print("sk3lp3y's request vuln blocker loaded.")
- end
Advertisement
Add Comment
Please, Sign In to add comment