From owner-freebsd-questions@FreeBSD.ORG Fri Dec 5 08:22:17 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 747D61065670 for ; Fri, 5 Dec 2008 08:22:17 +0000 (UTC) (envelope-from mcoyles@horbury.wakefield.sch.uk) Received: from smtp2-wak.yhgfl.net (smtp2-wak-ext.yhgfl.net [89.207.208.43]) by mx1.freebsd.org (Postfix) with ESMTP id 0D7C28FC16 for ; Fri, 5 Dec 2008 08:22:16 +0000 (UTC) (envelope-from mcoyles@horbury.wakefield.sch.uk) Received: from horbury.wakefield.sch.uk ([10.126.96.34]) by smtp2-wak.yhgfl.net (8.13.8/8.13.8/Debian-3) with ESMTP id mB58M404008559; Fri, 5 Dec 2008 08:22:05 GMT Received: from ITTEAM02 [10.126.96.253] by horbury.wakefield.sch.uk with ESMTP (SMTPD32-7.07) id A4A635E0088; Fri, 05 Dec 2008 08:21:58 +0000 From: "Marc Coyles" To: References: <002b01c95609$ed0c7200$c7255600$@wakefield.sch.uk> <1228395500.2781.41.camel@frodon.be-bif.ulb.ac.be> <200812050551.32850.fbsd.questions@rachie.is-a-geek.net> In-Reply-To: <200812050551.32850.fbsd.questions@rachie.is-a-geek.net> Date: Fri, 5 Dec 2008 08:21:53 -0000 Message-ID: <002f01c956b2$87dd3b40$9797b1c0$@wakefield.sch.uk> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AclWlTXUdF6aBdckTSKj/0Mh6WRVAwAHDjpQ Content-Language: en-gb X-YHGfL-MailScanner-Information: Please contact the YHGfL Foundation for more information X-YHGfL-MailScanner: Found to be clean X-YHGfL-MailScanner-MCPCheck: MCP-Clean, MCP-Checker (score=0, required 0.5) X-YHGfL-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-4.399, required 5, autolearn=not spam, ALL_TRUSTED -1.80, BAYES_00 -2.60) X-MailScanner-From: mcoyles@horbury.wakefield.sch.uk Cc: 'Mel' Subject: RE: Mass find/replace... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: mcoyles@horbury.wakefield.sch.uk List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Dec 2008 08:22:17 -0000 > + not \; or you will fork on every result. >=20 > Additionally, is this injected code one long string or broken down > by the > mailer? Grep isn't the best way to deal with it. It's pretty easy > to correct > with perl, bit trickier if it's multiline, still not too hard: >=20 > find /home/horbury -type f -exec \ > perl -pi.bak -e 's,<\?/\*\*/eval\(base64_decode\(.*?\?>,,s' > {} + >=20 Hi Mel... S'One long singleline string broken down by the mailer... Have tried doing a find and replace using perl, initially just to = replace the string, leaving an empty base64_decode(), however, one of = the ICT Teachers has created paths with spaces in, which seemed to throw = off the perl I was using... will give yours a try later today *fingers = crossed*... If worst comes to worst I can restore from backups, it'll just mean = students lose a few days of work that they'd submitted thru Moodle (I've = been off for a day or three, and this appears to have happened on the = first day of my absence) Ta fer the helpful suggestions thus far! Marc A Coyles - Horbury School ICT Support Team Mbl: 07850 518106 Land: 01924 282740 ext 730 Helpdesk: 01924 282740 ext 2000