Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to change decode function

Status
Not open for further replies.

misi444

Technical User
Aug 21, 2009
14
0
0
LV
here is part of code which recovers encrypted audio file (67593 bytes size).
Code:
Dim b
Function c(d)
c=chr(d)
End Function
b=Array(c(204),c(224),c(128),c(056),c(093),c(131),c(232),c(098),c(033),..... long string omitted.......c(000),c(000 ),"")
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile("audio.wav", 2, True)
For i = 0 To 67593
f.write(b(i))
Next
f.close()
..... 
.....
I want modify encryption method used for wav file to other method, for example HEX, so encoded file will be like this (%71%77%65%72%74%79%20%63%76%62%6E% ... ... 6D%6D)
How to modify code for use with Hex encoded strings?
 
What kind of logic is that: 204 is mapped to %71, 00 mapped to %6D? encryption method? that sounds grand with chr().
 
Dont know what kind of logic was used, I put just arbitrary data in brackets() for this example, this should be any binary file. This is binary data represented by decimal coded ASCII strings. Then then this binary need be recovered, i.e. written to a binary file.
Original code had very long sequence:
b=Array(c(077),c(090),c(144),c(000),c(003),c(000),c(000),c(000),c(004),c(000),c(000),c(000),c(255),c(255),c(000),........c(000),c(000),c(000 ),"")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top