Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Aug 2001 13:07:11 +0200 (CEST)
From:      Dan Larsson <dl@tyfon.net>
To:        Bob Lefevere <b.lefevere@copernicus-it.nl>
Cc:        <freebsd-security@FreeBSD.ORG>
Subject:   Re: Compromised system.
Message-ID:  <20010823130243.Y89248-100000@hq1.tyfon.net>
In-Reply-To: <010901c12bc0$18e6ab10$0b01a8c0@dragoneer8>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 23 Aug 2001, Bob Lefevere wrote:

| > An easy way to find out what exactly is in the directory one could use the
| > below perl one-liner:
| >
| > % cd /suspiscious/directory
| > % perl -we '$d=".";opendir(D,$d);while($_=readdir(D)){print"($_)
| "}closedir(D);print"\n"'
|
| Er.. Shouldn't ls -la suffice ?

How would that show the actual number of spaces in the directory name?

% ls -la
total 3
drwxr-xr-x  3 dl  tyfon  512 23 Aug 12:14 .
drwxr-xr-x  2 dl  tyfon  512 23 Aug 12:13 .
drwxr-xr-x  3 dl  tyfon  512 23 Aug 12:12 ..
-rw-r--r--  1 dl  tyfon    0 23 Aug 12:13 file.txt
-rw-r--r--  1 dl  tyfon    0 23 Aug 12:13 garbage.foo
% perl -we '$d=".";opendir(D,$d);while($_=readdir(D)){print"($_) "}closedir(D);print"\n"'
(.) (..) (.    ) (file.txt) (garbage.foo)
%

The perl method will, 'ls -la' just shows it's there.


Regards
+------
Dan Larsson                    DL1999-RIPE
Tyfon Svenska AB | Tel:   +46 8 550 120 21
GPG public key   | finger dl@hq1.tyfon.net




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-security" in the body of the message




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