Re: hex editors, disk info

2009-01-26 Thread Alex Karpovic
 That in mind, what's wrong with bpatch?  I've used it for binary patching, it
 works just fine that that (if my first assumption is totally off-base).  You
 download from the device, change any required data, and (if the device allows
 writes) write it back to the device.  Of course, not all devices allow writes.

It's a bit uncomfortable. Just for example: I need to search some
signatures, which could be anywhere in 640Gb disk, and make some
changes around them. And I don't have spare 640+ Gb to copy whole disk
to. And even if I would have enough space, it is painfully slow to
move 640Gb twice just to make ten minutes editing.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: hex editors, disk info

2009-01-26 Thread Chuck Robey
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Alex Karpovic wrote:
 That in mind, what's wrong with bpatch?  I've used it for binary patching, it
 works just fine that that (if my first assumption is totally off-base).  You
 download from the device, change any required data, and (if the device allows
 writes) write it back to the device.  Of course, not all devices allow 
 writes.
 
 It's a bit uncomfortable. Just for example: I need to search some
 signatures, which could be anywhere in 640Gb disk, and make some
 changes around them. And I don't have spare 640+ Gb to copy whole disk
 to. And even if I would have enough space, it is painfully slow to
 move 640Gb twice just to make ten minutes editing.

That's an unusual requirement, but folks ought to listen here, because
optimizing such a problem, it's an interesting challenge.  There is NO
established tool which will do such an outre' task well, just because it's so
unusual)  I won't probe into your reasons, although a request so very odd
usually means that there's some misunderstanding at the back of it.

Anyhow, if I were given this task, I really think that the problem is in
localizing the area you need to change, not in changing it.  I'd use whatever
language you feel comfortable with, then using that language (either directly,
or by piping dd or nc to help out) so that you could do a global search for your
target.  Your search could trivially do extra things, like uniquely identifiying
the target area, even dumping surrounding blocks into work file, so you could
follow up with bpatch to actually change things.

Don't expect such a thing to go quickly ... however, this is one of those tasks
that can be made to operate significantly quicker, if you choose an efficient
language and (easily as important) choose a good search/comparison algorithm.
Actually, this sort of thing mgiht well have been given as homework to an
undergrad, a very good learning opportunity indeed.  Lot's of room for
optimization of all kinds, and that task is big enough to really show obvious
results.

Done wrong, with tools bent into shape, this task is really too large to be
reasonably contemplated.  Unless you have a few extra months to use waiting for
results, and you'd have to keep your mitts off the disk in the meanwhile.  Just
not a good idea to take that approach.

 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.9 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkl97fYACgkQz62J6PPcoOmJzgCePrJCKxJc6y92RNJPa+Nr76GY
dDoAniq7ay6Bb72eVUFVOeyxWo5IPehc
=r9vi
-END PGP SIGNATURE-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


hex editors, disk info

2009-01-25 Thread Alex Karpovic
Friends,

I need a hex editor able to work directly with disks, preferably
those, which can be started without X.
I tried hexcurse, chexedit, bpatch - and it seems that they are unable
to open /dev/something.

Also, I would like to know about a tool to show low-level disk
information. For example, how can I see a number of sectors available?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: hex editors, disk info

2009-01-25 Thread Bruce Cran
On Sun, 25 Jan 2009 23:51:45 +0200
Alex Karpovic alekar2...@gmail.com wrote:

 I need a hex editor able to work directly with disks, preferably
 those, which can be started without X.
 I tried hexcurse, chexedit, bpatch - and it seems that they are unable
 to open /dev/something.

Have you tried /usr/bin/hd? It seems it doesn't have any problem opening
disk devices.

-- 
Bruce Cran
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Fwd: hex editors, disk info

2009-01-25 Thread Alex Karpovic
 I need a hex editor able to work directly with disks, preferably
 those, which can be started without X.
 I tried hexcurse, chexedit, bpatch - and it seems that they are unable
 to open /dev/something.

 Have you tried /usr/bin/hd? It seems it doesn't have any problem opening
 disk devices.

Bruce, hd is suitable for viewing only. I need *editing* tool.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org