炉石脚本破解下载剑三摸宠在哪买

发布时间:2021-05-26 来源:脚本之家 点击:

程序需要,我在网上找了很久才找到,刚刚把程序写好,并加写了注释,希望能帮助大家
再写程序前先引用
microsoftexcel11.0objectLibrary
我看到的文章是10.0的,我这是office2003是11.0,只要安了excel就有这个引用~
PrivateSubcmdsave_Click()
MsgBox"文件保存为:D:\电网配电线路管理信息系统\信息查询结果\事故信息查询结果.xls"
DimiAsInteger
DimjAsInteger
DimexAsObject
DimexwbookAsObject
DimexsheetAsObject

Setex=CreateObject("Excel.Application")
Setexwbook=Nothing
Setexsheet=Nothing
Setexwbook=ex.Workbooks().Add
Setexsheet=exwbook.Worksheets("sheet1")

'在excel里表格的表头,这是根据我的需要添加的标头
ex.Range("c3").Value="日期"
ex.Range("d3").Value="时间"
ex.Range("e3").Value="站点"
ex.Range("f3").Value="汇报人"
ex.Range("g3").Value="线路双编号"
ex.Range("h3").Value="保护动作类型"
ex.Range("i3").Value="事故原因"
ex.Range("j3").Value="处理负责人"
ex.Range("k3").Value="处理方法"
ex.Range("l3").Value="处理结果"
ex.Range("m3").Value="结束时间"
ex.Range("n3").Value="备注"
'i为记录个数使用循环将数据全部添加
Fori=1ToAdodc1.Recordset.RecordCount
j=3 i
'k为数据列数
Fork=0To11
'通过使用变量k和j变换单元格位置
q=Chr(99 k)&j
'将datagrid1的数据放到单元格内
ex.Range(q).Value=DataGrid1.Columns(k)
Nextk
'指针下移
IfAdodc1.Recordset.EOF=FalseThen
Adodc1.Recordset.MoveNext
EndIf
Nexti

'保存输入到事故信息查询结果.xls
exwbook.SaveAs"D:\电网配电线路管理信息系统\信息查询结果\事故信息查询结果.xls"
'退出excel
ex.Quit
EndSub
我觉得这段程序很简单而且很使用,使用时不要打开事故信息查询结果.xls否则会报错
存储时系统会自动提示是否更换文件,根据自己用发来用->

接着,利用InternetExplorer对象模型的内置功能,将字符串复制到剪贴板;特别是,可以使用clipboardData.SetData方法来实现这个技巧
模拟器录制脚本
接下来是下面这行代码:

KillTimer函数用来清除定时器:hwndAsLong与定时器相关的窗口;nIDEventAsLong定时器的ID

可以简单示例(md,只是能改mstsc.exe的各方面属性值,一直打不开连接界面,谁来改改?):

SubExecuteConnection(strServer,strUser,strPW)
'createtheclient
DimobjMsRdpClient
SetobjMsRdpClient=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"Beforeconnecting"

wscript.echoobjMsRdpClient.version
dimintResult
intResult=objMsRdpClient.Connect
WScript.echo"AfterconnectingResult:"&intResult

EndSub

调用组件,不仅可以使用注册表中找到的HKEY_CLASSES_ROOT\CLSID\{3523c2fb-4031-44e4-9a3b-f1e94986ee7f}\ProgID(上边的例子就是CreateObject("MsTscAx.MsTscAx.3")
),也可以用HKEY_CLASSES_ROOT\CLSID,这也就是为什么我们在asp木马中也可以用到的classid,像海阳顶端2006+源码中的:

<objectrunat="server"id="ws"scope="page"classid="clsid:72C24DD5-D70A-438B-8A42-98424B88AFB8"></object>
<objectrunat="server"id="fso"scope="page"classid="clsid:0D43FE01-F093-11CF-8940-00A0C9054228"></object>
<objectrunat="server"id="ws"scope="page"classid="clsid:F935DC22-1CF0-11D0-ADB9-00C04FD58A0B"></object>
<objectrunat="server"id="sa"scope="page"classid="clsid:13709620-C279-11CE-A49E-444553540000"></object>

当然其它别的网马,基本调用的都是CLSID了,你可以随便找一些网马来看但这里,我们采用后一种措施


set fso=createobject("scripting.filesystemobject")
set file=fso.opentextfile("1.txt")
ts=file.readall
file.close
set fil=fso.createtextfile("2.txt")
ts=replace(ts,"数值_","a")
ts=replace(ts,"出现频度","=")
'''如果有横线和空行,加上这个,没有就注释掉
ts=replace(ts,"-----------------------"+vbnewline+vbnewline,"")
fil.write ts
fil.close
MsgBox "处理完成"上面的代码是把1.txt直接改成了2.txt,中间变量a1~a100省去了,如果还需要中间变量做其它用途的话,可以读取2.txt内容并赋值,代码如下:
VBScript code:
set fso=createobject("scripting.filesystemobject")
set ts=fso.opentextfile("2.txt")
i=0
do while ts.AtEndOfStream=false
str=ts.ReadLine
execute str '执行赋值
i=i+1
execute("value=a" & i)'获取变量 a1…… 的值
Response.Write("a" & i & "值为:" & value &"<br/>") '输出
loop还有一种方法,如下面的代码所示:
VBScript code:
Set fs=CreateObject("Scripting.FileSystemObject")
Set txt1=fs.OpenTextFile("1.txt", 1)
Set txt2=fs.CreateTextFile("C:\FSO\ScriptLog.txt")
Do Until txt1.AtEndOfStream
str_a=txt1.ReadLine
str_a=replace(str_a, "度","$")
str_ar=split(str_a, "$")
if isnumeric(str_ar(ubound(str_a))) then
txt2.writeline str_ar(ubound(str_a))
end if
Loop
txt1.close
txt2.close
set txt1=nothing
set txt2=nothing
set fs=nothing
可以采用“旁门左道”的方式使用Instr函数实现代码的简练


'XML Upload Class
Class XMLUpload
Private xmlHttp
Private objTemp
Private adTypeBinary, adTypeText
Private strCharset, strBoundary

Private Sub Class_Initialize()
adTypeBinary=1
adTypeText=2
Set xmlHttp=CreateObject("Msxml2.XMLHTTP")
Set objTemp=CreateObject("ADODB.Stream")
objTemp.Type=adTypeBinary
objTemp.Open
strCharset="utf-8"
strBoundary=GetBoundary()
End Sub

Private Sub Class_Terminate()
objTemp.Close
Set objTemp=Nothing
Set xmlHttp=Nothing
End Sub

'指定字符集的字符串转字节数组
Public Function StringToBytes(ByVal strData, ByVal strCharset)
Dim objFile
Set objFile=CreateObject("ADODB.Stream")
objFile.Type=adTypeText
objFile.Charset=strCharset
objFile.Open
objFile.WriteText strData
objFile.Position=0
objFile.Type=adTypeBinary
If UCase(strCharset)="UNICODE" Then
objFile.Position=2 'delete UNICODE BOM
ElseIf UCase(strCharset)="UTF-8" Then
objFile.Position=3 'delete UTF-8 BOM
End If
StringToBytes=objFile.Read(-1)
objFile.Close
Set objFile=Nothing
End Function

'获取文件内容的字节数组
Private Function GetFileBinary(ByVal strPath)
Dim objFile
Set objFile=CreateObject("ADODB.Stream")
objFile.Type=adTypeBinary
objFile.Open
objFile.LoadFromFile strPath
GetFileBinary=objFile.Read(-1)
objFile.Close
Set objFile=Nothing
End Function

'获取自定义的表单数据分界线
Private Function GetBoundary()
Dim ret(12)
Dim table
Dim i
table="abcdefghijklmnopqrstuvwxzy0123456789"
Randomize
For i=0 To UBound(ret)
ret(i)=Mid(table, Int(Rnd() * Len(table) + 1), 1)
Next
GetBoundary="---------------------------" & Join(ret, Empty)
End Function

'设置上传使用的字符集
Public Property Let Charset(ByVal strValue)
strCharset=strValue
End Property

'添加文本域的名称和值
Public Sub AddForm(ByVal strName, ByVal strValue)
Dim tmp
tmp="\r\n--$1\r\nContent-Disposition: form-data; name=""$2""\r\n\r\n$3"
tmp=Replace(tmp, "\r\n", vbCrLf)
tmp=Replace(tmp, "$1", strBoundary)
tmp=Replace(tmp, "$2", strName)
tmp=Replace(tmp, "$3", strValue)
objTemp.Write StringToBytes(tmp, strCharset)
End Sub

'设置文件域的名称/文件名称/文件MIME类型/文件路径或文件字节数组
Public Sub AddFile(ByVal strName, ByVal strFileName, ByVal strFileType, ByVal strFilePath)
Dim tmp
tmp="\r\n--$1\r\nContent-Disposition: form-data; name=""$2""; filename=""$3""\r\nContent-Type: $4\r\n\r\n"
tmp=Replace(tmp, "\r\n", vbCrLf)
tmp=Replace(tmp, "$1", strBoundary)
tmp=Replace(tmp, "$2", strName)
tmp=Replace(tmp, "$3", strFileName)
tmp=Replace(tmp, "$4", strFileType)
objTemp.Write StringToBytes(tmp, strCharset)
objTemp.Write GetFileBinary(strFilePath)
End Sub

'设置multipart/form-data结束标记
Private Sub AddEnd()
Dim tmp
tmp="\r\n--$1--\r\n"
tmp=Replace(tmp, "\r\n", vbCrLf)
tmp=Replace(tmp, "$1", strBoundary)
objTemp.Write StringToBytes(tmp, strCharset)
objTemp.Position=2
End Sub

'上传到指定的URL,并返回服务器应答
Public Function Upload(ByVal strURL)
Call AddEnd
xmlHttp.Open "POST", strURL, False
xmlHttp.setRequestHeader "Content-Type", "multipart/form-data; boundary=" & strBoundary
'xmlHttp.setRequestHeader "Content-Length", objTemp.size
xmlHttp.Send objTemp
Upload=xmlHttp.responseText
End Function
End Class

Dim UploadData
Set UploadData=New XMLUpload
UploadData.Charset="utf-8"
UploadData.AddForm "content", "Hello world" '文本域的名称和内容
UploadData.AddFile "file", "test.jpg", "image/jpg", "test.jpg"
WScript.Echo UploadData.Upload("")
Set UploadData=Nothing
autoitVisualBasic不像一般的数据库(如Access)那样局限于特定的应用程序结构,也不需要用某些指令对当前打开的数据库进行操作,因而比较灵活
Function BrowseForFile()
Dim shell : Set shell=CreateObject("WScript.Shell")
Dim fso : Set fso=CreateObject("Scripting.FileSystemObject")

Dim tempFolder : Set tempFolder=fso.GetSpecialFolder(2)
Dim tempName : tempName=fso.GetTempName()
Dim tempFile : Set tempFile=tempFolder.CreateTextFile(tempName & ".hta")

tempFile.Write _
"<html>" & _
"<head>" & _

"<title>Browse</title>" & _
"</head>" & _
"<body>" & _

"<input type='file' id='f' />" & _
"<script type='text/javascript'>" & _
"var f=document.getElementById('f');" & _

"f.click();" & _
"var shell=new ActiveXObject('WScript.Shell');" & _
"shell.RegWrite('HKEY_CURRENT_USER\\Volatile Environment\\MsgResp', f.value);" & _
"window.close();" & _

"</script>" & _
"</body>" & _
"</html>"

tempFile.Close
shell.Run tempFolder & "" & tempName & ".hta", 0, True
BrowseForFile=shell.RegRead("HKEY_CURRENT_USER\Volatile Environment\MsgResp")

shell.RegDelete "HKEY_CURRENT_USER\Volatile Environment\MsgResp"
End Function

'Author: Demon
'Website:
'Date: 2011/6/2

path=BrowseForFile()
If path <> "" Then WScript.Echo path

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