goetz@ACSU.BUFFALO.EDU (Phil Goetz) (12/19/90)
>>>What's the easiest way to get yesterday's date in a string? After some >>>poking around, give or take a time zone, this seems to do the trick: >>> >>> $ TZ=EST29EDT date > >>It helps if you tell us what computer and what >>operating system you're referring to. > > C'mon, any hacker worth his salt should know this one cold. :) Think > "massive licensing fees" and I think you'll get it. :) > >| coxs@mts.rpi.edu | "No matter how hot or cold a room is, it's | I have used System V UNIX hardly at all; it is narrowminded of you to assume that anyone worthy of the name "hacker" uses System V. (In fact, it is even within the realm of possibility that there are hackers who don't use UNIX! Of course, if you are referring to people who break into other computers, then they doubtless are familiar with BSD and System V UNIX.) Someone sent me a rather cryptic message which said IT IS UNIX. HERE IS UNIX. HOPE YOU HAVE FUN WITH IT. begin 0/unix.Z MCS;0J.-@M=*<AOC/M"=VM"07:5Z$($L.JR)OCEN_G5P!8+HN;<^5\.Z@W[/< M26_,RT_K_D8J"AZ"#TTJ6<%DSQT^042QT1=EZ?X.!7L^[BZ,:Q)$OA]-UB'O MDX5+J,\7*\:'D<]L(2M1.0IGA/^2Y)"D_&WO?/TW.>>W88=D54Z73 _P9MI- etc. There was no valid return address on the message, so I can't ask the user directly. But: The .Z suffix indicates that it is a compressed file. But 'uncompress' in UMACS 4.3 (BSD) does nothing to it. The file is over 360K. Could it actually be the compressed source to UNIX, or is UNIX source much bigger? Again, the sender gave no indication what format the file was in, presuming that I'm using the same operating system as he and that decompression would be obvious. It would be nice if the original sender or someone else responds soon, because the file is much too big for me to save in the mailbox for more than a day or so, and my system manager has a policy of deleting the accounts of people who leave things in /tmp overnight. I hate to delete it without ever discovering what it is. Phil Goetz goetz@cs.buffalo.EDU Just think: How would Bugs Bunny handle this?
gaudreau@juggler.East.Sun.COM (Joe Gaudreau - Sun BOS Software) (12/20/90)
Phil Goetz sez: >>IT IS UNIX. HERE IS UNIX. HOPE YOU HAVE FUN WITH IT. > >begin 0/unix.Z >MCS;0J.-@M=*<AOC/M"=VM"07:5Z$($L.JR)OCEN_G5P!8+HN;<^5\.Z@W[/< >M26_,RT_K_D8J"AZ"#TTJ6<%DSQT^042QT1=EZ?X.!7L^[BZ,:Q)$OA]-UB'O >MDX5+J,\7*\:'D<]L(2M1.0IGA/^2Y)"D_&WO?/TW.>>W88=D54Z73 _P9MI- >etc. the file has been compressed and uuencoded. To reverse this, you must first uudecode the file and then uncompress it. also, the first line would probably look better as: begin 666 unix.Z maybe it's a joke... assuming you don't have uudecode, try this (courtesy of rec.arts.startrek): This question has been asked before, many times, so I think many will find this useful. Here's the source code to a C program for uudecode. If you can compile C, or can translate it into a language you do have, this should solve your problems. David B. Mears Hewlett-Packard Cupertino CA hplabs!hpda!mears mears@hpinddf.cup.hp.com --------------- #include <stdio.h> #define DEC(c) (((c) - ' ') & 077) main() { int n; char dest[128], a,b,c,d; scanf("begin %o ", &n); gets(dest); if (freopen(dest, "w", stdout) == NULL) { perror(dest); exit(1); } while ((n=getchar()) != EOF && (n=DEC(n))!=0) { while (n>0) { a = DEC(getchar()); b = DEC(getchar()); c = DEC(getchar()); d = DEC(getchar()); if (n-- > 0) putchar(a << 2 | b >> 4); if (n-- > 0) putchar(b << 4 | c >> 2); if (n-- > 0) putchar(c << 6 | d); } n=getchar(); } exit(0); } cheers, Joe -=-