Skip to content

Instantly share code, notes, and snippets.

@leveryd
Last active July 15, 2021 02:13
Show Gist options
  • Save leveryd/40fcaed60727b6163b034145e332640f to your computer and use it in GitHub Desktop.
Save leveryd/40fcaed60727b6163b034145e332640f to your computer and use it in GitHub Desktop.
ctf
<body>
can you alert "flag"? <br>
<pre>
source code: https://gist.github.com/leveryd/40fcaed60727b6163b034145e332640f
</pre>
<script>
function hello(a, b, c){
if(a=="a" && b=="b" && c=="c"){
alert("flag");
}
}
var test ={
"a":function a(e){
try{
eval(this.call + ".test")
} catch(e){
console.log("bad")
}
}
}
<?php
$a = $_GET["a"];
$a = str_replace("=", "",$a);
$a = str_replace("(", "",$a);
$a = str_replace(")", "",$a);
$a = str_replace("`", "",$a);
$a = str_replace("\\", "",$a);
$a = str_replace("/", "",$a);
$a = str_replace("[", "",$a);
$a = str_replace("]", "",$a);
$a = str_replace("<", "&lt;",$a);
$a = str_replace(">", "&gt;",$a);
echo "var a='$a'";
?>
</script>
</body>
@leveryd
Copy link
Author

leveryd commented Jul 15, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment