Extract Flash from the EXE file (SWF format)

xiaoxiao2021-03-06  60

Since I have written a player before, there are many flash files in the hard disk, there are many exe formats.

Also downloaded some small program conversions, now I have n'thing to do, I also wrote a small program ... but

....

'' '' Function function: Enter the flash file in SWF or EXE format

Private Sub OutputFlash (InputFile As String, OutputFile As String)

DIM bittmp () as byte

Dim Filelenth &, I &, J &

DIM Filenum1 as INTEGER

DIM Filenum2 as in

DIM STRFWSFLAG AS STRING

Dim strhexflag as string

DIM STRVAR AS STRING

Dim Bitvar as Byte

DIM SWFSIZE AS Long

DIM SWFSTARTPOSTION AS Long

FILENTH = Filelen (InputFile)

S = "& h"

FILENUM1 = FreeFile: Open InputFile for binary as # filenum1

FILENUM2 = FreeFile: Open OutputFile for Binary AS # filenum2

DIM SSS $: SSS = TIME

For i = filelentsh to filelenth - 3 Step -1

Seek # filenum1, i '' 'file pointer position

T = ASCB (STRCONV ((INPUT (1, # filenum1)), 128)) '' string ASCII code

S = S & HEX (INT (T / 16)) & HEX (INT (T MOD 16)) '' 'double word 16

NEXT

SSS = SSS & "& Time '' 'Record Time

Swfsize = val (s) '' SWF file size

SWFStartPOStion = filelentsh - swFSIze - 7 '' SWF file start address

Seek # filenum1, swfstartpost

Strvar = ASC (INPUT (3, # filenum1))

If strvar = 70 or strvar = 67 Then '' correctly finds the FWS tag

DIM StartByte &: StartByte = SwfStartPost

SSS = SSS & "> & TIME

Redim bittmp (swfsize) AS BYTE

For i = 1 to swFSIZE

Get # filenum1, swfstartpost i - 1, BitTMP (i)

NEXT

FOR i = 1 to swFSize '' 'outputs files in SWF format

Put # filenum2, i, bittmp (i)

NEXT

SSS = SSS & "> & Time '' Record TimeClose # filenum2

SKF.MOVIE = OUTPUTFILE

Else

MnushowText.caption = "Sorry! Can't output swf-flash file"

TMR = TRUE

END IF

Close # filenum1

SSS = SSS & "& TIME 'SHOW TIME

Me.caption = SSS

End Sub

Each time you write a file, read the file is a one byte reading and writing. So speed is very slow!

转载请注明原文地址:https://www.9cbs.com/read-83717.html

New Post(0)