Ded

  • Difficulty is Medium.
  • Pop an alert(1337) on sandbox.pwnfunction.com.
  • No user interaction.
  • Cannot use https://sandbox.pwnfunction.com/?html=&js=&css=.
  • Tested on Chrome.
  • Challenge was downgraded because of Jquery's endless mutations.
  • Unintended solution? DM me @PwnFunction.
<!-- Challenge -->
<div id="ded">
    <button type="button" class="btn btn-lg btn-danger" data-toggle="popover" title="Hints" data-html="true"
        data-content="<li>Anything different about this challenge?</li>
        <li>Look Deeper!</li>">Lemme help you.</button>
</div>

<script>
    /* Inputs */
    let code = (new URL(location).searchParams.get('code')).replace(/script/ig, "_") || `<li><strike>ded</strike></li>`

    let clean = DOMPurify.sanitize(code, { SAFE_FOR_JQUERY: true })
    document.getElementById('ded').innerHTML += clean
</script>

<!-- Jquery(3.4.1), Popper(1.16.0), Bootstrap(4.4.0) -->
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"
integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.0/js/bootstrap.min.js"
integrity="sha384-3qaqj0lc6sV/qpzrc1N5DC6i1VRn/HyX4qdPaiEFbn54VjQBEU341pvjz7Dv3n6P"
crossorigin="anonymous"></script>

<script>
/* Extend Bootstrap Popover */
let whiteList = $.fn.tooltip.Constructor.Default.whiteList
whiteList.form = []

/* Popovers! */
$(function () {
    $('[data-toggle="popover"]').popover('show')
})
</script>