TCPサーバの接続情報と、サーバのファイル一式が与えられた。
与えられたファイルのうち chall.c を読むと、以下の関数があることがわかった。
find_instructor:Staffを入力すると、初期化されていないローカル配列 course の内容を出力する。find_course:検索する name の値を入力すると、対応する instructor の値をローカル配列 instructor にコピーする。
また、sp22.txt より、 FLAG 1337 に対応する instructor の値がflagになっていそうであることが読み取れた。
以下の手順でflagが得られた。
1 を入力する。FLAG 1337 を入力する。2 を入力する。Staff を入力する。
Information to connect to a TCP server and the files for the server were given.
Reading chall.c in the given files, I found these functions:
find_instructor : Output contents onf the uninitialized local array cource when Staff is entered.find_course : Read the value of name to search, and copy the value of corresponding instructor to the local array instructor.
I also find that the value of instructor corresponding to FLAG 1337 should be the flag from the file sp22.txt.
I obtained the flag by these steps:
1 to select "Search for a course".FLAG 1337.2 to select "Search for an instructor".Staff.