Jan 202018
 
Scans EXE files for ASCII characters.
File SCANF13.ZIP from The Programmer’s Corner in
Category System Diagnostics
Scans EXE files for ASCII characters.
File Name File Size Zip Size Zip Type
SCANF.DOC 27478 9588 deflated
SCANF.EXE 29279 16066 deflated

Download File SCANF13.ZIP Here

Contents of the SCANF.DOC file




SCANF



File Scanning Utility



Version 1.3
Released 04-08-91




Herron Software
P.O. Box 1288
Battle Ground, Washington 98604




COPYRIGHT 1988-1991 Phil Herron. ALL RIGHTS RESERVED.



_________________________________________________________________

Table of Contents Section
_________________________________________________________________

Preface.................................................. 0
New in this version...................................... 1
Introduction............................................. 1.1
Explanation.............................................. 1.2
System Requirements...................................... 1.3
Installing............................................. 1.3.1
Help..................................................... 1.4
Syntax................................................... 1.5
Examples................................................. 1.6
Application Notes........................................ 1.7
DOS ErrorLevel........................................... 1.8
Version History.......................................... 2

Support.................................................... 9
Problem Resolution....................................... 9.1
Reporting the problem.................................... 9.1.1
Custom Modifications..................................... 9.2
Correspondence........................................... 9.3

Shareware Product Catalog................................. 10



__________________________________________

DISCLAIMER OF WARRANTY
__________________________________________



THIS PRODUCT IS PROVIDED FOR EVALUATION, AS IS
AND WITHOUT WARRANTY OF ANY KIND. THE AUTHOR
MAKES NO EXPRESS OR IMPLIED WARRANTIES,
INCLUDING BUT NOT LIMITED TO MERCHANTABILITY
OR FITNESS FOR ANY PURPOSE. IN NO EVENT SHALL
THE AUTHOR BE LIABLE FOR LOSS OF PROFIT OR ANY
OTHER COMMERCIAL DAMAGE ARISING FROM EITHER
THE USE OF OR THE INABILITY TO USE THIS PRODUCT.





________________________________________________________________

0 EVALUATION PREFACE
________________________________________________________________

Section:
0.1 Shareware
0.1.1 License Terms
0.1.2 Registration
Benefits, Forms, Fees, Quantity discounts
0.2 Evaluation Version
0.2.1 Evaluation Menu
0.2.2 Virus Prevention


0.1 SHAREWARE
_______________

"Shareware" is a software distribution method which enables the
potential user to obtain software at very low initial cost, for
evaluation on a trial basis.

You can evaluate the software in your own environment, on your own
machine, with the programs and data that you normally use. You're
not required to become a registered user unless the software meets
your needs.

Another benefit of Shareware is lower pricing. By minimizing the
marketing and advertising expenses associated with more traditional
software distribution methods, Shareware products can be priced
lower. You don't pay for what you don't need or use.

You are encouraged to share the evaluation version of this software
with others, so long as you follow the limitations set forth in the
LICENSE TERMS section below.


0.1.1 LICENSE TERMS
_____________________

This product and its documentation are copyrighted and owned
solely by the author, who reserves all rights to any benefits
derived from it. It is distinctly separate from, and should
not be confused with, those categories of software known as
"public domain" or "freeware."

You are granted the right to use the evaluation version of
this software on a trial basis for a limited amount of time,
to decide whether to continue using (and therefore whether
to register) the product.

You can transmit this evaluation version to associates by
copying on diskette or uploading to electronic bulletin
board or other online services, so long as the program,
documentation and any associated files are distributed
together, and not altered in any way.


0.1.2 REGISTRATION
____________________

When you send in the registration form and fee, you'll receive
by return mail a diskette containing the latest REGISTERED
version of the program and documentation.


BENEFITS OF REGISTRATION

The registered version DOES NOT include the Evaluation Menu
front end of this version. Thus it will be more convenient
to use, from either the DOS prompt or from batch files. It
will also be 12K-15K bytes smaller, for more efficient disk
storage and faster loading.

The registered version WILL include any new functions
or enhancements made to date.

You will receive notification of future updates and new
products, and will be able to upgrade to newer versions
at a reduced cost.


REGISTRATION FORM

