Notifications
Clear all
[Closed] Modify data after reading file as bytes?
May 23, 2019 6:52 pm
Hello friends,
I am trying to modify binary data after read a file,the code like below:
–File.txt content is “abcd”
NeedFile=(dotnetclass "System.IO.File").ReadAllBytes @"C:\File.txt" asdotnetobject:on
GetData=(dotnetclass "System.Text.Encoding").Default.GetString NeedFile asdotnetobject:on
--
print GetData.Chars[0] --"a"
print GetData.Chars[1] --"b"
print GetData.Chars[2] --"c"
print GetData.Chars[3] --"d"
--How can I modify the total data to "1234" ?
Any help would be appreciate!
2 Replies
May 23, 2019 6:52 pm
i don’t recommend to do anything like a “binary” max file modification. it’s a sure hack and very unsafe.