Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

sfk hexdump errors in 1.6.3 rev 2

0x00
2011-10-28
2013-01-06
  • 0x00
    0x00
    2011-10-28

    I'm trying to dump a range of bytes using a hexadecimal offset (n1) and  bytes (n2) however both fail unless I supply their decimal equivalences.

    C:\>sfk hexdump -offlen 0x1B5C 0xE "test.bin"[b]                  // Fails[/b]
    error: unexpected -offlen offset value: 0x00001B5C
    note : supply a value like 1000 500k 100m 5M [k=kbyte,m=mbyte]
    1 errors occurred.
    
    C:\>sfk hexdump -offlen 0x00001B5C 0xE "test.bin"[b]              // Fails[/b]
    error: unexpected -offlen offset value: 0x00001B5C
    note : supply a value like 1000 500k 100m 5M [k=kbyte,m=mbyte]
    1 errors occurred.
    
    C:\>sfk hexdump -offlen 7004 14 "test.bin"[b]                     // Works[/b]
    C:\test.bin :
     >FF550000 32000000 8C830100 5B4E0000< .U..2.......[N.. 00001B5C
    

    Also, for my specific needs I want to output a flat list of hex characters from offset n1 and only displaying n2 bytes. If I supply the "-pure" command switch when also specifying "-offlen" it completely ignores the -offlen switch and dumps the entire file.

    C:\>sfk hexdump -pure -offlen 7004 14 "test.bin"
    

    will dump the entire file instead of the specified range.

    This same bug occurs of i supply "-hexsrc" or "-decsrc" also.

     
  • stahlworks
    stahlworks
    2011-10-30

    Just fixed it, please try http://stahlworks.com/dev/sfk/sfk1634pre.zip and give feedback.
    If no further bugs are found, I'll make a full update.

     
  • 0x00
    0x00
    2011-10-31

    Great job! The fix works just as intended. A minor adjustment you could make to this revision would be to trim off the trailing comma from the stdoutput when you issue the "-hexsrc" or "-decsrc" switch.

    Also, I've seen in some other command line hex dump tools the ability to adjust the stdoutput column width. While for most, showing 16 bytes per line is pretty standard I think giving the user to ability to adjust the stdoutput's column width (with a new switch) would only make this utility that much more powerful.

    Thanks again for such a powerful tool that has really been /the/ go-to utility!

     
  • stahlworks
    stahlworks
    2011-11-01

    I added some options -notrail and -recsize, this required some code changes
    so please test again from http://stahlworks.com/dev/sfk/sfk1634pre.zip.
    -recsize is only for special formats like hex/decsrc, the default output
    with ASCII display can be extended to 32 chars by option -wide,
    which should be sufficent as larger lines than that cannot be displayed
    on a normal console window.

     
  • 0x00
    0x00
    2011-11-01

    Beautiful job! I've found to new switches you've added to be quite useful. So far with my limited testing of the newest build things seem to be working out quite well. Excellent work!