July 15, 2002 Flattr this
Mac OS X FAQ: Searching for files using the command line
Chris Kurylak recently asked:
    "I was wondering if you could tell me how can i search for files using the command line? It drives me crazy that the gui does not show everything on the system unless you first know where to look."
Well, this is an easy one: there's the find command.

If you type man find in Terminal.app, it'l show you some help.

Here are some Examples:
find . -name "*test.pl" -print will search for any filename which ends in "test.pl" in the current directory (the period "." after the find command stands for the current working directory) and all it's subdirectories.

find / -name "*test.pl" -print will search for any filename which ends in "test.pl" in the servers root directory (the slash "/" after the find command stands for the root directory - similar to "cd /") and all it's subdirectories.

Let's say you want to find any html file anywhere on your server (incl. any mounted volumes) this would be find / -name "*.html" -print

And to limit this to html files which have been modified longer than 3 days ago, this little voodoo will help:
find / -name "*.html" -mtime +3 -print
Note: funny enough, there is no Creation-Time on UNIX.
There are plenty of tips on the find command available through google.

Posted in: by seiz | Comments (0)
July 13, 2002 Flattr this
It's fixed already
I am very impressed. Apple has already closed the security hole (see below) in their Software Update mechanism.
With this surprisingly fast fix Apple proves how seriously they take security issues (responses to the latest SSH/Apache vulnerabilities have already been very timely too).

Get your Update here and don't forget to verify the checksum (2c039c683b7001defc35f93ba1f68db3e33e41fc) of the update after downloading AND dropping it onto Stuffit expander:

    /usr/bin/openssl sha1 /Path/To/SecurityUpdate7-12-02.dmg
From now on all Apple Software Updates will be cryptographically signed and the new Software Update client 1.4.6 checks for a valid signature before installing new packages.

And there's more: this update does contain a COMMAND-LINE version of Software Update which comes very handy when administering several machines via SSH. See man softwareupdate for more Info.

Posted in: by seiz | Comments (0)
July 09, 2002 Flattr this
Mac OS Software-Update Exploit
Recently published exploit calles it "trivial" to trick a user to install malicious code.
IMHO DNS/ARP-Spoofing requires at least access to the victims network which i wouldn't call "trivial" given the victims network is considerably well protected.

In any case it is true, that it is a big oversight from Apple not to incorporate any authentication mechanism into it's Software-Update programm.
They could at least somehow GPG-Sign their downloads and have Software-Update verify the signatures.

Don't panic.

Posted in: by seiz | Comments (0)
CommuniGate Pro FAQ: Piping messages to a given account to a text file

Assuming you're on UNIX:

Via the router you can divert messages to a given account to an external program. The external program must reside in a special folder which is configured in the CGPro Webadmin.

So first configure the Directory for Applications with the Webadmin
Settings -> Pipe -> Application Directory

Set it to /var/CommuniGate
Set the Timeout to 2 Minutes.

Now we need to generate a little program which accepts the message as input and then pipes it to a file. We will use perl as the language of choice here.

Create the following file: /var/CommuniGate/pipeit.pl

and fill in this code:
##### COPY HERE
#!/usr/bin/perl -w

open(OUTLOG, ">>pipe.out");

while (<>){
print OUTLOG $_;
}
#### END COPY HERE

Save the file and then make it executable:
chmod +x /var/CommuniGate/pipeit.pl

Now we have everything we need in place and just need to setup an appropriate ROUTER-Entry in
Webadmin -> Settings -> Router

Add something like this:
= "queue[PROC1] pipeit.pl"@pipe

This should already be it and every message send to noreply should be piped to /var/CommuniGate/pipe.out

Of course even easier is just setting up normal mbox email account which also somehow is just a textfile - only it is accessible via POP/IMAP... ;-)

Posted in: by seiz | Comments (0)