The registration form and a pre-addressed mailing cover
can be printed from the "Forms Printing" selection of
the Evaluation menu, discussed below.


FEES

The single-quantity registration fee is displayed on the
initial Evaluation Menu screen. Higher quantities are
discussed below.


QUANTITY DISCOUNTS

Each registered copy of this software will be licensed for
operation at a single location (on a single terminal or
computer) at any one time. If you need to run the software
on more than one terminal or computer at the same time, the
appropriate number of registrations must be made.

Multiple-quantity registration fees are displayed in the
"QUANTITY DISCOUNT" section of the Evaluation menu.

You can take advantage of quantity discounts by ordering
multiple registrations of one program or single
registrations of several different programs at the same
time. You also save on shipping and handling charges
by registering several products together.


0.2 EVALUATION VERSION
________________________

This software contains the complete and fully functional version
of the program, the latest available at the time of this release.

The program itself is identical to the REGISTERED version.
For evaluation, a front end menu containing a documentation
file viewer and forms printer have been added to ensure that:

(a) Registration information and forms will not
become separated from the program file.

(b) Users who might be unfamiliar with the process
of displaying a file's contents on the screen or
printer will have no difficulty learning about,
evaluating or registering this product.


0.2.1 EVALUATION MENU
_______________________

The program is invoked from the DOS prompt by typing its name and
pressing the RETURN or ENTER key. The initial screen displays
warranty and program information, then the Shareware Product
EVALUATION MENU, containing the following functions:

ESC - EXIT to DOS without evaluating this program
R - READ the documentation (THIS file)
x - EVALUATE this program
Q - QUANTITY Discount information
F - FORMS printing menu - registration & mailer

When you press "R" to READ the documentation, this file will be
displayed one screen at a time. The display pauses whenever the
screen becomes full, and prompts...

or Esc

"" indicates that more is available, like the "MORE" prompt in
other DOS utilities. Press the ESCape key to return to the
Evaluation Menu, or any normal typing key such as the spacebar
to continue.


0.2.2 VIRUS PREVENTION
________________________

If you'd like to evaluate this software but you're not sure
where it's been, you can order a copy directly from the source.
See the SHAREWARE PRODUCT CATALOG at the end of this file.
________________________________________________________________





1 NEW IN THIS VERSION
_________________________

Support of Output Redirection, with activity indicator for every
1024 characters read. Redirection allows using SCANF to strip
blank lines from pure ASCII text files (see Application Notes).





1.1 INTRODUCTION
__________________

You'd like to quickly scan your executable files for copyrights and
other readable text, but the normal file reading utilities are
designed for text files; they show you EVERYTHING, which seems to
include a high percentage of unintelligible gibberish. With a large
file, you'll have to strain your eyes over many screens to find any
human-readable text strings.

The DOS DEBUG utility brings different problems. It lowers the
noise level by changing the "special" characters into dots, but
crams the ASCII text into a 16-character column on the right side
of the screen. You still have to manually scan over many screens
of data to find all the text.




1.2 EXPLANATION
_________________

ScanF is designed for easy viewing of the printable ASCII text
characters within executable files, while filtering out control
(ASCII values below 32 decimal) and extended characters (ASCII
values above 127 decimal).

Although meant for checking the printable contents of .EXE or .COM
files, ScanF will read any file type.

Strings found are displayed down the left side of the screen, one
string per line. Spreading out the strings in this manner eases the
task of picking the real information out of the nonsense text.

ScanF pauses at the bottom of each screen, to allow you to continue
scanning or to escape back to DOS. The down-arrow prompt indicates
that more follows; press ESCAPE to terminate, or any OTHER key to
continue.




1.3 SYSTEM REQUIREMENTS
___________________________

PC, XT, AT or compatible.
DOS version 2.1 or later.
64K free memory.




1.3.1 INSTALLING
__________________

The program can be run from diskette or from hard disk.
No installation is necessary, other than copying the
files to a drive and directory of your choosing.




1.4 HELP
__________

Can't remember the command line syntax?
Issue the program's name without any parameters; it
will display a help screen, then return to the DOS prompt.




1.5 SYNTAX
____________


Minimum string length for display
/
ScanF [filespec] [-n]
\
Switch delimiter either "/" or "-"

Where...

