| 网站首页 | 行业资讯 | 操作系统 | 网络技术 | 网页设计 | 平面设计 | 媒体制作 | 编程开发 | 
 | 办公软件 | 网络安全 | 电脑技术 | 数 据 库 | 课程在线 | 成功案例 | 项目合作 | 团队简介 | 
蓝色极速感谢大家的支持!站长:干戈 QQ:495979847     IAS网上答疑系统V1.0发布  [Sunpeople  2007年9月15日]        
  您现在的位置: 蓝色极速 >> 网络技术 >> ASP >> 教程正文
 

首页所应该达到的几个…

          ★★★ 
exe2swf 工具(Adodb.Stream版)
作者:未知    教程来源:蓝派网    点击数:    更新时间:2007-4-20    
Exe2swf ,将exe 格式的 flash文件转为swf 格式。网上有很多这方面的工具,这个是用vbscript写的。

用法:

将下面代码存为 exe2swf.vbs
将exe格式的flash拖放在此文件上,即可生成swf文件,


dim AsoR,FlashFileName
Set ArgObj = WScript.Arguments

dim PositionStart,OKed,Tag,EndSize
PositionStart = 920000'flash 4的播放器的大致字节数
EndSize = 8 'exe文件结尾字节数,其它版本可以设置为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,"文件已经存在 - 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

教程录入:Sunpeople    责任编辑:Sunpeople  
  • 上一个教程:

  • 下一个教程:

  •      
    点击申请点击申请点击申请点击申请点击申请点击申请点击申请
    | 设为首页 | 加入收藏 | 联系站长 | 友情链接 | 版权申明 |

    Copyright(C)2006-2009 Exploit Team All Rights Reserved
    QQ:495979847 网络备案号:陇ICP备07001585号