Re: Backwards Message Hack
Article: 7384 of alt.hackers Newsgroups: alt.hackers From: heller@cis.csuohio.edu (Jettero Heller) Subject: Re: Backwards Message Hack Message-ID: 1995Feb14.143004.29928@news.csuohio.edu Sender: news@news.csuohio.edu (USENET News System) Organization: Cleveland State University X-Newsreader: TIN [version 1.2 PL2] Date: Tue, 14 Feb 1995 14:30:04 GMT Approved: well, is it? Lines: 35 Status: RO
Michael Stage (nene@u.washington.edu) wrote:
: In article <3hlce4$37u@taco.cc.ncsu.edu>,
: Michael John Haisma <mjhaisma@eos.ncsu.edu> wrote:
: >
: >
: >ps -aux|grep <process name>|grep -v grep|cut -f2 -d"
"|kill
: >
: >Won't kill the process(es) with that name. If I leave off the kill, the
: If you want this to work with more than one process, you need something
: like this:
: ps -a | grep <whatever> | grep -v grep | awk '{print $1}' | xargs
kill -9
: The command substitutions (kill `<commands>`) suggested so far
won't work
: with more than
: one process because `<commands>` will include line feeds. So, kill
: will only get the first process ID. You could alternatively use:
Hmmmm, rather unusual that this won't work. . .considering I've been doing
it for months now. . .and even shorter than that.
kill -9 `ps -aux | gawk '/<whatever>/ {print $2}'`
and it works every time I do it. . .occasionally I even change it so that
they are niced to -20. Run that a few times as root and it'll kill fork
bombs.
obhack:
the above? no really. . .hacking together a setuid perl script
as the 'new' user login for the bbs I'm setting up. I had to do all
sorts of ugly things to make sure duplicate users weren't being created,
or users with 'bad words' in their names.
** Heller