[-n] is an optional minimum string length. Allowable values are 1
through 20. Default is 3.

All strings found with this length or longer will be
displayed. All shorter strings will be ignored.

[filespec] is the string needed to reference a file; can also be
shown as [d:][path][filename.ext].

The minimum filespec needed is filename.ext. If the file is
in another directory and/or on another drive, the drive name
and/or path name must also be given.

The complete filespec for a file named ThisFile.Doc residing
in drive A: in a subdirectory named ThisSub is

A:\ThisSub\ThisFile.Doc

For further information on filespecs, see your DOS manual.




1.6 EXAMPLES
______________

ScanF C:\Command.Com (displays all text strings
3 characters or longer)


ScanF C:\Ut\ScanF.Exe /6 (displays all text strings
6 characters or longer)

ScanF C:\Ut\ScanF.Exe /6 >Scanf.Txt (same as above, with
output redirected to
file ScanF.Txt in
current directory)




1.6.1 OPERATING SCREEN
________________________

The operating screen appears whenever "ScanF" is issued from the DOS
prompt with a file specification.

If the specified file is found, and if it contains any text strings
that meet the minimum size requirement, they will be displayed on
the screen (or redirected to a disk file). If the specified file is
not found, an error message will be displayed before returning to
the DOS prompt.

Scanning can be terminated at any point with the ESCape key.

If the output is not redirected to a disk file, ScanF pauses at the
bottom of each screen. The down-arrow prompt indicates that more
follows; press ESCape to terminate, or any OTHER key to continue.




1.7 APPLICATION NOTES
_______________________

VIEWING TEXT

If you're scanning a large file using SCANF's default mode of
three characters minimum string length, you may have to page
through many screens of 3-character gibberish. You can avoid this
by rerunning SCANF with a higher /n number on the command line,
unless you need to check for the shorter strings.



STRIPPING BLANK LINES

The command line

SCANF infile.ext /1 >outfile.ext

can be used to strip blank lines from pure ASCII text files,
such as this one.

The above command works well on text files containing no tab
(ASCII code 9) characters. If the text does contain tabs, SCANF
initiates a new line at each one, thus breaking up lines of text.
For best results, such files should first be "de-tabbed" (tabs
expanded to the proper number of spaces) in order to maintain the
same tabular layout as the original text.

The CLEANTXT utility will de-tab pure ASCII text files:

CLEANTXT infile.ext /T

Since both SCANF and CLEANTXT strip out extended characters (ASCII
values above 127 decimal), they should not be used on text files
containing deliberate text-graphic or word processor formatting
characters if those characters will be needed later.

The following batch file combines the above commands with some
error checking to expand any tab characters found, then strip out
all blank lines (except those lines in the input file that
contained ONLY tab characters).

NOTE -- The original input file is kept, with a .BAK extension,
but you may want to have a backup and/or run this batch file only
on a working copy of the original text file.

::::---BlankLine Stripper - uses CleanTxt, ScanF
echo off
If "%2"=="" goto NoSpec
If "%1"=="" goto NoSpec
:: Remove most control, all extended chars.
CLEANTXT %1 /T
:: Remove blank lines.
SCANF %1 /1 >%2
goto END
:NoSpec
echo Syntax: %0 [inFileSpec outFileSpec]
echo Use on pure ASCII files (removes extended chars).
echo Expands tabs, strips out blank lines.
:END




1.8 DOS ERRORLEVEL
____________________

Upon termination, the program returns a DOS ErrorLevel value
which indicates how the program ended, and which can be used for
subsequent operations in a batch file. For further information,
see the "IF ERRORLEVEL" batch command in your DOS manual.

ErrorLevel List:

0 - Successful completion.
1 - No parameters specified on command line.
2 - not found.
4 - Switch option not recognized.
27 - Early termination; ESCape key pressed.




2 VERSION HISTORY
___________________

1.00 Initial release.
1.1 Updated to use the default colors in effect when the program
is started.
1.2 Provision added to ensure proper handling of ReadOnly files.
Command line switch option error checking improved.
1.3 Added support of Output Redirection, with activity indicator
for every 1024 characters. Strings longer than 80 characters
are now prevented from scrolling a full screen.




________________________________________________________________

9 SUPPORT
________________________________________________________________

