Binary file visualizer (upd. 2018-07-08) - General Discussion and Assistance - CHDK Forum supplierdeeply

Binary file visualizer (upd. 2018-07-08)

  • 3 Replies
  • 4604 Views
*

Offline srsa_4c

  • ******
  • 4451
Binary file visualizer (upd. 2018-07-08)
« on: 05 / January / 2016, 18:47:33 »
Advertisements
I've been using (and recommending) a utility named Hexplorer and its "pixel view" for visualization purposes. Finally got fed up with its awful UI and decided to write a utility solely for this purpose.
Win32 binary and source (Lazarus + FPC  :-[) attached.
The exe needs to be placed to a writable location as it will save its .ini file there. In addition to Windows, it does work on current Wine (I actually developed it on Wine).
I hope that the UI is straightforward enough.
The features are rather basic. It is meant to be fed with a RAM dump.

https://www.virustotal.com/en/file/f31ec6c8513ca469a54d72890092d05883ecb4aa45aa59ad65bc8715f0e99827/analysis/1451938940/

Update 2018-07-08

- Low bitdepth modes are visualized differently (palette support is still missing).
- Added 4, 2, 1 bit/pixel modes

Built using Lazarus 1.8 and FPC 3.0.4.
The attached binary produces 2 detections on VirusTotal. Use it at your own risk or build from source.


History
binview_exe_win32.7z (691.02 kB - downloaded 68 times.)
binview_src_160104.7z (69.86 kB - downloaded 25 times.)
« Last Edit: 08 / July / 2018, 16:34:31 by srsa_4c »

*

Offline reyalp

  • ******
  • 14000
Re: Binary file visualizer
« Reply #1 on: 13 / February / 2016, 00:49:53 »
Very useful, thanks :)
Don't forget what the H stands for.

*

Offline Ant

  • *****
  • 509
Re: Binary file visualizer
« Reply #2 on: 11 / September / 2016, 09:39:05 »
I've added support for 14 bit raw buffers:
Code: [Select]
function getpixel_14bitraw(args: Pgpargs):TBGRAPixel;
var
  uy: UInt32;
begin
  if args^.bsp>=args^.lim then begin
    Integer(Result):=0;
    Exit;
  end;
  case args^.bsp mod 8 of
    0: begin
      uy:=(UInt32(         ((args^.pbuf+1)^)<<6)  or UInt32((args^.pbuf+0)^ div 4));
    end;
    1: begin
      uy:=(UInt32($03 and (((args^.pbuf+0)^)<<12)) or UInt32(((args^.pbuf+3)^)<<4) or UInt32((args^.pbuf+2)^ div 16));
    end;
    2: begin
      uy:=(UInt32($0f and (((args^.pbuf+2)^)<<10)) or UInt32(((args^.pbuf+5)^)<<2)  or UInt32((args^.pbuf+4)^ div 64));
    end;
    3: begin
      uy:=(UInt32($3f and (((args^.pbuf+4)^)<<8)) or UInt32((args^.pbuf+7)^ ));
    end;
    4: begin
      uy:=(UInt32(         ((args^.pbuf+6)^)<<6)  or UInt32((args^.pbuf+9)^ div 4));
    end;
    5: begin
      uy:=(UInt32($03 and (((args^.pbuf+9)^)<<12)) or UInt32(((args^.pbuf+8)^)<<4)  or UInt32((args^.pbuf+11)^ div 16));
    end;
    6: begin
      uy:=(UInt32($0f and (((args^.pbuf+11)^)<<10)) or UInt32(((args^.pbuf+10)^)<<2)  or UInt32((args^.pbuf+13)^ div 64));
    end;
    7: begin
      uy:=(UInt32($3f and (((args^.pbuf+13)^)<<8)) or UInt32((args^.pbuf+12)^ ));
      args^.pbuf+=14;
    end;
  end;
  UInt32(Result):=uy;
  args^.bsp+=1;
end;
Who will post the binary?

*

Offline srsa_4c

  • ******
  • 4451
Re: Binary file visualizer
« Reply #3 on: 11 / September / 2016, 10:36:15 »
I've added support for 14 bit raw buffers:
Thx for the contribution. Source and win32 binary (virustotal) attached.


 

Related Topics