In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article will explain in detail how vbs invokes external objects and type libraries. The editor finds it very practical, so I share it with you as a reference. I hope you can get something after reading this article.
For example, the most recent flash network horse call:
Var Flashver = (new ActiveXObject ("ShockwaveFlash.ShockwaveFlash.9")) .GetVariable ("$version") .split (",")
Where does this ShockwaveFlash.ShockwaveFlash.9 come from? open flash9f.ocx with exescope and select typelib, and you can see the function of the ShockwaveFlash.ShockwaveFlash.9 object, including GetVariable. This leads to another problem. How do you know if you want to open flash9f.ocx? If it's just for this, you can look it up using IE's component manager.
So can we call other components like mstsc.exe,3389 connectors? The registry looks for mstsc.exe, and the HKEY_CLASSES_ROOT\ CLSID\ {3523c2fb-4031-44e4-9a3b-f1e94986ee7f}\ InprocServer32 found is C:\ WINDOWS\ system32\ mstscax.dll, and then you can see the functions, properties, methods, and so on, of this component by opening it with exescope. Can be a simple example (md, but can change all aspects of the mstsc.exe attribute value, has been unable to open the connection interface, who will change? ):
Sub ExecuteConnection (strServer, strUser, strPW)
'create the client
Dim objMsRdpClient
Set objMsRdpClient = CreateObject ("MsTscAx.MsTscAx.3")
ObjMsRdpClient.Server = strServer
ObjMsRdpClient.UserName = strUser
ObjMsRdpClient.FullScreen = false
ObjMsRdpClient.AdvancedSettings2.RedirectDrives = False
ObjMsRdpClient.AdvancedSettings2.RedirectPrinters = False
ObjMsRdpClient.AdvancedSettings2.RedirectPorts = False
ObjMsRdpClient.AdvancedSettings2.RedirectSmartCards = False
ObjMsRdpClient.AdvancedSettings2.ClearTextPassword = strPW
ObjMsRdpClient.StartConnected = True
WScript.echo "Before connecting"
Wscript.echo objMsRdpClient.version
Dim intResult
IntResult = objMsRdpClient.Connect
WScript.echo "After connecting Result:" & intResult
End Sub
To invoke the component, you can not only use HKEY_CLASSES_ROOT\ CLSID\ {3523c2fb-4031-44e4-9a3b-f1e94986ee7f}\ ProgID found in the registry (the above example is CreateObject ("MsTscAx.MsTscAx.3")
), you can also use HKEY_CLASSES_ROOT\ CLSID, which is why we can also use classid in the asp Trojan horse, such as in the Haiyang top 2006 + source code:
Of course, other network horses, the basic call is CLSID, you can find some network horses to see.
However, it seems that you can't call classid directly in vbs, just put it in the wsf file, and it doesn't matter if it's html or something like that.
This is the end of the article on "how vbs invokes external objects and type libraries". I hope the above content can be helpful to you so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.