Editting binary files in console and GUI on FreeBSD and Linux

Similar documents
How to add support for DJVU file format on M$ Windows, Mac, GNU / Linux and FreeBSD

How to install Linux or *BSD to USB flash drive (memory stick) using Debian GNU / Linux

RafKill Raptor Free Software (Open Source) clone for GNU/Linux

Viewing JPEG,GIF and PNG in ASCII with cacaview on GNU / Linux - Review on caca-utils text mode graphics utilities

Install TeamViewer on latest Debian, Ubuntu, Fedora, CentOS Linux quick how to

How to find and Delete Duplicate files in directory on Linux server with find and fdupes command

How to configure VIVACOM 3g USB ( internet ) modem HUAWEI Mobile broadband E173 on Debian and Ubuntu GNU / Linux

How to install Microsoft Windows XP SP3 on Debian GNU / Linux Squeeze

Get Hardware System info on Debian Linux / How to detecting hardware and servers model on GNU / Linux

How to: Ripping Audio CDs to Mp3 on Microsoft Windows XP / Vista / 7 - CDEx Audio CD Rip free software

How to disable ACPI on productive Linux servers to decrease kernel panics and increase CPU fan lifespan

HELPLINE. Dilwyn Jones

Start Plink SSH tunnel on Windows start - Windows Resource Kit and AlwaysUp start Windows services when computer boots up

KeePass - to improve your process

Why You Should Not Use Arch

Skype remove word completion / Howto Disable spellcheck autocorrect on Mac OS X, Android Phones Tablets and IPhone ios

FreeBSD Install VIM Editor Without X11 GUI

Post Ubuntu Install Exercises

COPYRIGHTED MATERIAL. Starting Strong with Visual C# 2005 Express Edition

Boost local network performance (Increase network thoroughput) by enabling Jumbo Frames on GNU / Linux

Introduction to Linux

INSIDE THE ULTIMA ONLINE CLIENT - INSERTING A SLEEP

Intro to Linux & Command Line

Code::Blocks Student Manual

Ubuntu Practice and Configuration Post Installation Exercises interlab at AIT Bangkok, Thailand

Quick Guide to the NoMachine GUI

Turn your Windows PC / notebook to Wireless Router with My Wifi Router 3.0 and TP-Link TL-WN722N

! Emacs Howto Tutorial!

How to install Java Virtual Machine on Debian 7 GNU / Linux

Running Java Programs

Code::Blocks Student Manual

Problem Installing Adobe Flash Player Mozilla Firefox Portable

Integrated Software Environment. Part 2

But I know what most of you will do: use a calculator to convert; that's fine, IF you understand the theory.

How to install and configure Jabber Server (Ejabberd) on Debian Lenny GNU / Linux

Unable to import. ive read the docs/searched forums Posted by BuddyElkor - 05 May :02

Setting up my Dev Environment ECS 030

Install and make Apache + PHP to work with PosgreSQL database server on Debian Linux and set up server Web Posgre interface Pgpadmin howto

Take Command Configuring pppd in Linux, Part I

Introduction to Linux

*nix Crash Course. Presented by: Virginia Tech Linux / Unix Users Group VTLUUG

This is an oral history interview conducted on. October 30, 2003, with IBM researcher Chieko Asakawa and IBM

mid=81#15143

Blog post on updates yesterday and today:

Some Ubuntu Practice...

Basic Fiction Formatting for Smashwords in OpenOffice L. Leona Davis. Copyright 2012 L. Leona Davis All Rights Reserved

ET: Legacy Development - Task #157 Provide 64-bit binaries

Free & Open Source Software: The Academic Future

Getting Started. System Requirements. Installation

SPSS: Basics & Entering a survey In this document the basic window of SPSS is explained and how to enter a survey.

Operating Systems. Written by Justin Browning. Linux / UNIX Distributions Report

Hello World! Computer Programming for Kids and Other Beginners. Chapter 1. by Warren Sande and Carter Sande. Copyright 2009 Manning Publications

