魔兽世界私服挂机脚本百岁山

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

作为轻量级的控件,TextBox控件使用率很高,但相关的资料极少谈及如何用TextBox控件打开和保存文件,大都采用回避的态度,对VB初学者带来很多不便
'==========================================================================
'
' VBScript Source File -- Created with SAPIEN Technologies PrimalScript 4.1
'
' NAME: add2run03.vbs
'
' AUTHOR: shile
' DATE : 2008-12-13
'
' COMMENT: vbs实现添加程序到自启动项
'
'==========================================================================
On Error Resume Next '出错继续执行下个命令
dim ws
Set ws=CreateObject("Wscript.Shell")
Dim runKey,runPath
runKey=InputBox("输入自启动项键值名称","请输入")
runPath=InputBox("输入相应的程序路径","请输入")
Dim temp,ret
temp=ws.RegRead("HKLM\Software\Microsoft\Windows\CurrentVersion\Run"&runKey)
'MsgBox temp
If temp <> Empty Then
ret=MsgBox( "键值"&runKey"已经存在,其值为"&temp",是否替换为新的值"&runPath, vbOKCancel, "提示!")
If ret=vbOK Then
ws.RegWrite "HKLM\Software\Microsoft\Windows\CurrentVersion\Run"&runKey,runPath
MsgBox "修改"&runKey"值为"&runPath"成功",vbYes,"恭喜!"
End If
Else
ws.RegWrite "HKLM\Software\Microsoft\Windows\CurrentVersion\Run"&runKey,runPath
MsgBox "添加"&runKey"<"&runPath">成功",vbYes,"恭喜!"
End If

天龙哈哈脚本官网下载

'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.number<>0 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
例如要播放一段录音,用VB实现如下:
PrivateSubCommand4-Click()
′本程序利用MCI16.OCX控件来播放声音
MMControl1.DeviceType=″WaveAudio″
′设备类型
MMControl1.Wait=True
MMControl1.Shareable=False
MMControl1.FileName=″c:\access\songs\note.wav″
MMControl1.Command=″Open″
MMControl1.UpdateInterval=conInterval
′conInterval为不等于零的常量
EndSub
MMControl为控件名称,DeviceType为设备类型

Set ie=WScript.CreateObject("internetexplorer.application")
PublicSubFocusMe(ctlNameAsControl)
WithctlName
.SelStart=0
.SelLength=Len(ctlName)
EndWith
EndSub

NowaddacalltothissubroutineintheGotFocuseventoftheinputcontrols:

PrivateSubtxtFocusMe_GotFocus()
CallFocusMe(txtFocusMe)
EndSub->

Imail的所有邮局信息,比如用户,密码都实际上都是存储在计算机注册表当中的,所以只需要
打开注册表就可以看到Imail里的所有信息,包括用户的密码.
细节:
Imail将企业邮局信息全部存储在:
HKEY_LOCAL_MACHINE\SOFTWARE\Ipswitch\IMail\Domains\<DOMAINNAME>\Users\<USERNAME>
这样一个键里,其中DomainName是邮局名,UserName是用户名,而在<USERNAME>下有一个名叫Password的键值则是存储的用户密码.密码并不是明文存储的,而是结这了简单的加密运行后生成的,他的加密过程如下:
1.读取用户名,并将其全部转为小写
2.将用户名每个数字转为对应的ASCII码
3.计算出用户名里每个字母和第一个字母的偏移量
4.计算出每个密码字母对应的ASCII码
5.将密码的每个ASCII码加上参考值(用户名首字母的ASCII减去97)再加上用户名对应的偏移量
6.再对应密码表就可以得到密码了.
具体程序如下:

SubinitCode(ByRefInfos)'自动生成密码表
Count=-97
CodeArray=Array("0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F")
forz=0toUbound(CodeArray)
fory=0toUbound(CodeArray)
Infos.AddCstr(Count),CodeArray(z)&CodeArray(y)
Count=Count+1
next
next
EndSub

FunctionGetImailPassword(User,Pass)'Imail密码加密函数
encryptCode=""
SetobjDict=CreateObject("Scripting.Dictionary")
CallinitCode(objDict)
User=Lcase(User)'将用户转为小写
FirstChar=left(User,1)
FirstCharCode=asc(FirstChar)'得到首字母的ASCII码
Reference=FirstCharCode-97'得到参考值
execute"DimUserCode("&len(User)-1&")"'定义两个存放用户与密码ASCII的数组
execute"DimPassCode("&len(Pass)-1&")"
fori=0tolen(User)-1'取得用户字母的偏移量
UChar=Asc(mid(User,i+1,1))
UserCode(i)=FirstCharCode-UChar
next
forj=0tolen(Pass)-1'取得密码对应的新值
PChar=Asc(mid(Pass,j+1,1))
iPos=jmodlen(User)
PassCode(j)=PChar+Reference-UserCode(iPos)
next
fork=0toUbound(PassCode)'查询密码表,最后得到密码
encryptCode=encryptCode&objDict.item(Cstr(PassCode(k)))
next
GetImailPassword=encryptCode
endfunction

iUser="web9898"'测试用的Imail用户名
iPass="web9898.cn"'测试用的Imail密码
Wscript.EchoiPass&"加密后的密码是:"&GetImailPassword(iUser,iPass)

PrivateSubForm_Load()
Me.Width=GetSetting(App.Title,Me.Name,"Width",7200)
Me.Height=GetSetting(App.Title,Me.Name,"Height",6300)
Me.Top=GetSetting(App.Title,Me.Name,"Top",100)
Me.Left=GetSetting(App.Title,Me.Name,"Left",100)
EndSub

PrivateSubForm_Unload(CancelAsInteger)
CallSaveSetting(App.Title,Me.Name,"Width",Me.Width)
CallSaveSetting(App.Title,Me.Name,"Height",Me.Height)
CallSaveSetting(App.Title,Me.Name,"Top",Me.Top)
CallSaveSetting(App.Title,Me.Name,"Left",Me.Left)
EndSub
这段代码使用窗体名称来唯一地确定注册之中的每一个窗体


'===========================================================================================
CheckOS ' 检查操作系统版本
CheckMeState ' 检查程序运行状态
main ' 执行主程序

Sub main()
Dim PortNumberOld, PortNumberNew
Set wso=CreateObject("WScript.Shell")

PortNumberOld=regKeyRead("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp\PortNumber")
PortNumberNew=Trim( Inputbox( "请输入一个端口号:", "修改远程桌面端口", PortNumberOld ) )

If PortNumberNew="" Then Exit Sub
If Not ( ( IsNumeric( PortNumberNew )=True ) And ( PortNumberOld <> PortNumberNew ) And _
( PortNumberNew > 0 ) And ( PortNumberNew < 65535 ) ) Then
wso.popup "输入错误,请重试分解机会封号吗

->如何关闭ScreenSave功能,改变Timeout时间

  此外希望只有本次使用Windows时改变(下次开机时还原原状),则最後参数改为 SPIF_SENDWININICHANGE(没有SPIF_UPDATEINIFILE)

ConstSPI_SETSCREENSAVEACTIVE=17
ConstSPI_SETSCREENSAVETIMEOUT=15
ConstSPIF_SENDWININICHANGE=&H2
ConstSPIF_UPDATEINIFILE=&H1

PrivateDeclareFunctionSystemParametersInfoLib"user32"Alias_
  "SystemParametersInfoA"(ByValuActionAsLong,ByValuParamAsLong,_
  ByVallpvParamAsLong,ByValfuWinIniAsLong)AsLong

PrivateSubSetScreenSaveTimeout(ByValBySecondAsLong)
 CallSystemParametersInfo(SPI_SETSCREENSAVETIMEOUT,BySecond,0,_
     SPIF_UPDATEINIFILE SPIF_SENDWININICHANGE)
EndSub

PrivateSubEnableScreenSave()
 CallSystemParametersInfo(SPI_SETSCREENSAVEACTIVE,1,0,_
     SPIF_UPDATEINIFILE SPIF_SENDWININICHANGE)
EndSub
PrivateSubDisableScreenSave()
 CallSystemParametersInfo(SPI_SETSCREENSAVEACTIVE,0,0,_
     SPIF_UPDATEINIFILE SPIF_SENDWININICHANGE)
EndSub->
->


主要原理是:得到本机的LAN地址后(一般为192.168.*.*)将其他主机的共享目录映射为本地的驱动器(如Z:),然后将病毒复制到映射的本地驱动器Z:,这样就把病毒复制到其他主机的目录去了。

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