ligersccccccXD

Untitled

Nov 30th, 2021
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. function getLocalStoragePropertyDescriptor() {
  2. const iframe = document.createElement('iframe');
  3. document.head.append(iframe);
  4. const pd = Object.getOwnPropertyDescriptor(iframe.contentWindow, 'localStorage');
  5. iframe.remove();
  6. return pd;
  7. }
  8. Object.defineProperty(window, 'localStorage', getLocalStoragePropertyDescriptor());
  9. console.log(localStorage.token);
Advertisement
Add Comment
Please, Sign In to add comment