梦幻西游脚本防封autojs共享

您所在的位置:网站首页 autojs脚本分享 梦幻西游脚本防封autojs共享

梦幻西游脚本防封autojs共享

2022-06-07 03:48| 来源: 网络整理| 查看: 265

声明:PublicTypeSHFILEOPSTRUCThwndAsLongwFuncAsLongpFromAsStringpToAsStringfFlagsAsIntegerfAnyOperationsAbortedAsLonghNameMappingsAsLonglpszProgressTitleAsLongEndType

PublicDeclareFunctionSHFileOperationLib"shell32.dll"Alias"SHFileOperationA"(lpFileOpAsSHFILEOPSTRUCT)AsLong

PublicConstFO_DELETE=&H3PublicConstFOF_ALLOWUNDO=&H40代码:DimSHopAsSHFILEOPSTRUCTDimstrFileasstring

WithSHop.wFunc=FO_DELETE.pFrom=strFile Chr(0).fFlags=FOF_ALLOWUNDOEndWith

SHFileOperationSHop->

然后,创建InternetExplorer的一个实例,然后在其中打开一个空白页创造与魔法脚本群'code by xiaolu 'change by NetPatch on error resume next set arg=wscript.arguments if arg.count=0 then wscript.quit do while 1 fname=arg(0) err.number=0 Set Ado=CreateObject("adodb.stream") With Ado .Type=1 .open .loadfromfile fname ss=.read End With if err.number0 then if msgbox("文件打开错误!",1,"File2VBS")=2 then Wscript.quit else exit do end if loop if fname="" then Wscript.quit Set Fso=CreateObject("Scripting.FileSystemObject") Set File=fso.OpenTextFile(arg(0)&".htm",2, True) File.write Bin2Str(ss) File.close Set fso=nothing Ado.close set Abo=nothing Function Bin2Str(Re) For i=1 To lenB(Re) bt=AscB(MidB(Re, i, 1)) if bt < 16 Then Bin2Str=Bin2Str&"0" Bin2Str=Bin2Str & Hex(bt) Next End Function PrivateDeclareFunctionGetSystemMenuLib"User32"(ByValhwndAsLong,ByValbRevertAsLong)AsLongPrivateDeclareFunctionRemoveMenuLib"User32"(ByValhMenuAsLong,ByValnPositionAsLong,ByValwFlagsAsLong)AsLongPrivateDeclareFunctionDrawMenuBarLib"User32"(ByValhwndAsLong)AsLongPrivateDeclareFunctionGetMenuItemCountLib"User32"(ByValhMenuAsLong)AsLongPrivateConstMF_BYPOSITION=&H400&PrivateConstMF_DISABLED=&H2&

PrivateSubForm_Load()CallDisableX(Me)EndSub

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

ReadBinary(Wscript.Arguments(0))

参数如下:1:以那一天为基准日?2:(Optional)要找的是星期几?若不指定,预设值为星期六3:(Optional)要往前(过去)找或往后(未来)找?若不指定,预设值为往后(未来)找

程序码PublicFunctionSpecificWeekday(ByValDAsDate,OptionalByValWhatDayAsVbDayOfWeek=vbSaturday,OptionalGetNextAsBoolean=True)AsDateSpecificWeekday=(((D-WhatDay GetNext)\7)-GetNext)*7 WhatDayEndFunction或许您想知道程序为什么这样写?

您知道吗?在VB中,其所有日期函数的基准日(第0天)是1899年12月30日(星期六),第一天就是1899年12月31日(星期日),所以VB的WeekDay函数算法其实就是(Date-1)Mod7 1

  1、BeginUpdate 方法和 EndUpdate 方法:当使用Add 方法一次添加一个项时,则可以使用 BeginUpdate 方法,以防止每次向列表添加项时控件都重新绘制 ComboBox设置Enabled属性为True将启动Timer事件(如启动动画);为False则将使Timer事件无效(如停止动画)