How to stop / start services in boot time and install / remove / update SuSE SLES (Suse Enterprise Linux Server)?

How To Manually Install Software In Linux Mint 13 From Usb

In today s video I'm going show you how you can set up your own online business using marketing and affiliate marketing.

Get Your Game On. Getting and Installing PCSX. Getting Plugins and BIOS. Installing the "Easy Stuff" Playing PlayStation Games in Linux

Introduction to Linux. Woo-Yeong Jeong Computer Systems Laboratory Sungkyunkwan University

Adafruit's Raspberry Pi Lesson 1. Preparing an SD Card for your Raspberry Pi

Open the Music app to view your itunes Match music in the cloud. You can delete a song or album from your iphone, ipad, or ipod touch at any time.

When I was looking for a guide to set up an Amiga on my shiny new imac, I scanned the forums and Googled the web. I didn't find one.

Lab: Supplying Inputs to Programs

Install and Run Multiple Tomcat and JAVA server instances on single Windows server Howto

Code Blocks Cannot Find Compiler Executable Windows 7

Intro to C and Binary Numbers 8/27/2007

Steps To Format Laptop Windows Xp And Install Windows 7 Dell

CSE 391 Editing and Moving Files

Introduction to Linux

Manually Install Windows Updates Xp On 7 Laptop Using Usb

Tutorial 1 C Tutorial: Pointers, Strings, Exec

Step-by-step guide for the libradtran virtual machine. A) Installation

Slide 1 CS 170 Java Programming 1 Duration: 00:00:49 Advance mode: Auto

Take Command Configuring pppd in Linux, Part II

Manually Install Windows Updates Xp On 7 Laptop Using Usb Drive

Installing Altiris Agent on Ubuntu

INTERNATIONALIZATION IN GVIM

CS 170 Java Tools. Step 1: Got Java?

IP Addressing, monitoring and packet analyzing

Hello, and welcome to another episode of. Getting the Most Out of IBM U2. This is Kenny Brunel, and

Chapter 1 Getting Started

Linux alternative text console clients to Thunderbird, fetchmail, Mutt, fetchmail + Alpine how to

New to the Mac? Then start with this lesson to learn the basics.

Getting Started with Python and the PyCharm IDE

Browsing the World Wide Web with Firefox

How To Manually Install Software In Linux Mint 14 Cinnamon Edition

Flatpak and your distribution. Simon McVittie

SANOG VI IP Services Workshop: FreeBSD Install

How To Add Songs To Iphone 4 Without Deleting Old Ones

Getting Started. Excerpted from Hello World! Computer Programming for Kids and Other Beginners

Disable Bluetooth on CentOS / RHEL (Redhat) / Fedora Linux servers - Disable hidd bluetooth devices

New Iphone 5 Headphones Volume Control Not Working >>>CLICK HERE<<<

MITOCW ocw f99-lec07_300k

How To Get Gadgets Windows Vista Faster On Laptop Run

Slide 1 CS 170 Java Programming 1 Testing Karel

Linux Fundamentals (L-120)

Linux for Beginners. Windows users should download putty or bitvise:

How much memory users uses in GNU / Linux and FreeBSD - Commands and Scripts to find user memory usage on Linux

Author : admin. 1. Getting information about current file system partitions with fdisk and mount

Table of Contents VIDE. V IDE User Guide...1. VIDE Quick Start Guide VIDE for Windows with gcc (MinGW/Cygnus)...12

Manually Uninstall Windows 7 Service Pack 1 X64

How to set up custom Logon and Lockscreen background of Windows 7

Transcription:

