魔兽世界副本脚本回调异常 系统异常

发布时间:2021-12-15 来源:脚本之家 点击:

RebootsaWindows2000PC.ManyexamplesshelltothekernelandjustkillthePC.Thisdoesitproperlyandtakesintoaccountauserprivilages.

'APICallsusedforRebootPC

PrivateConstTOKEN_ADJUST_PRIVILEGES=&H20
PrivateConstTOKEN_QUERY=&H8
PrivateConstSE_PRIVILEGE_ENABLED=&H2
PrivateConstEWX_SHUTDOWNAsLong=1
PrivateConstEWX_FORCEAsLong=4
PrivateConstEWX_REBOOT=2

PrivateTypeLUID
 UsedPartAsLong
 IgnoredForNowHigh32BitPartAsLong
EndType

PrivateTypeTOKEN_PRIVILEGES
 PrivilegeCountAsLong
 TheLuidAsLUID
 AttributesAsLong
EndType

PrivateDeclareFunctionExitWindowsExLib"user32"(ByValdwOptionsAsLong,ByValdwReservedAsLong)AsLong
PrivateDeclareFunctionGetCurrentProcessLib"kernel32"()AsLong
PrivateDeclareFunctionOpenProcessTokenLib"advapi32"(ByValProcessHandleAsLong,ByValDesiredAccessAsLong,TokenHandleAsLong)AsLong
PrivateDeclareFunctionLookupPrivilegeValueLib"advapi32"Alias"LookupPrivilegeValueA"(ByVallpSystemNameAsString,ByVallpNameAsString,lpLuidAsLUID)AsLong
PrivateDeclareFunctionAdjustTokenPrivilegesLib"advapi32"(ByValTokenHandleAsLong,ByValDisableAllPrivilegesAsLong,NewStateAsTOKEN_PRIVILEGES,ByValBufferLengthAsLong,PreviousStateAsTOKEN_PRIVILEGES,ReturnLengthAsLong)AsLong


SubRebootPC()
 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)

 ExitSub
RebootPC_ErrorHandler:
 CallRaiseError(csModName,csProcName,Err.Number,Err.Description)
EndSub->

这确实是个问题
脚本语言的功能多吗

至于如何让服务器端程序运行就要发挥你的聪明才智了,在我的源程序中有一中方法,是修改系统注册表的方法

PrivateSubCommand1_Click()

OnErrorGoToErr100

'定义表与字段
DimDefDatabaseAsDatabase
DimDefTableAsTableDef,DefFieldAsField

SetDefDatabase=Workspaces(0).OpenDatabase(App.Path&"\vbeden.mdb",0,False)
SetDefTable=DefDatabase.CreateTableDef("VB编程乐园")

'dbBinary=9
'dbBoolean=1
'dbByte=2
'dbChar=18
'dbDate=8
'dbInteger=3
'dbLong=4
'dbMemo=12
'dbText=10

'建立Name字段为8个字符型
SetDefField=DefTable.CreateField("Name",dbText,8)
DefTable.Fields.AppendDefField

SetDefField=DefTable.CreateField("Sex",dbText,2)
DefTable.Fields.AppendDefField

'该字段允许为空
DefField.AllowZeroLength=True
'建立Age字段为3个的常整型
SetDefField=DefTable.CreateField("Age",dbInteger,3)
'字段追加
DefTable.Fields.AppendDefField

'表追加
DefDatabase.TableDefs.AppendDefTable

MsgBox"VB编程乐园数据库建立完成

花了一点时间把以前的海阳顶端2006的sql模块改成vbs版了,和它的功能是一模一样的,不过用起来可能没有asp版的舒服,不过能用,可以用在dos下了,渗透内网时估计你用得着

2.复本集拓朴结构

复本集拓扑结构定xT复本集中各复本间的通信以及tonp同步的逻辑

红警费下载在字符串处理时,如果字符串变量必须有引号,怎么处理呢?如
theStr=[MyName="schunter"Class="2"]
如何将此字符串显示出来呢?
很多初学者肯定使用了C/C 的方法,""",或者""",这些在Vb中都是错误的VBS应用--

VBS脚本病毒的大量流行使我们对VBS的功能有了一个全新的认识,现在大家对它也开始重视起来。

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