#!/usr/bin/env bash if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then cat << 'EOF' Usage: clickjacking url Will return a dataurl to open in a browser EOF exit 0 fi die(){ echo "$@" exit 1 } # Url of site to put in iframe url="$1" # If no argument is given, get stdin [ -z "$url" ] && url="$(cat -)" # If still no url, bail [ -z "$url" ] && die "You need to provide a url" source=" Clickjacking example

Clickjacking example

If content is rendered above, the site is vulnerable to clickjacking

" echo "data:text/html;base64,$(echo "$source" | base64 -w 0)"