Walking in Light with Christ - Faith, Computing, Diary Editting binary files in console and GUI on FreeBSD and Linux Author : admin I've recently wanted to edit one binary file because there was compiled in the binary a text string with a word I didn't liked and therefore I wanted to delete. I know I can dig in the source of the proggie with grep and directly substitute my "unwatned text" there but I wanted to experiment, and see what kind of hex binary text editors are for Free OSes. All those who lived the DOS OS computer era should certainly remember the DOS hex editors was very enjoyable. It was not rare case, where in this good old days, one could simply use the hex editor to "hack" the game and add extra player lives or modify some vital game parameter like put himself first in the top scores list. I even remember some DOS programs and games was possible to be cracked with a text editor... Well it was times, now back to current situation as a Free Software user for the last 12 years it was interesting to see what is the DOS hexeditor like alternatives for FreeBSD and Linux and hence in this article I will present my findings: A quick search in FreeBSD ports tree and Debian installable packages list, I've found a number of programs allowing one to edit in console and GUI binary files. Here is a list of the hex editors I will in short review in this article: hexedit dhex chexedit hte hexer hexcurse ghex shed okteta bless lfhex 1. hexedit on Linux and BSD - basic hex editor I've used hexedit already on Linux so I've used it some long time ago. My previou experience in using hexedit is not too pinky, I found it difficult to use on Redhat and Debian Linux back in the day. hexedit is definitely not a choice of people who are not "initiated" with hex editting. Anyways if you want to give it a try you can install it on FreeBSD with: freebsd# cd /usr/ports/editors/hexedit freebsd# make install clean... 1 / 14

On Debian the hexedit, install package is named the same so installation is with apt: debian:~# apt-get --yes install hexedit 2. Hex editting with chexedit I've installed chexedit the usual way from ports: freebsd# cd /usr/ports/editors/chexedit freebsd# make install clean... chexedit is using the ncurses text console library, so the interface is very similar to midnight commander (mc) as you see from below's screenshot: 2 / 14

Editting the binary compiled in string was an easy task with chexedit as most of the commands are clearly visible, anyways changing a certain text string contained within the binary file with some other is not easy with chexedit as you need to know the corresponding binary binary value representing each text string character. I'm not a low level programmer, so I don't know the binary values of each keyboard character and hence my competence came to the point where I can substitute the text string I wanted with some unreadable characters by simply filling all my text string with AA AA AA AA values... chexedit on Debian is packaged under a deb ncurses-hexedit. Hence to install it on Deb run: debian:~# apt-get --yes install ncurses-hexedit... Further on the binary to run chexedit on binary contained within ncurses-hexedit is: debian:~# hexeeditor 3. Hex Editting on BSD and Linux with hte Just after trying out chexedit, I've found about the existence of one even more sophisticated hexeditor console program available across both FreeBSD and Linux. The program is called hte (sounds to me a bit like the Indian word for Elephant "Hatti" :)) 3 / 14

hte is installable on Debian with cmd: debian:~# apt-get install ht On FreeBSD the port name is identical, so to install it I execed: freebsd# cd /usr/ports/editors/hte freebsd# make install clean... hte is started on Debian Linux (and presumably other Linux distros) with: $ hte On FreeBSD you need to run it with ht command: freebsd# ht You see how hte looks like in below screenshot: 4 / 14

ht has the look & feel like midnight commander and I found it easier to use than chexedit and hexeditor 4. hexer VI like interface for Linux As I was looking through the available packages ready to install, I've tried hexer debian:~# apt-get install --yes hexer... hexer does follow the same standard commands like VIM, e.g. i for insert, a for append etc. 5 / 14

It was interesting to find out hexer was written by a Bulgarian fellow Petar Penchev :) (Proud to be Bulgarian) http://people.freebsd.org/~roam/ - Petar Penchev has his own page on FreeBSD.org As a vim user I really liked the idea, the only thing I didn't liked is there is no easy way to just substitute a string within the binary with another string. 5. hexcurse another ncurses library based hex editor On Deb install and run via: debian:~# apt-get --yes install hexcurse debian:~# hexcurse /usr/bin/mc 6 / 14

