如何结合存储过程并选择查询结果?

编程入门 行业动态 更新时间:2024-10-22 09:36:16
本文介绍了如何结合存储过程并选择查询结果?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在尝试将xp_cmdshell的结果与选择查询结合在一起. 我已经尝试过工会&阅读了有关创建临时表的信息,但结果是只有1列.更精确地说,我需要一个较小的查询来将xp_cmdshell的结果与select查询结合起来,因为我试图在基于联合的sql注入中使用它

I am trying to combine the results of xp_cmdshell with a select query. I have tried union & read about creating a temp table, but as my result will be having only 1 column. To be more precise i need a smaller query to combine the results of xp_cmdshell with select query as am trying to use it in union based sql injection

例如:

Select name from employee union exec xp_cmdshell 'whoami'

我知道这行不通,但有些相似会很棒:)

I know this wont work but somewhat similar would be great :)

推荐答案

创建一个临时表并插入#temp EXEC ..或使用OPENROESET.推荐这个 http ://beyondrelational/modules/2/blogs/70/posts/10812/select-columns-from-exec-procedurename-is-this-possible.aspx

Create a temp table and do insert into #temp EXEC.. or use OPENROESET. Refer this beyondrelational/modules/2/blogs/70/posts/10812/select-columns-from-exec-procedurename-is-this-possible.aspx

更多推荐

如何结合存储过程并选择查询结果?

本文发布于:2023-10-13 10:19:01,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1487677.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:查询结果   存储过程

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!