我想用一句select,让它找我电脑上一份名叫abc.dll文件的路径

解决方案 »

  1.   

    你DB的表里面有存储这些dll的路径么?
    如果有,没问题,可以查找。
    如果没有,请维护进来,否则白搭。推荐你一款小软件--- Everything,可以寻找查找文件。
      

  2.   

    明显没有给点奇思妙想的好办法么,别说不行
    比如调用cmd:exec sp_oamethod @obj,'Exec',null,'cmd.exe /c find *.*' 之类的
      

  3.   

    只是想让刚才那位老兄知道,我不能登陆那台机器
    只有一个后门网页  可以写sql
      

  4.   

    那我想找C盘下 有没有abc这个文件夹
    然后找abc下是否有abc.dll这个文件这样行不行或者能不能select出来某个文件夹下   所有的文件夹和文件的名称
      

  5.   

    exec xp_cmdshell 'dir c:\' 但你有这个xp_cmdshell 权限吗?
      

  6.   

    对数据负责,对自己的行为负责.
    --如果只有网页后门,还是别弄了,要用ascii(10)而且比较麻烦。--判断文件是否存在
    declare @a table (a varchar(1) ,b varchar(1) ,c varchar(1))
    insert into @a
    exec master..xp_fileexist 'D:\SalarySystem\Salary.xls'
    --if exists (select * from @a where a='1')
    if exists (select * from @a where a='1') 
    print '存在'
    else
    print '不存在';
    --已存在文件--result:
    (1 行受影响)
    存在--判断文件路径是否存在
    declare @a table (a varchar(1) ,b varchar(1) ,c varchar(1))
    insert into @a
    exec master..xp_fileexist 'D:\SalarySystem\'
    --if exists (select * from @a where a='1')
    if exists (select * from @a where b='1') 
    print '存在'
    else
    print '不存在';
    --已存在文件--result:
    (1 行受影响)
    存在
      

  7.   


    难道 sp_oacreate 只能调用 wscript.shell 组件?
    可以调用的 ole 组件多的是,这些组件可以操作 windows 系统的各个方面。建议 lz 去专业的 hack 站点,那里有详细的教程。
      

  8.   

    exec master..xp_cmdshell 'dir abc.dll' 
      

  9.   

    CREATE TABLE #tmp ([File Exists] BIT, [File is a Directory] BIT, [Parent Directory Exists] BIT)
    INSERT INTO #tmp ([File Exists], [File is a Directory], [Parent Directory Exists])
    EXEC master.dbo.xp_fileexist 'D:\media\武藤兰.avi'
    SELECT * FROM #tmp
    DROP TABLE #tmp可以查任何文件和文件夹,同时会判断你要找的这个文件是文件还是文件夹,会显示上级路径是否正确