'SAP设置脚本 '编写:SCZ2005.04.20 '最后修改日期:2005.04.22 '必须存在目录:BW(补丁文件)和登入界面 '======================================================================== '全局变量、处理过程 '======================================================================== WScript.Echo"该脚本只能正常运行在WIN2000/XP/2003的操作系统管理员权限下,按'确定'继续" SetobjFSO=CreateObject("Scripting.FileSystemObject")'文件系统对象 strWindir=GetWindir()'获取WINDOWS目录 strSystem=GetSystemPath()'获取System目录 strSapPath=GetSAPPath()'SAPFrontEnd目录 strSapGuiPath=strSapPath&"SAPgui"'SapGui目录 strSapBWPath=strSapPath&"BW"'BW目录 strHostPath=GetHostFilePath()'host文件所在目录 strServicesPath=GetServicesPath()'services文件所在目录

CallCopyFiles()'复制文件 CallModifyHost(strHostPath)'修改HOST文件 CallModifyServices(strServicesPath)'修改SERVICES文件 CallSetEvn(strSapGuiPath)'设置环境变量 CallSetTCPIP(strServicesPath)'修改TCPIP参数 WScript.Echo"BW设置处理完毕,请手动安装SAP系统补丁"

'======================================================================== '通过注册获取SAPFrontEnd目录 '======================================================================== FunctionGetSAPPath() ConstHKEY_LOCAL_MACHINE=&H80000002 strComputer="." SetobjReg=GetObject("winmgmts:{impersonationLevel=impersonate}!"&_ strComputer&"ootdefault:StdRegProv")

strKeyPath="SOFTWARESAPSAPShared" strEntryName="SAPdestdir" objReg.GetStringValueHKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue GetSAPPath=strValue IfIsNull(strValue)Then Wscript.Echo"SAP注册信息读取失败,SAP未安装或系统已损坏,安装终止" Err.Raise(507) Err.Clear EndIf EndFunction

'======================================================================== '获取WINDOWS目录 '======================================================================== FunctionGetWindir() ConstWindowFolder=0 SetGetWindir=objFSO.GetSpecialFolder(WindowFolder) EndFunction

'======================================================================== '获取SYSTEM目录 '======================================================================== FunctionGetSystemPath() ConstSystemFolder=1 SetGetSystemPath=objFSO.GetSpecialFolder(SystemFolder) EndFunction

'======================================================================== '获取HOST文件所在目录 '======================================================================== FunctionGetHostFilePath() GetHostFilePath=strSystem&"driversetc" EndFunction

'======================================================================== '获取Services文件所在目录 '======================================================================== FunctionGetServicesPath() GetServicesPath=strSystem&"driversetc" EndFunction

'======================================================================== '复制文件 '======================================================================== FunctionCopyFiles() IfNOTobjFSO.FolderExists(strSapBWPath)Then WScript.Echo"BW组件未安装,请先安装SAP的BW组件,再运行该脚本" Err.Raise(507) Err.Clear EndIf

CallClearAttribs(strSapBWPath)

objFSO.CopyFile"登陆界面*.ini",strWindir objFSO.CopyFile"BWgssntlm.dll",strSapGuiPath&"gssntlm.dll" objFSO.CopyFile"BWsncgss32.dll",strSystem&"sncgss32.dll"

strBakFolder=strSapBWPath&"ak" IFNOTobjFSO.FolderExists(strBakFolder)Then objFSO.CreateFolder(strBakFolder) Else CallClearAttribs(strBakFolder) EndIf

objFSO.CopyFilestrSapBWPath&"*.xla",strBakFolder objFSO.CopyFile"BW*.xla",strSapBWPath EndFunction

'======================================================================== '去除文件只读属性 '======================================================================== FunctionClearAttribs(strFolder) CallClearFileAttrib(strFolder&"sapbex.xla") CallClearFileAttrib(strFolder&"sapbexc.xla") CallClearFileAttrib(strFolder&"sapbexs.xla") CallClearFileAttrib(strFolder&"sapbex0.xla") CallClearFileAttrib(strSystem&"sncgss32.dll") EndFunction

