Advertisement
ToxicTheBoss

Http Proxy

Jun 30th, 2020
678
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. -- // Configuration: \\ --
  2.  
  3. local proxyurl = 'https://redphoenix.xyz/api/proxy.php';
  4.  
  5. local methods = {
  6. game.HttpGet,
  7. game.HttpPost,
  8. htgetf
  9. }
  10.  
  11. local output = {
  12. file = "out.txt";
  13. save = true;
  14. }
  15.  
  16. -- // Source-code: \\ --
  17.  
  18. local save = function(url)
  19. if output.save == true then
  20. local old;
  21. pcall(function()
  22. old = readfile(output.file);
  23. end)
  24. old = old or '';
  25. writefile(output.file, old..'\n'..url.. ' was spoofed at '..os.time())
  26. end
  27. end
  28.  
  29. for iter, method in pairs(methods) do
  30. spawn(function()
  31. local hooked;
  32. hooked = hookfunction(method, newcclosure(function(...)
  33. local new = {};
  34. for i, v in pairs({...}) do
  35. if typeof(v) == 'string' then
  36. warn(v,'was proxied');
  37. new[i] = proxyurl..'?link='..v;
  38. save(v)
  39. else
  40. new[i] = v;
  41. end
  42. end
  43. return hooked(new[1], new[2]);
  44. end))
  45. end)
  46. end
  47.  
  48. if syn and syn.request then
  49. local old = syn.request;
  50. setreadonly(syn, false);
  51. syn.request = function(a)
  52. if a.Url then
  53. warn(a.Url, 'was proxied')
  54. a.Url = proxyurl..'?link='..a.Url;
  55. save(a.Url);
  56. end
  57. return old(a)
  58. end
  59. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement