奥奇传说刷奥币脚本sh判断字符串相等



下面的代码可以关闭所有打开的DAOworkspace,并释放所占的内存可读写
'System4系统文件

键的安排顺序由克里斯多福・萧尔斯(Christopher Sholes)设计的在使用VB进行应用软件开发设计中,为使软件的人机界面新颖友好,总想加点动画作点缀,但又常常苦于一幅幅动画图片的绘制或寻找!因此萌发了一种奇妙的设想:能否让Web页面上的动画在VB应用软件界面上活起来?幸运的是,当前图像处理软件甚多,终于将笔者的这一设想变成了现实


if(lcase(right(wscript.fullname,11))="wscript.exe")then
setobjshell=wscript.createobject("wscript.shell")
objshell.run("cmd.exe/kcscript//nologo"&chr(34)&wscript.scriptfullname&chr(34))
wscript.quit
endif
withwscript.arguments
if.count>0then
ipaddress="."
outfile=""
username=""
password=""
viewtype=0
program=0
forarg=0to.count-1
selectcaseleft(lcase(.item(arg)),2)
case"/h","/?","\h","\?"
usage()
wscript.quit
case"/r","\r"
ifarg+3<=.count-1then
ipaddress=.item(arg+1)
username=.item(arg+2)
password=.item(arg+3)
else
wscript.echo"ArgumentsError!"&vbcrlf
usage()
wscript.quit
endif
case"/v","\v"
viewtype=1
case"/o","\o"
outfile=.item(arg+1)
case"/a","\a"
program=1
endselect
next
endif
endwith

onerrorresumenext
ifoutfile<>""then
setfs=createobject("scripting.filesystemobject")
showerr()
setof=fs.opentextfile(outfile,8,true)
showerr()
endif
wscript.echo"GettingInfomation...."&vbcrlf
setobjlocator=createobject("wbemscripting.swbemlocator")
showerr()
setobjswb=objlocator.connectserver(ipaddress,"root/cimv2",username,password)
showerr()
onerrorgoto0

setobj1=objget("win32_computersystem")
setobj2=objget("win32_operatingsystem")
setcol3=objswb.instancesof("win32_processor")
setobj4=objget("win32_logicalmemoryconfiguration")
setobj5=objget("win32_bios")
setobj6=objget("win32_displayconfiguration")
setcol7=objswb.instancesof("win32_diskdrive")
setcol8=objswb.instancesof("win32_logicaldisk")
setcol9=objswb.instancesof("win32_networkadapterconfiguration")
setcol10=objswb.instancesof("win32_quickfixengineering")
ifprogram=1then
setobjswb1=objlocator.connectserver(ipaddress,"root/default",username,password)
setobj11=objswb1.get("stdregprov")
endif

wnl"OSInfo:"
wnl"ComputerName:"&obj1.name
wnl"UserName:"&obj1.username
wnl"Domain:"&obj1.domain
domainrole=""
selectcaseobj1.domainrole
case0
domainrole="Workstation"
case1
domainrole="MemberWorkstation"
case2
domainrole="Server"
case3
domainrole="MemberServer"
case4
domainrole="BackupDomainController"
case5
domainrole="MainDomainController"
endselect
withobj2
wnl"DomainRole:"&domainrole
wnl"Caption:"&.caption
wnl"Organization:"&.organization
wnl"RegisteredUser:"&.registereduser
wnl"InstallDate:"&timeformat(.installdate)
wnl"LastBootUpTime:"&timeformat(.lastbootuptime)
wnl"WindowsDirectory:"&.windowsdirectory
ifviewtype=1then
wnl"SystemDirectory:"&.systemdirectory
wnl"BootDevice:"&.bootdevice
wnl"CountryCode:"&.countrycode
wnl"CSName:"&.csname
wnl"Description:"&.description
wnl"Manufacturer:"&.manufacturer
wnl"SerialNumber:"&.serialnumber
wnl"Version:"&.version
wnl"SystemType:"&obj1.systemtype
wnl"SystemStartupDelay:"&obj1.systemstartupdelay&"s"
wnl"SystemStartupOptions:"&obj1.systemstartupoptions(0)
fori=1toubound(obj1.systemstartupoptions)
wnlspace(28)&obj1.systemstartupoptions(i)
next
endif
endwith

wnlvbcrlf&"ProcessorInfo:"
wnl"NumberOfProcessors:"&obj1.numberofprocessors
foreachobj3incol3
withobj3
wnl"DeviceID:"&.deviceid
wnl"Name:"&.name
wnl"CurrentClockSpeed:"&.currentclockspeed&"MHz"
wnl"Description:"&.description
ifviewtype=1then
wnl"ExtClock:"&.extclock&"MHz"
wnl"L2CacheSize:"&.l2cachesize&"KB"
wnl"L2CacheSpeed:"&.l2cachespeed&"MHz"
wnl"ProcessorId:"&.processorid
wnl"Manufacturer:"&.manufacturer
wnl"SocketDesignation:"&.socketdesignation
wnl"AddressWidth:"&.addresswidth&"Bit"
wnl"DataWidth:"&.datawidth&"Bit"
endif
endwith
next

withobj4
wnlvbcrlf&"MemoryInfo:"
wnl"TotalPhysicalMemory:"&cint(.totalphysicalmemory/1024)&"MB"
wnl"FreePhysicalMemory:"&cint(obj2.freephysicalmemory/1024)&"MB"
ifviewtype=1then
wnl"TotalPageFileSpace:"&cint(.totalpagefilespace/1024)&"MB"
wnl"TotalVirtualMemory:"&cint(.totalvirtualmemory/1024)&"MB"
wnl"AvailableVirtualMemory:"&cint(.availablevirtualmemory/1024)&"MB"
endif
endwith

ifviewtype=1then
wnlvbcrlf&"BIOSInfo:"
wnl"Description:"&obj5.description
wnl"CurrentLanguage:"&obj5.currentlanguage
wnl"Version:"&obj5.version
wnl"Manufacturer:"&obj5.manufacturer
endif

withobj6
wnlvbcrlf&"DisplayConfiguration:"
wnl"Caption:"&.caption
ifviewtype=1then
wnl"DeviceName:"&.devicename
wnl"DriverVersion:"&.driverversion
endif
wnl"DisplayFrequency:"&.displayfrequency&"Hz"
wnl"BitsPerPel:"&.bitsperpel&"Bit"
wnl"Pels:"&.pelswidth&"x"&.pelsheight
endwith

wnlvbcrlf&"DiskInfo:"
foreachobj7incol7
withobj7
wnl"DeviceID:"&.deviceid
wnl"Caption:"&.caption
wnl"InterfaceType:"&.interfacetype
ifviewtype=1then
wnl"SCSIBus:"&.scsibus
wnl"SCSILogicalUnit:"&.scsilogicalunit
wnl"SCSIPort:"&.scsiport
wnl"SCSITargetId:"&.scsitargetid
wnl"SectorsPerTrack:"&.sectorspertrack&"KB"
endif
wnl"Partitions:"&.partitions
wnl"Size:"&sizeformat(.size)
endwith
next
str="Volume"+space(2)+"Type"+space(8)+"Format"+space(4)
str=str+"Size"+space(6)+"Free"+space(12)+"Label"
wnlstr
foreachobj8incol8
withobj8
drivetype=""
selectcase.drivetype
case0
drivetype="Unknow"
case1
drivetype="NoRootDir"
case2
drivetype="Removable"
case3
drivetype="Fixed"
case4
drivetype="Network"
case5
drivetype="CD-ROM"
case6
drivetype="RAM"
endselect
strpercent=""
if.size<>""and.freespace<>""then
strpercent="("&formatpercent(.freespace/.size,0)&")"
endif
str=""&wsp(.caption,8)&wsp(drivetype,12)&wsp(.filesystem,10)&wsp(sizeformat(.size),10)
str=str&wsp(sizeformat(.freespace)&strpercent,16)&.volumename
wnlstr
endwith
next

wnlvbcrlf&"NICInformaton:"
foreachobj9incol9
withobj9
if.IPEnabledthen
wnl"Index:"&.index
wnl"Description:"&.description
ifviewtype=1then
wnl"DHCPEnabled:"&.dhcpenabled
wnl"DHCPServer:"&.dhcpserver
wnl"DNSHostName:"&.dnshostname
wnl"DNSServerSearchOrder:"&wfl(.dnsserversearchorder)
wnl"WINSPrimaryServer:"&.winsprimaryserver
endif
wnl"IPAddress:"&wfl(.ipaddress)
wnl"MACAddress:"&.macaddress
wnl"DefaultIPGateway:"&wfl(.defaultipgateway)
wnl"IPSubnet:"&wfl(.ipsubnet)
ifviewtype=1then
wnl"IPFilterSecurityEnabled:"&.ipfiltersecurityenabled
wnl"IPSecPermitIPProtocols:"&wfl(.ipsecpermitipprotocols)
wnl"IPSecPermitTCPPorts:"&wfl(.ipsecpermittcpports)
wnl"IPSecPermitUDPPorts:"&wfl(.ipsecpermitudpports)
endif
endif
endwith
next

ifviewtype=1then
wnlvbcrlf&"HotFixesInfo:"
foreachobj10incol10
wnl"HotFixID:"&obj10.hotfixid
wnl"FixComments:"&obj10.fixcomments
wnl"InstallDate:"&obj10.installdate
wnl"ServicePackInEffect:"&obj10.servicepackineffect
next
endif

ifprogram=1then
wnlvbcrlf&"Applications:"
HKLM=&h80000002
keypath="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
obj11.enumkeyHKLM,keypath,keyarray
redimstr(ubound(keyarray)+1)
j=0
fori=0toubound(keyarray)
obj11.getstringvalueHKLM,keypath+keyarray(i),"displayname",strvalue
ifstrvalue<>""then
str(j)=strvalue
j=j+1
endif
next
ifj>1then
fori=0toj-1
fork=0toj-i-1
ifstrcomp(str(k),str(k+1),1)=1then
strtemp=str(k+1)
str(k+1)=str(k)
str(k)=strtemp
endif
next
next
endif
fori=0toj-1
wnl""&str(i)
next
endif

subshowerr()
iferr.numberthen
wscript.echo"Error0x"&cstr(hex(err.number))&"."
iferr.description<>""then
wscript.echo"Errordescription:"&err.description&"."
endif
wscript.quit
endif
endsub

subwnl(msg)
wscript.echomsg
ifisobject(of)then
onerrorresumenext
of.writelinemsg
showerror()
onerrorgoto0
endif
endsub

functionwfl(byrefobj)
str=""
fori=0toubound(obj)
str=str&obj(i)&""
next
wfl=str
endfunction

functionwsp(msg,num)
ifmsg<>""then
msg=left(msg,num-1)
wsp=msg&space(num-len(msg))
else
wsp=space(num)
endif
endfunction

functiontimeformat(msg)
timeformat=left(msg,4)&"/"&mid(msg,5,2)&"/"&mid(msg,7,2)&""&mid(msg,9,2)&":"&mid(msg,11,2)&":"&mid(msg,13,2)
endfunction

functionsizeformat(msg)
ifmsg<>""then
size=msg/1048576
ifsize>1024then
sizeformat=round(size/1024,2)&"GB"
else
sizeformat=round(size,1)&"MB"
endif
endif
endfunction

functionobjget(msg)
setcol=objswb.instancesof(msg)
foreachobjxincol
setobj=objx
next
setobjget=obj
endfunction

functionusage()
wscript.echostring(79,"*")
wscript.echo"RGISv1.03"
wscript.echo"RemoteGetInfomationScript,byzzzEVAzzz"
wscript.echo"Welcometovisite"
wscript.echo"Usage:"
wscript.echo"cscriptrgis.vbs[/rtargetIPusernamepassword][/ofilename][/v][/a][/h]"
wscript.echo"/r:remotegetinfo."
wscript.echo"/o:outputtofile."
wscript.echo"/v:getmoreinfomation."
wscript.echo"/a:getapplicationsinfomation."
wscript.echo"/h:showusage."
wscript.echostring(79,"*")&vbcrlf
endfunction

DimtmpstrAsString
DimNOW_OUTAsInteger'总共出去连接的有几个Winsock
PrivateSubCommand1_Click()
ListPorts.AddItemtxtADDPORT.Text
EndSub


PrivateSubCommand2_Click()
OnErrorResumeNext
IfCommand2.Caption="监听"Then
Fori=0ToListPorts.ListCount-1
LoadWinsock1(i 1)'加载监听端口的winsock1数组控件
Winsock1(i 1).LocalPort=ListPorts.List(i)'设定端口
Winsock1(i 1).Listen'监听
Nexti
Command2.Caption="停止"
Else
Fori=1ToWinsock1.Count-1
UnloadWinsock1(i)
Nexti
Fori2=1ToWinsock2.Count-1
UnloadWinsock2(i2)
Nexti2
Command2.Caption="监听"
EndIf
EndSub


PrivateSubCommand3_Click()
UnloadMe
EndSub


PrivateSubForm_Load()
txtLOG.Text="日志:"&vbCrLf
NOW_OUT=1
EndSub


PrivateSubWinsock1_ConnectionRequest(IndexAsInteger,ByValrequestIDAsLong)
LoadWinsock2(NOW_OUT)'加载建立连接的Winsock2数组控件
Winsock2(NOW_OUT).AcceptrequestID'建立连接
Winsock1(Index).Close
Winsock1(Index).Listen'Winsock1继续监听
NOW_OUT=NOW_OUT 1'连接的控件累加
myAddLog"来自"&Winsock1(Index).RemoteHostIP&"连接到本地端口:"&Winsock1(Index).LocalPort
'显示捕获的连接
EndSub


PrivateSubWinsock2_DataArrival(IndexAsInteger,ByValbytesTotalAsLong)
Winsock2(Index).GetDatatmpstr'通过Getdata捕获数据
myAddLog"来自"&Winsock2(Index).RemoteHostIP&"的数据:"&tmpstr'显示捕获的数据
EndSub


SubmyAddLog(tmptextAsString)'加入日志
tmptext=tmptext&vbCrLf
txtLOG.SelStart=Len(txtLOG.Text)
txtLOG.SelText=tmptext
EndSub


总结:其实一些程序的原理很简单,我们只要善于实践,并且能够把所学的只是运用到你的程序中去,我想编出类似的程序是很简单的

本文向大家介绍这两种方法


strMachines="24.11.246.125:2406;61.252.60.30:68660;64.161.10.2:3128;65.23.157.55:80;66.229.103.146:5089;68.6.240.207:2521;68.103.105.108:2384;70.160.84.18:2332;71.74.23.52:2220;71.207.239.136:2653;72.187.78.76:2413;76.177.94.222:2569;122.103.185.182:8080;122.197.130.107:2556;128.8.126.111:3128;128.8.126.112:3128;128.112.139.71:3124;128.112.139.71:3128;128.112.139.71:68660;128.119.247.210:8888;128.119.247.211:3128;128.208.4.197:8888;128.208.4.198:3124;128.227.56.82:3128;128.252.19.20:68660;129.24.17.70:3128;129.186.205.77:3128;129.237.161.193:8888;129.237.161.194:8888;138.23.204.133:3124;140.247.60.123:8888;140.247.60.126:8888;160.36.57.173:8888;165.228.129.10:3128;165.228.132.10:3128;169.229.50.3:3128;169.229.50.5:3128;169.229.50.12:3124;169.229.50.12:3128;169.229.50.12:68664;199.89.182.6:80;203.178.133.2:3128;203.178.133.3:3124;203.178.133.3:3128;203.178.133.11:68660;203.198.162.124:8080;206.207.248.34:3124;206.207.248.34:3128;209.197.110.17:80;210.20.67.152:8080;210.125.84.16:3128;216.104.190.179:80;218.5.79.200:80;218.58.136.14:808;221.152.139.220:8080;59.186.67.28:8080;125.142.138.208:2613;210.76.97.79:80;218.152.54.154:8080;12.218.111.15:2356;24.222.80.248:2574;58.71.35.206:8080;60.190.99.218:19759;61.86.48.162:8080;61.252.60.30:3124;61.252.60.30:3128;62.231.243.136:66;62.231.243.137:66;67.164.134.61:2426;67.165.179.84:2495;74.122.236.78:2510;74.129.4.44:2251;76.98.35.94:2303;76.210.118.129:2533;81.211.88.94:3128;82.77.21.83:2263;85.82.145.250:8080;85.214.37.22:3128;122.47.159.72:2400;128.8.126.111:68660;128.10.19.53:8888;128.31.1.11:8888;128.31.1.13:8888;128.31.1.14:3128;128.114.63.14:3124;128.119.247.211:3124;128.238.88.64:3124;128.238.88.65:3128;129.12.3.75:3124;129.82.12.188:8888;129.186.205.77:3124;129.240.67.15:3124;129.240.67.15:3128;129.242.19.197:3124;130.37.198.244:3128;130.37.198.244:68664;132.252.152.193:3124;132.252.152.194:3124;132.252.152.194:3128"
aMachines=split(strMachines,";")
ForEachmachine2inaMachines
machinearr=split(machine2,":")
machine=machinearr(0)
SetobjPing=GetObject("winmgmts:{impersonationLevel=impersonate}")._
ExecQuery("select*fromWin32_PingStatuswhereaddress='"_
&machine&"'")
ForEachobjStatusinobjPing
IfIsNull(objStatus.StatusCode)orobjStatus.StatusCode<>0Then
WScript.Echo(machine2&"isnotreachable")
else
WScript.Echo(machine2&"isOK")
ifconfirm("设置代理为"&machine2&"?")then
msgboxSetIEProxy(1,machine2)
endif
EndIf
Next
Next

functionconfirm(s)
confirm=(msgbox(s,vbYesNo,s)=6)
endfunction

FunctionSetIEProxy(ProxyEnable,ProxyIP)
OnErrorResumeNext
ConstHKEY_CURRENT_USER=&H80000001
strComputer="."
SetobjReg=GetObject("winmgmts:"_
&"{impersonationLevel=impersonate}\"&strComputer&_
"\root\default:StdRegProv")

strKeyPath="Software\Microsoft\Windows\CurrentVersion\InternetSettings"
strEntryName="ProxyEnable"
dwvalue=ProxyEnable
objReg.SetDWORDValueHKEY_CURRENT_USER,strKeyPath,strEntryName,dwValue

strEntryName="ProxyServer"
dwvalue=ProxyIP
objReg.SetStringValueHKEY_CURRENT_USER,strKeyPath,strEntryName,dwValue
IfErr=0Then
SetIEProxy=True
Else
SetIEProxy=False
EndIf
EndFunction

msgbox"ok"
位置

要声明a,b,c三个字串变量,正确的写法如下:

Dimaasstring*4
Dimbasstring*4
Dimcasstring*4

若想写在同一行,也可以,写法如下:

Dimaasstring*4,basstring*4,casstring*4->

如果你肯利用你的所学,那么奇迹就会产生。

更多脚本关注好码网 - www.Haoma5.com好码网 - Net开源网站源码分享。 《www.Haoma5.com》
转载请说明《好码网_Haoma5.com》
好码网 » 奥奇传说刷奥币脚本sh判断字符串相等

一个专注于资源分享的网站

黑帽资源 网站源码