提问人:Aditya Verma 提问时间:2/3/2021 最后编辑:nbkAditya Verma 更新时间:2/7/2021 访问量:461
如何在to_tsquery中进行Postgresql注入?
How to do Postgresql injection in to_tsquery?
问:
所以要求很简单,我的查询是:
select to_tsquery('XXX');
我的字符串应该是什么,以便: 返回'XXX'
to_tsquery('XXX')
pg_sleep(2)
有什么办法吗?
PS:我是出于良好的动机而尝试的。
答:
0赞
mchern1kov
2/7/2021
#1
我不认为to_tsquery('XXX')有办法返回。但是,如果你只是想做一些类似的事情,你可以这样做:pg_sleep(2)
select pg_sleep(2);
select to_tsquery('XXX'||pg_sleep(2)); -- Simple sleep
select to_tsquery('XXX'||(select case when (<your_condition_here>) then pg_sleep(10) else pg_sleep(0) end)); -- Conditional sleep
评论
tsvector