hexcurse is also available on FreeBSD to install it use cmd: freebsd# cd /usr/ports/editors/hexcurse freebsd# make install clean... To access the editor functions press CTRL+the first letter of the word in the bottom menu, CTRL+H, CTRL+S etc. Something I disliked about it is the program search is always in hex, so I cannot look for a text string within the binaries with it. 6. ghex - Editting binary files in graphical environment If you're running a graphical environment, take a look at ghex. ghex is a gnome (graphical hex) editor.installing ghex on Debian is with: debian:~# apt-get --yes install ghex... To run ghex from terminal type: debian:~# ghex2 7 / 14

To install ghex on FreeBSD (and I assume other BSDs), install via port: freebsd# cd /usr/ports/editors/ghex freebsd# make install clean Gnome hex editor have plenty of tools, useful for developers to debug binary files. Some nice tools one can find are under the the menus: Windows -> Character Table This will show a complete list of each keyboard sent character in ASCII, Hex, Decimal, Octal and Binary 8 / 14

Another useful embedded tool in ghex is: Windows -> Type Convertion Dialog Note that if you want to use the Type Convertion Dialog tool to find the representing binary values of a 9 / 14

text string you will have to type in the letters one by one and save the output within a text file and later you can go and use the same editor to edit the text string within the binary file you like. I'm not a programmer but surely for programmers or people who want to learn some binary counting, this 2 ghex edmebbed tools are surely valuable. To conclude even though there are plenty of softwares for hex editting in Linux and BSD, none of them is not so easy to use as the old DOS hexdedit tool, maybe it will be a nice idea if someone actually rewrites the DOS tool and they package it for various free operating systems, I'm sure many people will find it helpful to have a 1:1 equivalent to the DOS tool. 7. Shed pico like interfaced hex editor For people, who use pico / nano as a default text editor in Linux shed will probably be the editor of choice as it follows the command shortcuts of picoon Deb based distros to install it run: debian:~# apt-get install --yes shed... Shed has no BSD port as of time of writting.8. Okteta a KDE GUI hex editor For KDE users, I found a program called okteta. It is available for Deb based Linuxes as deb to install it: debian:~# apt-get --yes install okteta 10 / 14

As of time of writting this article there is no okteta port for BSDs. Okteta has plenty of functions and even has more of a functions than ghexedit. Something distinctive for it is it supports opening multiple files in tabs. 9. lfhex a large file text editor lfhex is said to be a large (binary) file text editor, I have not tested it myself but just run it to see how it looks like. I don't have a need to edit large binary files too, but I guess there are people with such 11 / 14

requirements too :) To install lfhex on Debian: debian:~# apt-get install --yes lfhex lfhex has also a FreeBSD port installable via: freebsd# cd /usr/ports/editors/lfhex freebsd# make install clean 10. Bless a GUI tool for editting large hex (binary) files Here is the description directly taken from the BSD port /usr/ports/editors/bless Bless is a binary (hex) editor, a program that enables you to edit files asa sequence of bytes. It is written in C# and uses the Gtk# bindings for thegtk+ toolkit. To install and use ot on deb based Linuxes: debian:~# apt-get install --yes bless... On BSD installation is again from port: freebsd# cd /usr/ports/editors/bless freebsd# make install clean... 12 / 14

Something that makes bless, maybe more desirable choice for GUI users than ghex is its availability of tabs. Opening multiple binaries in tabs will be useful only to few heavy debuggers. 11. Ghextris - an ultra hard hacker tetris game :) For absolute, hacker / (geeks), there is a tetris game called ghextris. The game is the hardest tetris game I ever played in my life. It requires more than regular IQ and a lot of practice if you want to become really good in this game. To enjoy it: debian:~# apt-get --yes install ghextris 13 / 14

Powered by TCPDF (www.tcpdf.org) Walking in Light with Christ - Faith, Computing, Diary Unfortunately there is no native port of ghextris for BSD (yet). Anyhow, it can be probably run using the Linux emulation or even compiled from source. Well that's all I found for hexedit-ing, I'll be happy to hear if someone can give me some feedback on his favourite editor. 14 / 14