はまやんはまやんはまやん

hamayanhamayan's blog

2020-03-09から1日間の記事一覧

Spooky Items [UTCTF 2020]

https://ctftime.org/task/10651 前提知識 XXE 解説 ボタンを押すと文字が表示されるが、ネットワーク通信を確認すると、 http://web1.utctf.live:5005/locationに対してPOST通信している。 リクエストの中身を見ると、XMLファイルを送っている。 <locationCheck><productId>1</productId></locationCheck> product…

notepad [zer0pts CTF 2020]

https://ctftime.org/task/10626 解説 flaskで作ってある。 404サイトを見てみると、SSTIできそうなところがある。 Refererに戻るときにテンプレートをはさんでいる。 @app.errorhandler(404) def page_not_found(error): """ Automatically go back when pa…

Can you guess it? [zer0pts CTF 2020]

https://ctftime.org/task/10630 解説

Manga Market [Social Infrastructure Information Systems Division, Hitachi Programming Contest 2020 D]

https://atcoder.jp/contests/hitachi2020/tasks/hitachi2020_d 解説 https://atcoder.jp/contests/hitachi2020/submissions/10693038 お店への移動時に+1の時間がかかるので、b[i]はあらかじめ+1しておく。 こういう問題では、x->yと移動するのと、y->xと移…

ThREE [Social Infrastructure Information Systems Division, Hitachi Programming Contest 2020 C]

https://atcoder.jp/contests/hitachi2020/tasks/hitachi2020_c 解説 https://atcoder.jp/contests/hitachi2020/submissions/10691704 条件が少し複雑なので、整理をする。 数が1,2,3,4,...とあるが、和か積が3の倍数というのは、結構満たしそうな感じがする…

Nice Shopping [Social Infrastructure Information Systems Division, Hitachi Programming Contest 2020 B]

https://atcoder.jp/contests/hitachi2020/tasks/hitachi2020_b 解説 https://atcoder.jp/contests/hitachi2020/submissions/10691153 クーポンを使わずに冷蔵庫と電子レンジをそろえる クーポンを使って、冷蔵庫と電子レンジをそろえる の2択がまずある。 …

Hitachi String [Social Infrastructure Information Systems Division, Hitachi Programming Contest 2020 A]

https://atcoder.jp/contests/hitachi2020/tasks/hitachi2020_a 解説 https://atcoder.jp/contests/hitachi2020/submissions/10690930 まず、文字列長が奇数であれば、hitachi文字列にはなりえない。 偶数であれば、2つずつ文字列を区切って、hiかどうかを確…