防SQL注入的VBSrcipt代码

所属分类: 脚本专栏 / vbs 阅读数: 708
收藏 0 赞 0 分享
<script language="vbscript"> 
        function checkstr(strname) 
            strn=trim(strname.value) 
            str=trim(strname.value) 
            for i=1 to len(str) 
                strcheck=asc(left(str,1)) 
                if not ((strcheck=<122 and strcheck>=97) or (strcheck<=90 and strcheck>=65) or (strcheck<=57 and strcheck>=48)) then 
                    msgbox("请勿使用除英文字母及数字以外的字符!") 
                    strname.value = left(strn,i-1) 
                    strname.focus 
                    exit for 
                end if 
                str=Right(str,len(str)-1) 
            next  
        end function 
        function checknum() 
            checknum=true 
            if not document.all.txtMailSize.value="" then 
                if not IsNumeric(document.all.txtMailSize.value) then 
                    msgbox("请勿使用数字以外的字符!") 
                    document.all.txtMailSize.value="" 
                    document.all.txtMailSize.focus 
                    checknum=false 
                else if document.all.txtMailSize.value>5 or document.all.txtMailSize.value<0 then 
                        msgbox("请填写5-0之间的数字!") 
                        document.all.txtMailSize.value="" 
                        document.all.txtMailSize.focus 
                        checknum=false 
                    end if 
                end if 
            end if 
        end function 

        function checkupdate() 
            checkupdate=true 
            if document.all.txtU_name.value="" or document.all.txtMailSize.value=""  then 
                msgbox("您填写的信息不完全!")         
                checkupdate=false 
            end if 
        end function 
        function compare() 
            compare=true 
            if not document.all.txtRePsw.value =document.all.txtPsw.value then 
                msgbox("两次密码输入不一致!") 
                document.all.txtRePsw.focus 
                compare=false 
            end if 
        end function
更多精彩内容其他人还在看

VBScript Enun Remote CMD Shell代码

Enun Remote CMDShell,喜欢玩cmdshell的朋友可以参考下
收藏 0 赞 0 分享

VBScript 打造自己的远程CMDShell附使用教程

这个cmdshell需要结合nc进行配合使用,现在肉鸡上执行cmdshell然后在本地上面运行nc,注意看下面的参数
收藏 0 赞 0 分享

VBS获取外网IP地址并发送到指定邮箱的代码

以前脚本之家发过类似功能的文章,这篇文章的获取网站不同,实现代码也不错,喜欢的朋友可以测试下
收藏 0 赞 0 分享

VBS 获取外网IP的实现代码

这篇文章主要介绍了用vbs获取外网的ip地址,通过用vbs访问ip显示页面的返回值实现,需要的朋友可以参考下
收藏 0 赞 0 分享

VBS 自动登录论坛的实现代码

这篇文章主要介绍了如果通过vbs实现论坛自动登录的实现方法,其实主要利用了vbs操作网页表单的自动填写实现,喜欢的朋友可以试试
收藏 0 赞 0 分享

WMI 创建系统服务的实现代码(Automatic)

需要注意的是启动模式,应为“Automatic”,而不是“Auto”
收藏 0 赞 0 分享

VBS 加解密 For CAPICOM

这篇文章主要介绍了vbs中通过CAPICOM进行加解密的实现代码,需要的朋友可以参考下
收藏 0 赞 0 分享

VBS 加解密 For MS Script Encode

这篇文章主要介绍了微软自己的代码加解密实现方法,需要的朋友可以参考下
收藏 0 赞 0 分享

VBE decoder

Decode all files encoded (original version) with screnc.exe
收藏 0 赞 0 分享

VBS 十六进制异或加密实现代码

文件不要过大,最好不要超过 100 KB,密钥不要用数字,不想改了。理论上支持任何二进制文件格式
收藏 0 赞 0 分享
查看更多