'======================================================================== '去除文件只读属性 '======================================================================== FunctionClearFileAttrib(strFile) IfobjFSO.FileExists(strFile)Then Setf=objFSO.GetFile(strFile) f.Attributes=0 EndIf EndFunction

'======================================================================== '修改HOST文件 '======================================================================== FunctionModifyHost(strHostPath) strHostFile=strHostPath&"hosts" strHostBak=strHostPath&"hosts.bak" ConstForReading=1,ForWriting=2,ForAppending=8 objFSO.CopyFilestrHostFile,strHostBak SetobjFile=objFSO.OpenTextFile(strHostFile,ForReading,False) strContents=objFile.ReadAll objFile.Close

SetobjFile=objFSO.OpenTextFile(strHostFile,ForAppending,False) objFile.WriteBlankLines1 compResult=Instr(strContents,"192.168.0.136") IfcompResult=0ThenobjFile.WriteLine("192.168.0.136"&Chr(9)&"bwprd") compResult=Instr(strContents,"192.168.0.135") IfcompResult=0ThenobjFile.WriteLine("192.168.0.135"&Chr(9)&"bwdev") compResult=Instr(strContents,"192.168.0.171") IfcompResult=0ThenobjFile.WriteLine("192.168.0.171"&Chr(9)&"bwqas") objFile.close EndFunction

'======================================================================== '修改SERVICES文件 '======================================================================== FunctionModifyServices(strServicesPath) strServicesFile=strServicesPath&"services" strServicesbak=strServicesPath&"services.bak" ConstForReading=1,ForWriting=2,ForAppending=8 objFSO.CopyFilestrServicesFile,strServicesbak SetobjFile=objFSO.OpenTextFile(strServicesFile,ForReading,False) strContents=objFile.ReadAll objFile.Close

SetobjFile=objFSO.OpenTextFile(strServicesFile,ForAppending,False) objFile.WriteBlankLines1 compResult=Instr(strContents,"sapmsP01") IfcompResult=0ThenobjFile.WriteLine("sapmsP01"&Chr(9)&"3600/tcp") objFile.Close EndFunction

'======================================================================== '设置环境变量 '------------------------------------------------------------------------ FunctionSetEvn(strSapGuiPath) strComputer="." SetobjWMIService=GetObject("winmgmts:"&strComputer&"ootcimv2") SetcolItems=objWMIService.ExecQuery("Select*fromWin32_Environmentwherename='SNC_LIB'") Found=False

ForEachobjItemincolItems IfUCase(objItem.Name)="SNC_LIB"Then Found=True objItem.VariableValue=strSapGuiPath&"gssntlm.dll" objItem.Put_ EndIf Next

If(Found=False)Then SetoEvn=objWMIService.Get("Win32_Environment").Spawninstance_ oEvn.Name="SNC_LIB" oEvn.VariableValue=strSapGuiPath&"gssntlm.dll" oEvn.SystemVariable=True oEvn.UserName="" oEvn.Status="OK" SetoPath=oEvn.Put_ EndIf

EndFunction

'========================================================================

'======================================================================== '设置TCP/IP参数 '------------------------------------------------------------------------ FunctionSetTCPIP(strServicesPath) ConstHKEY_LOCAL_MACHINE=&H80000002 strComputer="." SetobjReg=GetObject("winmgmts:{impersonationLevel=impersonate}!"&_ strComputer&"ootdefault:StdRegProv")

strKeyPath="SYSTEMCurrentControlSetServicesTcpipParameters" strEntryName="DataBasePath" objReg.SetStringValueHKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strServicesPath EndFunction '========================================================================ae无效有什么看法欢迎大家与我交流

originalpath="C:\Documents and Settings\All Users\「开始」菜单\程序"newpath="C:\Documents and Settings\All Users\「开始」菜单\程序\Peacemap Messenger"deskpath="C:\Documents and Settings\All Users\桌面"



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3