0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

[picoCTF_WriteUP] bytemancy 1

0
Posted at

概要

picoCTFの問題「bytemancy 1」の解法メモです。
こちらはプログラムが要求する特定の文字列を生成する問題です。
Difficulty:Easy
category:General Skills

使用したツール

WSL
python

問題の分析

インスタンスを起動すると、以下の指示が表示されました。

**Send me ASCII DECIMAL 101 1751 times, side-by-side, no space. ==> **
(ASCII 10進数の 101 を 1751回、スペースなしで横並びに送信してください。==> )

この指示を2つのステップで解きました。

1. ASCII DECIMAL 101 とは何か

ASCII 10進数の 101 をWeb検索すると、小文字の e と出てきます。

つまり、小文字の e を 1751個つなげた文字列を送信する必要があります。

2. 文字列の生成

1751文字を手入力するのは非現実的なので、Pythonを使って文字列を生成しました。

# Pythonで'e'を1751回繰り返す
print("e" * 1751)

出力結果をコピーして、インスタンス起動時のメッセージ"==> "の後にペーストしてEnterします。
すると、flagが出力されました。

最後に

ASCIIコードの理解が進みました。
python結果を手作業でコピペするのではなく、WSL上で | (パイプ) を使って nc コマンドに直接python出力結果を渡す方法などもあるようです。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?