The first user to document and report a problem that we agree
needs attention, will receive a free upgrade with the correction
when it's been made. Registered users get the upgraded
registered version; unregistered evaluators get the upgraded
evaluation version.



9.1 PROBLEM RESOLUTION
________________________

Things to try prior to reporting a problem:

1 - Reread the documentation to make sure you understand
what we thought we understood when we wrote it.

2 - If the system reports "Bad command or file name" when
you attempt to run the program, its executable file
(or at least the file name you specified) was not found.

First, make sure no typos or misspellings have crept
into your command line; next, try changing your PATH
setting, or make the drive & directory where the program
resides the "current" drive & directory.

3 - If the program is being run from a batch file, try
deleting lines previous to the line that actually
invokes the program, to see if some prior activity
is causing the problem.

4 - If you have any memory-resident or "TSR" utilities
installed (pop-up calculators/note pads, keyboard
enhancements, etc.), try removing them from memory
and running the program again to see if the problem
reoccurs.



9.1.1 REPORTING THE PROBLEM
_____________________________

If the problem persists, please document it as completely and
accurately as possible; we have to be able to duplicate it
before we can begin to resolve it.

Include at least the following:

1 - Version of DOS you are using.
2 - Machine type, drives, memory, etc.
3 - Programs executed prior to the problem.
4 - Problem program's name and version number.
5 - Where and how you obtained the problem program.
6 - Address and/or phone number where you can be contacted.
7 - Anything you can think of that might relate to the problem;
for example, listings of your AUTOEXEC.BAT and CONFIG.SYS
files, or any batch files used to run the program.
8 - Any relevant printouts.

NOTE: Registered users will find the utility UserResp.Exe on
the distribution diskette; it can be used to print a
pre-addressed mailer and a problem report.



9.2 CUSTOM MODIFICATIONS
__________________________

If custom modifications to this software are needed for your
particular application, please write to the below address
with complete details of your requirements.



9.3 CORRESPONDENCE
____________________

We welcome any comments or suggestions you might have
concerning improvements and future enhancements to this
product. Send all correspondence and orders to:

Phil Herron
P.O. Box 1288
Battle Ground, Washington USA 98604




________________________________________________________________

10 SHAREWARE PRODUCT CATALOG
________________________________________________________________

If our other Shareware products aren't available locally,
evaluation disks can be ordered directly from the source:

Each disk (5.25" DSDD 360K) holds up to five programs and
associated documentation files. Include $4.00 for the first
disk, shipping and handling. Add $1 for each additional
disk of programs you want to evaluate (Example: $4 for 1-5
programs, $5 for 6-10, $6 for 11-15, etc.). Make all
payments in U.S. funds; Washington State residents must add
7.6% of the total for sales tax. For addresses outside the
U.S. and Canada, include $6.50 additional for shipping.

The latest versions of most products can also be downloaded from
the CompuServe Information Service.
____________________________________________

PROGRAM SPECIFICATIONS AND REGISTRATION FEES
MAY CHANGE WITHOUT NOTICE
____________________________________________

1099 Series - IRS forms preparation
1099M - 1099-MISC Miscellaneous income statement
1099i - 1099-INT Interest income statement
1099S - 1099-S Real Estate Transactions statement
1098 - 1098 Mortgage Interest statement

ChkD - Check_Disk_space reports disk drive space usage. It reports
drive cluster size, then drive space TOTAL, FREE and USED by actual
value and by percentage. Faster and more convenient than the DOS
"dir" or "chkdsk" utilities for displaying drive information.

ChkM - Check_Memory_space reports standard system memory (RAM) space
usage. It reports memory space TOTAL, FREE and USED by actual value
and by percentage. Faster and more convenient than the DOS
"chkdsk" utility for displaying system memory information.

CleanOut - searches all directories of the default drive for file(s)
specified on command line. Each time a matching file is found, the
user is prompted for disposition: Delete or Save. File contents,
either text or binary, can be VIEWED before deciding. A single
press of the "S" key saves a file; a double press of the "D" key
deletes it. An optional mode allows deletions without confirmation.
Useful for cleaning out .BAK file leftovers, among others.

CleanTxt - Clean_Text converts WordStar text files to straight ASCII.
It strips out certain control characters, and will optionally expand
tab characters to the appropriate number of spaces.

CleanZ - Most text editors won't read files beyond the first control-Z
end-of-file character. Control-Z's can become embedded in a text
file when several files are combined using the DOS "type" command.
CleanZ will strip out each control-Z, or it will optionally replace
each with a seldom-used character, to ease the task of locating the
former boundaries in combined files.

DiskInit - Diskette_Initialize erases all files and subdirectories on
a 5.25 inch 362k DSDD diskette in about two seconds. It does not
initialize marked bad sectors, but tells you to reformat instead.

ErrLev - ErrLev is a utility for testing batch file "if errorlevel"
statements. During testing, executable program calls are commented
out and replaced with "ErrLev nn", where nn is the DOS errorlevel to
be simulated. The simulated errorlevel then exercises branching
commands in the batch file under test.

FindD - Find_Directory searches the default drive for specified
subdirectory names, and lists the complete path to those found.

FindF - Find_File searches the default drive for specified files, and
writes the file information to screen or disk. Useful for locating
misplaced files or for generating a listing of all files and
subdirectories on the default drive.

FreqCh - Letter-frequency analysis of text or binary files; handles
the full 256-character extended Ascii set; display is sorted in
order of Ascii code or frequency of occurrence.

Gen - Generate_file replaces several trial-and-error methods of
building specific-sized files for printer, storage or timing tests.
It generates files of any size from zero to twenty million bytes,
much faster than typing random characters into a text editor.
Besides generating files on disk, it can send characters directly to
the console screen, printer or other DOS device.

Index - Text file INDEX word list utility. Strips punctuation,
digits, whitespace, trivial words and words shorter than a specified
minimum, then writes remainder to disk file, one word per line.

KeyCode - KeyCode responds to each press of a key or combination of
keys by displaying the key or combination pressed, its associated
Ascii character (if any), key type (normal or extended), Ascii code
and Scan code.

KeySet - KeySet's interactive mode displays the current settings of
the CapsLock, NumLock, ScrollLock and PrtSc (Print Screen) keys, and
allows them to be changed. The command line mode directly sets the
keys to specified states, allowing use of a batch file for
presetting at system boot-up or between applications.

PhLBL - Label/Rotary filecard/Postcard Printer; loads, displays and
prints labels stored in easily-maintained ASCII files. Labels can
contain embedded commands for date, time, margin, selectable printer
attributes; 5, 8.5, 10, 12, 17 or 20 characters per inch pitch,
normal/bold/underlined on Epson compatible dot-matrix printers.

PrinTest - PrinTest repetitively displays the status of ports assigned
to parallel printer interfaces. It can be used to isolate problems
to the printer interface card, the cable or the printer itself. It
reports printer and port number, status byte and status condition.

Qscr - QuickScreen converts a single text screen to an executable file
for more rapid display. The resulting .COM file will write a screen
of text much faster than batch file ECHO statements. Useful for
setting up compact menu systems, demos and tutorials.

ScanF - Scan_File speeds up the search for ASCII text strings within
executable files. It filters out the unintelligible control and
extended characters, and allows user definition of minimum string
length for display.

ScanM - Scan_Memory speeds up the search for ASCII text such as ROM
copyright statements and machine identification, anywhere within
standard system memory space. It filters out the unintelligible
control and extended characters, and displays each string longer
than three characters.

Split - Split_file breaks huge text files down into smaller ones that
will fit into a text editor or onto a diskette. Useful for working
on large files with a limited filesize memory-resident notepad
utility.

StoRm - STOrage_RooM reports the amount of disk space required for
storage of a specified file or group of files on any disk, using any
version of DOS. It takes into account all of the factors involved
in determining file storage size. It locates files specified on the
command line and determines their actual total size and the amount
of room needed to store them. Useful for determining the number of
files that will fit on a disk.

AcctSort - Fast entry of dollar amounts & assignment to
user-designed charts of accounts; user-selected limit
checking of $ and account numbers.

SSN - Social Security Number Prefix/Location Lookup

ZCODE - Postal Zip Code Number Prefix/Location Lookup

______________________________________________________________
| |
| COPYRIGHT 1991 Phil Herron. ALL RIGHTS RESERVED |
|______________________________________________________________|


 January 20, 2018  Add comments

Leave a Reply