Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getLocalStoragePropertyDescriptor() {
- const iframe = document.createElement('iframe');
- document.head.append(iframe);
- const pd = Object.getOwnPropertyDescriptor(iframe.contentWindow, 'localStorage');
- iframe.remove();
- return pd;
- }
- Object.defineProperty(window, 'localStorage', getLocalStoragePropertyDescriptor());
- console.log(localStorage.token);
Advertisement
Add Comment
Please, Sign In to add comment