Created
May 4, 2019 22:45
-
-
Save xingoxu/c5f3b476fc1ddc1f07a10c0b525c6a35 to your computer and use it in GitHub Desktop.
See Privatter post with password
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Privatter Nopassword | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://privatter.net/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
let passwordInput = $('input[type=password]'); | |
if (!passwordInput[0]) { | |
return; | |
} | |
const getPrivatterCookie = (url) => { | |
let privatterId = url.match(/privatter\.net\/(\w)\/(\d+)/i); | |
let privatterType; | |
if (privatterId == null || privatterId.length < 3) { | |
return []; | |
} else { | |
let date = new Date(); | |
date.setFullYear(date.getFullYear() + 1); | |
privatterType = privatterId[1]; | |
privatterId = privatterId[2]; | |
return [`${privatterType}${privatterId}=1; path=/${privatterType}; expires=${date.toGMTString()}`, `pass_${privatterType}${privatterId}=1; path=/${privatterType}; expires=${date.toGMTString()}`]; | |
} | |
} | |
let button = document.createElement('button'); | |
button.className = 'btn btn-primary'; | |
button.innerText = '見たい'; | |
button.addEventListener('click', (e) => { | |
for (let i of getPrivatterCookie(location.href)) { | |
document.cookie = i; | |
} | |
console.log(getPrivatterCookie(location.href)); | |
e.stopPropagation(); | |
e.preventDefault() | |
setTimeout(() => { | |
location.reload() | |
}, 0); | |
}, false); | |
passwordInput.parent().append(button); | |
})(); |
After clicking on the button nothing seems to be happening for me. :(
Seems Privatter changed their cookies for post' pass a few days ago, the script didn't work anymore.
privatter has changed the cookie content into php's password_hash
so now this script is already invalid.
How to use this?
could you update this, not working
Aun funciona ? Alguno conoce una herramienta para "poipiku" ?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It worked, thank you so much!