aironium
Member
Context is I am modifying some hex in a zip for a particular case for my experiment. I have posted the same case before (and I'd rather be more specific, I suppose), and after some attempts, I have the following snippet:
I am trying to speed up the process of replacing any existence of "@" with slashes, but with their designated binary code. The snippet above somehow swapped more "matches" than anticipated.
(Why am I doing this in the first place? secret)
Snippet:
Dim dat() As Byte = File.ReadBytes(baseDir, specimen & ".zip")
Log("byte size is: " & dat.Length)
ProgressDialogShow("Phase 2: PROTECC Process")
For i = 0 To dat.Length -1
If dat(i) = 64 Then '@
dat(i) = 47 '/
Log("Case " & i & "- byte swapped")
End If
Next
ProgressDialogHide
File.WriteBytes(baseDir, specimen & ".zip", dat)
I am trying to speed up the process of replacing any existence of "@" with slashes, but with their designated binary code. The snippet above somehow swapped more "matches" than anticipated.
(Why am I doing this in the first place? secret)
Last edited: