MACSCRPT Archives

May 2012

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"L. Lee" <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Fri, 11 May 2012 16:30:27 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (40 lines)
On 5/11/12 4:09 PM, "Emmanuel" <[log in to unmask]> wrote:

> Did you try Smile? Its readtext - and probably its find text - expand some
> files on the fly, I think.
> 
> Emmanuel

Well, that might be too easy. No, seriously, I hadn't tried Smile, but
that's mainly because I was mystified by why grep wasn't doing what I
expected. Thanks.

Laine


> 
> On May 11, 2012, at 8:43 PM, L. Lee wrote:
> 
>> Yesterday, I came across an Apple knowledge base article
>> (http://support.apple.com/kb/TS4272) that appeared to me to state that under
>> certain circumstances, passwords might be stored in clear text in some log
>> files. So I started thinking about a command line that might be used to
>> return a list of log files, compressed or not, that might contain a unique,
>> exact fragment of a password.
>> 
>> To test my script, I found a file (/private/var/log/AppleJack.log.0.bz)
>> that, when I decompressed and opened it in TextWrangler, appeared to contain
>> the string "8CFCE322A9CB".
>> 
>> Why isn't "/var/log/AppleJack.log.0.bz" returned in the results of  the
>> following terminal command on my system? What terminal command could I use
>> instead to search for "8CFCE322A9CB" in text or .bz files in
>> /private/var/log that would include "/var/log/AppleJack.log.0.bz" in its
>> results?
>> 
>> sudo find /private/var/log -exec bzgrep -q "8CFCE322A9CB" '{}' \; -print
>> 
>> Thanks.
>> 
>> Laine Lee

ATOM RSS1 RSS2