Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.misc > #16669

Re: Which files/S contain the virus?

From Rich <rich@example.invalid>
Newsgroups alt.os.linux.slackware, comp.os.linux.misc, alt.os.linux.debian
Subject Re: Which files/S contain the virus?
Date 2016-01-05 11:06 +0000
Organization My Linux Box
Message-ID <n6g83b$ef0$1@dont-email.me> (permalink)
References <n6fqo9$814$1@dont-email.me>

Cross-posted to 3 groups.

Show all headers | View raw


In alt.os.linux.slackware no.top.post@gmail.com wrote:
> I've previously charactertized the new-fad of replacing the single-quote
> by multiple bytes, as a VIRUS, because a destructive fad is a virus.
> E2 80 ?? seems popular.

> Some kiddie wrote <ASCII is no good any more, if we want to write in 
> Chinese and Japanese> ?

> My current problem is to find text-files which contain xE2 = d226.
> `sed` can clean them, but I want to see them first.

>   find ./ -type f -exec sed '/\d226/!d' {} \;
>   find ./ -type f -exec sed '/\xe2/!d' {} \;

> prints the lines containing a hex(E2) char,
> which I can then paste into `mc` or some grepper, to get the fileName.

> It's a pity that *nix is so ad hoc ?
> AFAICS the character-classes listed for `grep` and `sed` are very different.
> `sed` gives me the ability to specify any char/byte;
> but `grep` doesn't cater for all 256.

> What am I missing?

That Chris Glur is an idiot.

  $ echo -e "\xe2\x80" > magic-quote
  $ xxd magic-quote
  0000000: e280 0a
  $ cp magic-quote magic-quote2
  $ grep $'\xe2' magic-quote*
  magic-quote:â€
  magic-quote2:â€

Grep works just fine with any character you give it to search (other
than maybe an ASCII null).  But first, you have to type the characters
into the shell in such a way that Bash understands your meaning.  You
can not directly type a \xe2 character (well, not easily) from the
keyboard.  So you have to tell Bash "this next thing is a special
character".  That is what the $'\xe2' piece does.  It tells Bash "this
next thing is a special character that can't be directly typed on the
keyboard".

The problem, as always, was your failure to understand.














Back to comp.os.linux.misc | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Which files/S contain the virus? no.top.post@gmail.com - 2016-01-05 07:18 +0000
  Re: Which files/S contain the virus? Rich <rich@example.invalid> - 2016-01-05 11:06 +0000
    Re: Which files/S contain the virus? Joe Beanfish <joebeanfish@nospam.duh> - 2016-01-05 14:40 +0000
      Re: Which files/S contain the virus? Teemu Likonen <tlikonen@iki.fi> - 2016-01-05 17:48 +0200
      Re: Which files/S contain the virus? Unknown <dog@gmail.com> - 2016-01-11 17:03 +0000
  Re: Which files/S contain the virus? William Unruh <unruh@invalid.ca> - 2016-01-05 17:36 +0000
    Re: Which files/S contain the virus? Keith Keller <kkeller-usenet@wombat.san-francisco.ca.us> - 2016-01-05 10:51 -0800

csiph-web