0
I’m developing an application where you have to find a definite value and literally walk 19 houses.
130000007363645C7363645F
6178747265653030311300000073
6363645F6178747265653030315F
- Search for value from: 13000000
- Floor of: 13000000 until: 7363645C736363645F6178746565303031 (Or until you find another value 13)
Thus remaining:
130000007363645C7363645F
61787472653030311300000073
6363645F6178747265653030315F
- Look for another value: 13000000
Thus remaining:
13000000736363645C736363645F
61787472653030311300000073
6363645F6178747265653030315F
- Walk of new value : 13000000 up to the other value: 736363645F6178747265653030315F
Thus remaining:
13000000736363645C736363645F
6178747265653030311300000073
6363645F6178747265653030315F
Then exchange one value for another: 7363645C7363645F
617874726530303 for 736363645F6178747265653030315F
Making a loop repeating the same function throughout the file.
=======================@Edit
Thus:
13-00-00-00-73-63-63-64-5C-73-63-63-64-5F-61-78-74-72-65-65-30-30-31-13-00-00-00-73-63-63-64-5F-61-78-74-72-65-65-30-30-31-5F
Thus remaining:
13-00-00-00-73-63-63-64-5F-61-78-74-72-65-65-30-30-31-5F -13-00-00-00-73-63-63-64-5C-73-63-63-64-5F-61-78-74-72-65-65-30-30-31
NOTE: I changed the top value after the "13-00-00-00" down
============================@ I tried something similar to that:
byte[] file = File.ReadAllBytes(file);
string hexStrings = BitConverter.ToString(file);
hexStrings = hexStrings.Replace("-", "");
foreach (byte hexString in hexStrings)
{
}
Quite confused your question friend, I didn’t really understand what you need... you need to search a string in another?
– Willian Tamagi
I have to "walk 19 houses" from a string that is the "13-00-00-00" thus "73-63-63-64-5C-73-63-64-5F- 61-78-74-72-65-65-30-30-31"
– Emanuel Lucas
@Emanuellucas no use repeating what he has already written, need to explain better, in other words, providing more details.
– Maniero
This value among the "13000000", what you want to do with it?
– Leonel Sanches da Silva
Do you have a line or not? You need to know what the pattern is. You have to find 13 or 13000000?
– Maniero
@Ciganomorrisonmendez, the values "13000000" I only want to use as a search base
– Emanuel Lucas
@bigown have found the "13000000" as a search basis and so jump "19 houses"
– Emanuel Lucas
Yes, but do you want to count how many "13000000" did you think? Or do you want to pick up the values between one "13000000" and another? What is the purpose of the exercise?
– Leonel Sanches da Silva
@Ciganomorrisonmendez I want to take the values between a "13000000" and another
– Emanuel Lucas
This question is completely meaningless. The conversion to HEX is totally unnecessary. to extract the
sccd\sccd_axtree001
etc the operation should be done directly in the original bytes. When so, explain the real problem, and not the way you are trying to do it, because you run the risk of getting answers that already start from wrong reasoning. Suggested reading for better use of the site: What is the XY Problem.– Bacco