exe2swf 工具(Adodb.Stream版)
Exe2swf ,將exe 格式的 flash文件轉(zhuǎn)為swf 格式。網(wǎng)上有很多這方面的工具,這個是用vbscript寫的。
用法:
將下面代碼存為 exe2swf.vbs
將exe格式的flash拖放在此文件上,即可生成swf文件,
更新日期:2005-01-20 09:30
'exe2swf工具,
'用法:將exe格式的flash拖放在此文件上,即可生成swf文件,
'haiwa@http://www.51windows.Net
'感謝jimbob提供幫助.
dim AsoR,FlashFileName
Set ArgObj = WScript.Arguments
dim PositionStart,OKed,Tag,EndSize
PositionStart = 920000'flash 4的 器的大致字節(jié)數(shù)
EndSize = 8 'exe文件結(jié)尾字節(jié)數(shù),其它版本可以設(shè)置為0
FlashFileName = ArgObj(0)'傳遞路徑
set AsoR=CreateObject("Adodb.Stream")
AsoR.Mode=3
AsoR.Type=1
AsoR.Open
set AsoW=CreateObject("Adodb.Stream")
AsoW.Mode=3
AsoW.Type=1
AsoW.Open
AsoR.LoadFromFile(FlashFileName)
OKed = true
dim filesize
filesize = AsoR.size
if filesize>PositionStart then
while OKed
AsoR.Position = PositionStart
Tag = Bin2Str(AsoR.read(20))
if instr(Tag,"0000000") >0 then
PositionStart = PositionStart + 1
else
PositionStart = PositionStart + 20
end if
if Tag = "00000000000000000708783" or Tag = "00000000000000000678783" then
OKed = false
end if
'if PositionStart > filesize then
' OKed = false
'end if
wend
else
msgbox "文件錯誤"
end if
PositionStart = PositionStart + 16
'msgbox PositionStart
AsoR.Position = PositionStart
AsoW.write AsoR.read(filesize-int(PositionStart)-int(EndSize))
'新文件名
dim newFileName
'newFileName = left(FlashFileName,len(FlashFileName)-4) & ".swf"
newFileName = FlashFileName & ".swf"
Set fso = CreateObject("Scripting.FileSystemObject")
If (fso.FileExists(newFileName)) Then
overwrite = msgbox(newFileName&" 已存在"& vbnewline &"要替換它嗎?",308,"文件已經(jīng)存在 - exe2swf腳本")
if overwrite=6 then
AsoW.SaveToFile newFileName, 2
else
msgbox "操作被取消",0,"exe2swf腳本"
end if
else
AsoW.SaveToFile newFileName, 1
end if
AsoR.close
set AsoR=nothing
AsoW.close
set AsoW=nothing
Function Bin2Str(Bin)
Dim I, Str
For I=1 to LenB(Bin)
clow=MidB(Bin,I,1)
if ASCB(clow)<128 then
Str = Str & (ASCB(clow))
else
I=I+1
if I <= LenB(Bin) then Str = Str & (ASCW(MidB(Bin,I,1)&clow))
end if
Next
Bin2Str = Str
End Function
您可能感興趣的文章
- 01-10妙用VBScript自制IE工具欄按鈕的代碼
- 01-10在vbs運行命令行工具后讓命令窗口保持打開狀態(tài)的腳本
- 01-10發(fā)老兵及海洋VBS解包工具代碼
- 01-10tel.xls.vbs xls專殺工具
- 01-10用vbs實現(xiàn)的exe2swf工具腳本代碼
- 01-10adodb.stream讀文件到數(shù)組的代碼
- 01-10discuz 任意管理員密碼漏洞利用工具 vbs代碼
- 01-10URL 篩選小工具 提取網(wǎng)頁中的鏈接地址
- 01-10字符ANSI代碼查詢工具vbs版
- 01-10VBS實現(xiàn)GB2312,UTF-8,Unicode,BIG5編碼轉(zhuǎn)換工具


閱讀排行
本欄相關(guān)
- 01-10下載文件到本地運行的vbs
- 01-10飄葉千夫指源代碼,又稱qq刷屏器
- 01-10SendKeys參考文檔
- 01-10什么是一個高效的軟件
- 01-10VBS中的正則表達式的用法大全 &l
- 01-10exe2swf 工具(Adodb.Stream版)
- 01-10VBS中SendKeys的基本應(yīng)用
- 01-10用VBSCRIPT控制ONSUBMIT事件
- 01-10VBScript教程 第十一課深入VBScript
- 01-10VBScript語法速查及實例說明
隨機閱讀
- 01-10delphi制作wav文件的方法
- 01-10使用C語言求解撲克牌的順子及n個骰子
- 08-05織夢dedecms什么時候用欄目交叉功能?
- 04-02jquery與jsp,用jquery
- 01-10C#中split用法實例總結(jié)
- 01-10SublimeText編譯C開發(fā)環(huán)境設(shè)置
- 01-11ajax實現(xiàn)頁面的局部加載
- 08-05dedecms(織夢)副欄目數(shù)量限制代碼修改
- 08-05DEDE織夢data目錄下的sessions文件夾有什
- 01-11Mac OSX 打開原生自帶讀寫NTFS功能(圖文