{"id":21982548,"url":"https://github.com/ideal/dhex","last_synced_at":"2025-03-23T01:28:17.811Z","repository":{"id":137751689,"uuid":"154429939","full_name":"ideal/dhex","owner":"ideal","description":"dhex (http://www.dettus.net/dhex/) with some bug fixes ","archived":false,"fork":false,"pushed_at":"2018-10-29T11:52:13.000Z","size":64,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-28T04:43:57.327Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ideal.png","metadata":{"files":{"readme":"README.txt","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-24T02:58:31.000Z","updated_at":"2021-08-16T04:09:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"7be9ef6d-8bea-4187-8bee-a89f4d8233ab","html_url":"https://github.com/ideal/dhex","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ideal%2Fdhex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ideal%2Fdhex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ideal%2Fdhex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ideal%2Fdhex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ideal","download_url":"https://codeload.github.com/ideal/dhex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245043255,"owners_count":20551758,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-29T17:28:43.189Z","updated_at":"2025-03-23T01:28:17.794Z","avatar_url":"https://github.com/ideal.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"-----------------------------------------------------------------[ 0. Welcome ]-\n\nThank you for downloading dhex 0.67. It is a hex editor with a diff mode.\nSince it is based on ncurses, it runs in any console.\nIt makes heavy use of colors, but it is themeable to run on monochrome-displays\nas well.\n\nIf you have any questions, or found any bugs, please do not hesitate to contact\nme under dettus@dettus.net. Be sure to include \"DHEX\" somewhere in the subject.\n\n\nThomas Dettbarn, 30-Dec-2010\n\n0.60: Initial release\n0.61: Some code cleanup, rudementary manual correlation is possible through \n      commandline parameters\n0.62: Code cleanup, bug fixes, and as new features: bookmarks and ascii-search.\n0.63: Man pages were written, searching is possible from the command line.\n0.64: Naive correlation, a new default theme\n0.65: dhex 0.64 crashed at startup on some systems.\n0.66: searching for an ascii string with spaces works, some problems with the\n      color themes were fixed\n0.67: a \"base address\" functionality was added, which makes it easier to work\n      with memory dumps.\n0.68: slight bug fix as suggested by christoph: under some circumstances, the\n      opening of a file could segfault. \n\n---------------------------------------------------------[ 1. Getting started ]-\n\nDownload the latest version from http://www.dettus.net/dhex/dhex_latest.tar.gz.\nUnpack it,\n\n% tar xvfz dhex_latest.tar.gz\n\nthen compile it\n\n% make\n\nThis should produce an executable. It requires a file as a paramter to start\n\n% ./dhex gpl.txt\n\nWhen starting for the first time, dhex will attempt to create a .dhexrc file \nin your $HOME-directory. If you already have a .dhexrc from an older version of\ndhex, it will convert it. \n\n\nThe first screen you'll see will be the keyboard setup. (I was not satisfied \nwith the way ncurses handled the function keys, so i created something new)\nThe keyboard setup will be written into the .dhexrc file.\n\n\nYou can edit the file, search for short strings in it, and scroll through it.\nAfter pressing F10 (or whichever key you pressed instead of F10 during the \nkeyboard setup), dhex will ask you whether or not to save the changes.\n\n\nTo invode the keyboard setup manually, just start dhex with the parameter -k\n\n% ./dhex -k gpl.txt\n\n\n\n---------------------------------------------------------------[ 2. Diff mode ]-\n\n\nWhen you run dhex with two files, \n\n% ./dhex gpl.txt dhex\n\nit will start in the diff mode. This is useful for file comparison. Any \ndifference in the files will be highlighted. To jump from one difference to \nthe next, press F3. To go to the previous one, press F4.\n\n\n--------------------------------------------------------------------[ 3. Goto ]-\n\nPressing F1 will open up the \"Goto\" dialog. Here you have three possibilities:\nPressing = will set the cursor to the absolute address you're about to type in,\nPressing + will advance the cursors those many bytes,\nPressing - will go back those many bytes.\n\nPress \"Go\" to set the cursor, or \"Cancel\" to quit the dialog.\n\n\nMoreover, you can set up to ten bookmarks here. And save them for later use.\n\n\n\n---------------------------------------------------------------[ 4. Searching ]-\n\nWhen not in diff mode, pressing F2 will invoke the \"Search\" dialog. You can\nsearch forward or backward. When selecting the \"Writelog\" option, you'll have\nto provide a filename to write the search results to. \nLater, when you select the \"Readlog\" option, it'll read the cursor positions \nwhere to search from this file. Otherwise dhex will search the whole file.\n\nWhen not selecting the \"Writelog\" option, the search dialog will immediately\nclose upon finding the first occuracnce, and set the cursor there.\n\nPress F3 to go to the next occurace, or F4 to the previous one.\n\nSearching is also possible from the command line: Simply apply the -sa, -sab, \n-sh, -shb parameters. To write into a searchlog, -w is the parameter to go. To \nread from it, -r can be used. For example\n\n% ./dhex -oh affe -shb d00f dhex\n\nsets the cursor to 0xaffe, and searches for the hex string \"d0 0f\" backwards \nfrom there.\n\n% ./dhex -oh affe -shb d00f -w occurances.log dhex \n\nwrites the results into a logfile called \"occurances.log\" and exits.\n\n-----------------------------------------------------------------[ 5. Hexcalc ]-\n\nPressing F5 will open up the hexcalc dialog. This is a small 64-bit calculator.\nSimply type in a value in one of the formats \"decimal\", \"hexadecimal\" or\n\"binary\", chose an operation, press ENTER and see the results.\nYou can select any former result by going up a few lines with the cursor keys.\n\n\n\n------------------------------------------------------------[ 6. config-files ]-\n\nThe default config file is $HOME/.dhexrc. Another config file can be chosen\nwith the -f option:\n\n% ./dhex -f /etc/globaldhexrc gpl.txt\n\nBasically, a config file is broken down into two sections: Colors and keyboard\nconversion tab. The default config file on a MacBook looks like this:\n\nDHEXCOLORSCHEME\n#VERSION 0\n#possible colors are: BLACK,GREEN,GREEN,YELLOW,BLUE,MAGENTA,CYAN,BLACK\n#possible extra flags are: UNDERLINE,REVERSE,BLINK,DIM,BOLD\n\nBRACKETS:       FG=BLACK,BG=BLACK,BOLD\nHEXFIELD:       FG=WHITE,BG=BLACK\nINPUT:          FG=BLACK,BG=WHITE\nCURSOR:         FG=WHITE,BG=BLACK\nTEXT:           FG=WHITE,BG=BLACK,BOLD\nMENU_NORMAL:    FG=CYAN,BG=BLACK\nMENU_HIGHLIGHT: FG=BLACK,BG=CYAN\nMENU_HOTKEY:    FG=YELLOW,BG=BLACK,BOLD\nMENU_HOTKEY_HI: FG=YELLOW,BG=CYAN,BOLD\nFRAME:          FG=BLUE,BG=BLACK,BOLD\nNORMAL_DIFF:    FG=YELLOW,BG=BLACK\nCURSOR_DIFF:    FG=YELLOW,BG=WHITE,BOLD\nHEADLINE:       FG=BLUE,BG=BLACK,BOLD\n\t\nKEYF1:c2 a1 \nKEYF2:e2 84 a2 \nKEYF3:c2 a3 \nKEYF4:c2 a2 \nKEYF5:e2 88 9e \nKEYF6:c2 a7 \nKEYF7:c2 b6 \nKEYF8:e2 80 a2 \nKEYF9:c2 aa \nKEYF10:c2 ba \nKEYESC:1b \nKEYBACKSPACE:08 \nKEYDEL:1b \nKEYENTER:0a \nKEYTAB:09 \nKEYUP:1b 5b 41 \nKEYDOWN:1b 5b 42 \nKEYRIGHT:1b 5b 43 \nKEYLEFT:1b 5b 44 \nKEYPGUP:02 \nKEYPGDOWN:06 \nKEYHOME:5e \nKEYEND:24 \n\n(Actually, in this example ALT+1, ALT+2, ALT+3,... ALT+0 were used instead of \nF1..F10) You can edit it with any texteditor you like.\n\n\n\n--------------------------------------[ 7. Correlating two files in diff mode ]-\n\nLets assume you would like to compare two files. One of those files starts with\ngarbage at the beginning:\n\n  file1: GARBAGE0123456789ABCDEF\n  file2:        0123456789ABCDEF\n\nGARBAGE has 7 letters, so to skip over the first 7 bytes in the first file, just\napply the following paramters:\n\n% dhex -o1d 7 file1 file2\n\n-o sets the cursor offset. -o1 means that the first buffer is affected. -o1d \ngives the radix for the offset. it can either be -o1d for decimal, -o1b for\nbinary, -o1h for hexadecimal or -o1o for octal.\n\nIf the garbage is in the second file, just use\n\n% dhex -o2d 7 file1 file2\n\nSince version 0.64 there is also a way of doing this automatically: Pressing\nF6 in the GUI will open up a dialog where you can select one of three\ncorrelation algorithms. They are painfully slow, but they'll do the job.\nThose three algorithms are:\n\n- best match\n  move the two files in such a way that as many bytes match as possible\n- longest match\n  move the two files in such a way that as many consecutive bytes match as\n  possible\n- minimum diff\n  move the two files in such a way that as little bytes differ as possible. This\n  algorithm requires an upper limit to improve its speed.\n\nTo invoke correlation from the command line, use one of these\n\n% dhex -cb file1 file2  # best match\n% dhex -cl file1 file2  # longest match\n% dhex -cd 1000 file1 file2 # minimum difference, with the upper limit of 1000.\n  \n\n\n--------------------------------------------------------------[ 8. Disclaimer ]-\n\nThis program is free software; you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation; either version 2 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program; if not, write to the Free Software\nFoundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\n\n\n--------------------------------------------------------------[ 9. Known bugs ]-\n\n- Searching has not been thourughly tested.\n- Code is not clean (yet)\n- Searching is only possible in normal mode, not diff mode\n- Searching ignores unsaved changes.\n- Some features are missing\n- -k expects a file to be opened\n- -f might overwrite ANY file.\n- GOTO can jump way behind the end of the file\n- some ways of exiting won't free all the allocated buffers\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fideal%2Fdhex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fideal%2Fdhex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fideal%2Fdhex/lists"}