Bof.

No theme, no regular posting.

Archive

© 2014-2023. Raphaël Rigo CC-BY-SA 4.0

About.

High DPI screen on Linux.

I recently received a high-DPI screen at work (24” ultra HD). While the quality is excellent, a few problems arise as everything is very small by default.

As I use it on my laptop, I had to find an easy way to switch between different settings :

  • high DPI for my UHD screen
  • medium DPI when using the laptop screen (12” Full HD)
  • normal DPI when using a normal external screen

First, to handle the display configuration I’m using autorandr which is awesome.

Then, I use a little bash script that will change the needed settings :

  • cursor size
  • font size in awesome
  • layout.css.devPixelsPerPx setting in Thunderbird and Firefox

But some things still won’t work :

  • Chrome
  • Flash
  • Java
  • Windows XP (in my virtual machine)

You can find my ugly shell script here.

Automated BinDiff.

Sometimes it can be useful to automate IDA by running it from the command line (reference). You can do the same with BinDiff but it is not as easy. You must use a custom IDC script that will call the BinExport plugin :

    #include <idc.idc>
    static main() {
      Batch(0);
      Wait();
      RunPlugin( "zynamics_binexport_5", 2 );
      Exit(0);
    }

You can then run it from the CLI : idaq.exe -A "-OExporterModule:<OUTPATH>" "-SBinExport.idc" "XXX.idb"
Be careful : ALL paths MUST be full paths.

You can then use BinDiff command line tools to compare binaries. It is particularly useful to compare directory trees, for example after a firmware update :)

Update for recent versions of IDA/BinExport, replace zynamics_binexport_5 with binexport10 in the script above and run using:

$ida -Llog -A "-OBinExportAutoAction:BinExportBinary" "-OBinExportModule:$dest/" "-Smybinexport.idc" "$1"

So, I have a blog.

Sometimes it’s nice to have a place to post random stuff on the Internet. So, embracing modernity in 2014, I now have a blog.