I have 100 files of different length and similar structure.
I want to extract 2 strings and send to text editor making list. The valid data inside string has different length. I use needed + some, 20 or more.
Address from
Hex _____1____ Length 20. This contains a file path\name.*** of different length. I don't care about surplus length.
Hex _____2____ Length 20. This contains a file path\name.*** of different length. I don't care about surplus length.
If the list could include the file name it would be great. I can manage without because I can see the order form the source file.
However there must be some sort of verification of output versus source file. Win10 orders files sometime a little odd.
HexAddresses: 00000640 and 00000700
I was trying to add a sample file. Your system seems to block correct extension *.sng. Zipped !
I am new to this program, used Hex Editor Nero free. HxD is better. Thanks for help, English or German.
Extract String from known address in many files
Extract String from known address in many files
- Attachments
-
- 00HinterHuhnstallL.zip
- (493 Bytes) Downloaded 684 times
Re: Extract String from known address in many files
If you are asking if there is a way to automate this, unfortunately there isn't, since there is no scripting support yet.
But it should be relatively easy to write a small program for this, using filestreams.
You could also try something similar to what was suggested here:
viewtopic.php?f=4&t=1092#p3370
But it should be relatively easy to write a small program for this, using filestreams.
You could also try something similar to what was suggested here:
viewtopic.php?f=4&t=1092#p3370
Re: Extract String from known address in many files
Thanks, learning to do this will certainly take much more time then manual operation: Open file, GoTo1, Copy+paste (LibreOffice), GoTo2 etc.
Alternative: Seek more free Hexies.
Digital is supposed to make repeated processes easier -
Alternative: Seek more free Hexies.
Digital is supposed to make repeated processes easier -
Re: Extract String from known address in many files
Sure, but all that functionality takes time to implement
Re: Extract String from known address in many files
I used NEO, recently HxD.
Now installed HexEdit, WinHex, xvi32
None of these offers any way to automate range extraction, even for 1 file. Extracting in folder - no way.
You can input a string and search for it and find location.
You can not input location and extract string.
I am not sure if a hex editor of Win3.1 was able to do it.
Now installed HexEdit, WinHex, xvi32
None of these offers any way to automate range extraction, even for 1 file. Extracting in folder - no way.
You can input a string and search for it and find location.
You can not input location and extract string.
I am not sure if a hex editor of Win3.1 was able to do it.
Re: Extract String from known address in many files
How about a Strings type program?
(I'm arbitrarily setting a minimum string length of 9, but there are other ways to filter.)
strings.exe -n 9 00* > yyy
And with multiple input files, 00*, the file name would be shown in the redirected output (yyy).
(I renamed to your file name to "xxx", then copied to xxy & xxz.)
With doing nothing further with that, you could parse it further with a grep-like command, say foreinstance that all the wanted data started with "00".
C:\out\222>grep.exe 00 yyy
And of course, you could just pipe things.
C:\out\222>stringsnt.exe -n 9 x* | grep.exe 00
(I'm arbitrarily setting a minimum string length of 9, but there are other ways to filter.)
strings.exe -n 9 00* > yyy
And with multiple input files, 00*, the file name would be shown in the redirected output (yyy).
(I renamed to your file name to "xxx", then copied to xxy & xxz.)
Code: Select all
C:\out\222\xxx: FFWZZZ\s<AFPd2
C:\out\222\xxx: @@@@@--#%%%(0
C:\out\222\xxx: @@@>@B@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ABB@@@@@@@@@@
C:\out\222\xxx: FFPcccU]PPPciZZP@@@@@@@@@@@@@@@@
C:\out\222\xxx: FF2222PZ<F<FF222nnddddnxZZZdddZZ
C:\out\222\xxx: P3P6Pa<$U*P,
C:\out\222\xxx: 00HinterHuhnstal
C:\out\222\xxx: 00Oberkrainer\00Hintermhuehner
C:\out\222\xxy: FFWZZZ\s<AFPd2
C:\out\222\xxy: @@@@@--#%%%(0
C:\out\222\xxy: @@@>@B@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ABB@@@@@@@@@@
C:\out\222\xxy: FFPcccU]PPPciZZP@@@@@@@@@@@@@@@@
C:\out\222\xxy: FF2222PZ<F<FF222nnddddnxZZZdddZZ
C:\out\222\xxy: P3P6Pa<$U*P,
C:\out\222\xxy: 00HinterHuhnstal
C:\out\222\xxy: 00Oberkrainer\00Hintermhuehner
C:\out\222\xxz: FFWZZZ\s<AFPd2
C:\out\222\xxz: @@@@@--#%%%(0
C:\out\222\xxz: @@@>@B@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ABB@@@@@@@@@@
C:\out\222\xxz: FFPcccU]PPPciZZP@@@@@@@@@@@@@@@@
C:\out\222\xxz: FF2222PZ<F<FF222nnddddnxZZZdddZZ
C:\out\222\xxz: P3P6Pa<$U*P,
C:\out\222\xxz: 00HinterHuhnstal
C:\out\222\xxz: 00Oberkrainer\00Hintermhuehner
C:\out\222>grep.exe 00 yyy
Code: Select all
C:\out\222\xxx: 00HinterHuhnstal
C:\out\222\xxx: 00Oberkrainer\00Hintermhuehner
C:\out\222\xxy: 00HinterHuhnstal
C:\out\222\xxy: 00Oberkrainer\00Hintermhuehner
C:\out\222\xxz: 00HinterHuhnstal
C:\out\222\xxz: 00Oberkrainer\00Hintermhuehner
C:\out\222>stringsnt.exe -n 9 x* | grep.exe 00
Code: Select all
C:\out\222\xxx: 00HinterHuhnstal
C:\out\222\xxx: 00Oberkrainer\00Hintermhuehner
C:\out\222\xxy: 00HinterHuhnstal
C:\out\222\xxy: 00Oberkrainer\00Hintermhuehner
C:\out\222\xxz: 00HinterHuhnstal
C:\out\222\xxz: 00Oberkrainer\00Hintermhuehner