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
location / { | |
if (!-f /var/www/auth_cookies/$cookie_AUTH_COOKIE) { | |
add_header Content-Type text/html; | |
return 200 '<form><input name="auth_cookie"><button type="submit">AUTH</button></form><script> | |
const f=new Proxy(new URLSearchParams(window.location.search),{get:(searchParams,prop)=>searchParams.get(prop),}); | |
if (!f.auth_cookie == ""){document.cookie="AUTH_COOKIE="+f.auth_cookie+"; Expires=Thu, 01 Jan 2070 00:00:01 GMT"; | |
window.location.replace("$scheme://$server_name/")}; | |
</script>'; |
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
#!/usr/bin/expect -f | |
set timeout -1 | |
spawn virsh -c qemu:///system console vm1 | |
expect "Connected" | |
send "\r" | |
expect "debian-live login: " | |
send "root\r" |