|
-
Dec 14th, 2012, 02:08 PM
#1
Thread Starter
Frenzied Member
TextBin - Extract text from binary files
The attached program demonstrates how to extract strings containing only specific characters from a binary file. The project contains a class called TextBinClass and a form TextBinDemoWindow.
The class allows you to specify specific characters and extract these from a binary file. The form contains a demo which shows how to use this class and filter the resulting strings for specific things such as potential .dll references, e-mail addresses, GUIDs and URLs.
The class contains a few speed optimisations such as:
-Using a byte array instead of a string to store the binary data.
-Using the InStrB() function instead of InStr().
-Using the InputB$() function instead of Input$() to read the binary data into a byte array. Using Input$() and StrConv() appears to be slower.
Note:
The term "Unicode" (within the context of this program) simply refers to any string where every other character is a null character.
Last edited by Peter Swinkels; Dec 20th, 2015 at 06:06 AM.
Reason: Bug fixes
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|