Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Oct 1996 22:10:27 -0500 (EST)
From:      hoek@freenet.hamilton.on.ca
To:        mbando@melita.com
Cc:        "'freebsd'" <questions@freebsd.org>
Subject:   Re: Prob with "strings.c"
Message-ID:  <199610290310.WAA14832@james.freenet.hamilton.on.ca>

next in thread | raw e-mail | index | archive | help
In Email, Mana Bando <mbando@melita.com> wrote:

> I do not know whether you guy's are the right person or not...but if you 
> are, can you help me out...here below i got a program call "strings.c" which 
> my boss told me that he got it quite a while ago from "freebsd"...i tried to 
> compile this code... unfortunately, this is giving me an error...looks like 
> either downloading was not correct or some of the needed file to run this 
> program are missing...anyway, can you solve this problem and let me know 

It compiled finely on my FreeBSD-2.2-961004-SNAP system.

If you tried compiling it on a non-FreeBSD system, somehow I'm not 
surprised it didn't compile correctly.


> whether i am looking at the right "strings.c" source codes or you have the 
> latest version of this codes or during download we might lost some of the 
> needed header file or we need to download correct version with the correct 
> header file....

It looks like you have the latest version of the file.  When compiled and 
stripped it matches the `strings' binary on my machine.


> ...anyway, i will really appreciate if you can help me out 
> asap...incidentally, if you can let me know any of its documentation or what 
> it does in detail, will be a great help...here below i am attaching the 
> "strings.c" file.

man 1 strings


STRINGS(1)		   FreeBSD Reference Manual		    STRINGS(1)

NAME
     strings - find printable strings in a file

SYNOPSIS
     strings [-afo] [-n number] [file ...]

DESCRIPTION
     Strings displays the sequences of printable characters in each of the
     specified files, or in the standard input, by default.  By default, a se-
     quence must be at least four characters in length before being displayed.

     The options are as follows:

     -a      By default, strings only searches the text and data segments of
	     object files.  The -a option causes strings to search the entire
	     object file.

     -f      Each string is preceded by the name of the file in which it was
	     found.

     -n      Specifies the minimum number of characters in a sequence to be
	     number, instead of four.

     -o      Each string is preceded by its decimal offset in the file.

     Strings is useful for identifying random binaries, among other things.

SEE ALSO
     hexdump(1)

BUGS
     The algorithm for identifying strings is extremely primitive.  In partic-
     ular, machine code instructions on certain architectures can resemble se-
     quences of ASCII bytes, which will fool the algorithm.

COMPATABILITY
     Historic implementations of strings only search the initialized data por-
     tion of the object file.  This was reasonable as strings were normally
     stored there.  Given new compiler technology which installs strings in
     the text portion of the object file, the default behavior was changed.

HISTORY
     The strings command appeared in 3.0BSD.

3rd Berkeley Distribution	 June 6, 1993				     1


-- 
tIM...HOEk
The opinions expressed above are mine,
and if my employer shares them, 
that's his hard luck.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199610290310.WAA14832>