From owner-freebsd-hackers Sat Mar 16 14:47:48 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by hub.freebsd.org (Postfix) with ESMTP id DBBD337B404 for ; Sat, 16 Mar 2002 14:47:42 -0800 (PST) Received: by elvis.mu.org (Postfix, from userid 1192) id B9C31AE1FE; Sat, 16 Mar 2002 14:47:42 -0800 (PST) Date: Sat, 16 Mar 2002 14:47:42 -0800 From: Alfred Perlstein To: "Clark C . Evans" Cc: hackers@freebsd.org Subject: Re: simple binary patch utility (for iso cdrom images) Message-ID: <20020316224742.GS4857@elvis.mu.org> References: <20020316173254.A15494@doublegemini.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020316173254.A15494@doublegemini.com> User-Agent: Mutt/1.3.27i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Clark C . Evans [020316 14:34] wrote: > I looked around for quite a while for a simple program > to do a binary patch on an iso cdrom image. I was hoping > that I could use "bvi" or similar binary editor, but it > wasn't clear how I could get them to do simple string > replacement. So, I wrote one and am putting it in the > public domain, I hope someone finds it useful. Kinda cool, but you should make the program return success/failure if it finds the string to replace. You should also probably allow a starting offset and a way to list all the locations where it occurs, or: use grep -b to find the pattern and 'dd' to patch it. :) -Alfred To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message