Divide Overflow2017-05-21T13:45:32+02:00http://divideoverflow.com/How to make Krusader run under different icon themehttp://divideoverflow.com/2017/05/Configuring_Krusader_to_use_different_icons_template/2017-05-21T00:00:00+02:00Divide Overflowhttp://divideoverflow.com/<p>I use Kubuntu with KDE5 Plasma. I didn't want to migrate from KDE3 to KDE4. The environment was providing me everything I required for programming, use, ..etc.
Same happened with the "upgrade" from KDE4 to KDE5. KDE5 to me is some new (but unneeded) visual changes, complete rewrite of the underlying code, a lot of new bugs to fight with.. :( I am going to document overcoming several issues with KDE5 and it's apps. This post is dedicated to best file manager under Linux - Krusader (guess I am staying under KDE for just a few of those apps: Krusader, Kmail (sadly no longer usable under KDE5, so had to switch to Claws Mail), Kate (as programming IDE) and Konsole as terminal).</p>
How to enable IPMI (KVM) access on OVH dedicated serverhttp://divideoverflow.com/2016/07/Configuring_IPMI_on_OVH_server/2016-07-06T00:00:00+02:00Divide Overflowhttp://divideoverflow.com/<p>I recently moved one of my dedicated servers to OVH (ovh.com). One of the features OVH offers is a KVM access to the server via web-console or Java applet JViewer.
Access can be requested from OVH control panel or via OVH API. There is an option to run SOL session (serial over lan) directly from the browser and connect to your server's serial port, which would be configured to access one of the ttys. The <a href="http://help.ovh.co.uk/IpmiSol">manual on the OVH site</a> is, however, outdated and provides incorrect instructions for properly configuring it...</p>
How to make SSMTP authenticate to Postfix with SSL certificatehttp://divideoverflow.com/2015/10/Making-SSMTP-authenticate-with-certificate-to-postfix/2015-10-16T00:00:00+02:00Divide Overflowhttp://divideoverflow.com/<p>I needed a simple mail delivery agent on my local machine to route all mails to my hosted mail server running Postfix.
To prevent open-relaying, in addition to SASL authentication, I maintain a list of IPs and netmasks for all clients who can simply connect and rely mail through it.
Together with 'smtpd_recipient_restrictions' setting this makes the job done:</p>
How to style Firefox Developer Edition (42.0a2) with GTK3 themeshttp://divideoverflow.com/2015/09/fixing-Firefox-developer-edition-for-GTK3-theme/2015-09-06T00:00:00+02:00Divide Overflowhttp://divideoverflow.com/<p>Recently Firefox Dev Edition switched to GTK3 from GTK2 and after the update I was very disappointed to realise that my GTK themes were no longer respected.
I am running KDE 4.12.2 on Ubuntu 12.04 with QtCurve theme and have all GTK2+ apps configured to use this theme too. It works nicely and I like the looks.</p>
<p>However, this new gtk3 Firefox having no themes configured looks very ugly.
There is a GTK icon in "System settings" which is supposed to let me set the theme for GTK3 as well as GTK2. Alas, it doesn't function / switch themes. There might be a mess-up in my KDE configuration after the years. I simply couldn't make it work.</p>
<p>Playing with GTK3 config files, trying to add GTK_RC_FILES in the environment, create ~/.config/gtk-3.0/settings.ini, /etc/gtk-3.0/settings.ini with theme name "gtk-theme-name = oxygen-gtk". Nothing seemed to work.</p>
<p>Then I decided to check which themes I have compatible with GTK-3 at all:</p>
<div class="highlight"><pre><code class="language-bash" data-lang="bash">$ find /usr/share/ -name <span class="s2">"gtk.css"</span>
/usr/share/themes/HighContrast/gtk-3.0/gtk.css
/usr/share/themes/oxygen-gtk/gtk-3.0/gtk.css
/usr/share/themes/Clearlooks-Phenix/gtk-3.0/gtk.css
/usr/share/themes/Adwaita/gtk-3.0/gtk.css
/usr/share/themes/LowContrast/gtk-3.0/gtk.css
/usr/share/themes/HighContrastInverse/gtk-3.0/gtk.css
</code></pre></div>
<p>Then, solution appeared to be very simple after running 'gtk3-widget-factory' under strace ;)</p>
<p>Everything in the directory containing all gtk-3.0 files should be copied to ~/.config/gtk-3.0/</p>
<p>No other setting to change - just place files there and it gets loaded perfectly by Firefox or any other GTK3 app! </p>
<p>Firefox looks good again.</p>
How to force Onkyo to update firmware to older or current versionhttp://divideoverflow.com/2015/05/how-to-update-onkyo-firmware-to-older-version/2015-05-17T00:00:00+02:00Divide Overflowhttp://divideoverflow.com/<p>Today I decided to finally root my current Onkyo firmware, but the system wouldn't update, as it considered this update is not a newer version.</p>
<p>After looking through file headers and disassembly of libupdater.so, I realised that it relies on filenames in header`s file tree to determine firmware version.</p>
<p>I thought this to be a pain in the ass to rewrite and re-calc CRC for every file and googled to see whether there is a way to force usb update. (At first I thought factory reset might be able to help). Fortunately, yes, it's possible just to force it via USB. (Strangely, I remember flashing same firmware numerous times without any issues when I was first experimenting with reversing Onkyo encryption a year ago).</p>
<p>Anyway, firmware files must be extracted <strong>to the root</strong> of USB drive.</p>
<p>Disconnect Ethernet/Wifi, just in case.</p>
<p>Insert USB drive. Hold 'USB' button and press 'ON/Standby'.</p>
<p>Message "[Enter] USB update" shall appear. Hit 'Enter' to start flashing.. wait and pray there is no electricity cut-off =)</p>
Update on Spotify Connect Protocol Reversinghttp://divideoverflow.com/2015/02/update_on_spotify_connect_protocol_reversing/2015-02-23T00:00:00+01:00Divide Overflowhttp://divideoverflow.com/<p>I receive many e-mails from people interested in my progress on reversing Spotify Connect and/or those who would like to continue with this task. Since it was taking me a while to reply to all of you, I decided to rather update this post to reflect this project`s status.</p>
<p>As mentioned in the comments of my original post - <strong>I stopped working on this soon after Onkyo released support for my music receiver.</strong> Sorry! It is an interesting challenge and if I had plenty of time (as I had in my student years;) I would be probably making it happen.. But now I am satisfied with the availability of support for Spotify Connect in my devices and after working for about 36 hours in total on reversing this library, I just abandoned it for good.</p>
<p>(Tip: From what I've learned looking at the code, the library is still using lots of code for authentication, encryption and communication with Spotify servers identical or just slightly different to despotify or <a href="https://gitorious.org/libopenspotify/">https://gitorious.org/libopenspotify/</a>)</p>
<p>I receive e-mails from those interested to obtain the library`s binary.</p>
<p>Well, I got my copy of libspotify_embedded.so from Powernode speakers firmware.</p>
<p>This library is of no help standalone since no function calls are documented and it also need it's parent, called sovi-spotify, which acts as a controlling process between the library and speakers` Perl environment.
You need to re-create the whole environment before you'd be able to attempt to analyse it's logic.
If you grab that firmware you'll soon find out that all .pl files are encrypted. I'll leave it to you to find out how to decrypt them as this is should be a rather simple task for anyone thinking to attempt reversing Spotify connect.</p>
<p>Alternatively, you can get libspotify_embedded.so from Onkyo firmware using my extractor. I haven't had time to study how it's used there, but I estimate it has an easier deployment than with Powernode.</p>
<p><strong>And finally, I do hope Spotify releases Connect as a part of their SDK. It's just about time!</strong></p>
Reversing Spotify Connect protocolhttp://divideoverflow.com/2014/08/reversing-spotify-connect/2014-08-05T00:00:00+02:00Divide Overflowhttp://divideoverflow.com/<p><a href="https://github.com/mopidy/mopidy-spotify/issues/14">Spotify has been promising for months now</a> to release "Spotify Connect" as a part of libspotify. Instead, they are steadily striking "exclusive deals" with one manufacturer after another (called "Spotify Partners") but knowingly ignore "Spotify Customers" like me, with slightly older hardware, but who might have been more loyal to Spotify then any new hardware buyers, loyal customers who are now desperately locked waiting for improbable firmware updates..</p>
<p>Onkyo also promised to add Spotify Connect to it's receivers line (specifically they mentioned NR-636 model). I have a sour feeling that my NR-626 model, bought just in October 2013, is not going to be supported (even though it is fully capable to).</p>
<p><em>Such marketing sucks ass.</em> I already decided that I am not going to choose Onkyo for my next amp upgrade. And I might switch away from Spotify after paying them for 3 years too.</p>
<p>So yeah, fuck them - I'll do this stuff myself. </p>
<p>I was able to extract Spotify Connect implementation from one speakers manufacturer firmware, finally! (won't mention names for obvious reasons ;-).</p>
<p>So I am reverse-engineering Spotify Connect at the moment and it doesn't seem too hard. It is a relatively-simple protocol. Much simplier than what libspotify does.</p>
Running custom firmware on Onkyohttp://divideoverflow.com/2014/04/running-custom-firmware-on-onkyo/2014-04-23T00:00:00+02:00Divide Overflowhttp://divideoverflow.com/<p>I am happy to report that my Onkyo TX-NR626 is now properly owned ;-)</p>
<p>Custom firmware was packed, encrypted, flashed with crossed fingers and works perfectly!</p>
<p><img src="/assets/img/flashing-completed.jpg" alt="Firmware flashing completed!"></p>
Decrypting ONKYO firmware fileshttp://divideoverflow.com/2014/04/decrypting-onkyo-firmware-files/2014-04-16T00:00:00+02:00Divide Overflowhttp://divideoverflow.com/<p>This post relates to ONKYO TX-NR626. However, firmwares for other models seem to have similar encryption algorithm and should be well supported by the tool (Yes, I've tested it on some).</p>
<p>#Preamble</p>
<p>I bought this model of Onkyo receiver mostly for it's network capabilities, especially for Spotify support. Alas, the interface to control receiver remotely (the one running on port 60128) is pretty cumbersome and leaves much better to desire for. Network functions are painfully slow to my taste and it's not possible to use all Spotify features (even though libspotify.so developer library, which Onkyo embeds, exposes more functionality). Besides that, having a network device running Linux with no shell access to it makes me experience extreme consumer outrage :-) All that resulted in this quest to root the box and possibly make custom modded firmware.</p>
Evaluating Remote Javascript with CasperJshttp://divideoverflow.com/2014/04/evaluating-javascript-with-casperjs/2014-04-04T00:00:00+02:00Divide Overflowhttp://divideoverflow.com/<p>I needed to retrieve evaluated Javascript object from a remote page. The code on the page looked like this:</p>
<div class="highlight"><pre><code class="language-javascript" data-lang="javascript"><span class="o"><</span><span class="nx">script</span> <span class="nx">language</span><span class="o">=</span><span class="s2">"Javascript"</span> <span class="nx">type</span><span class="o">=</span><span class="s2">"text/javascript"</span><span class="o">></span>
<span class="kd">var</span> <span class="nx">XXXGen</span> <span class="o">=</span> <span class="kd">function</span><span class="p">(</span><span class="nx">options</span><span class="p">){</span>
<span class="o">!</span><span class="nx">options</span> <span class="o">&&</span> <span class="p">(</span><span class="nx">options</span> <span class="o">=</span> <span class="p">{});</span>
<span class="k">this</span><span class="p">.</span><span class="nx">url</span> <span class="o">=</span> <span class="s1">''</span><span class="p">;</span>
<span class="k">this</span><span class="p">.</span><span class="nx">options</span> <span class="o">=</span> <span class="nx">options</span><span class="p">;</span>
<span class="p">....</span>
<span class="p">};</span>
<span class="p">...</span>
<span class="kd">var</span> <span class="nx">gen</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">XXXGen</span><span class="p">({</span>
<span class="nx">trackuri</span><span class="o">:</span> <span class="s1">'some.uri'</span><span class="p">,</span>
<span class="nx">campaignId</span><span class="o">:</span> <span class="mi">000000</span><span class="p">,</span>
<span class="nx">programs</span><span class="o">:</span> <span class="p">[{</span><span class="s2">"key"</span><span class="o">:</span><span class="s2">"123"</span><span class="p">,</span><span class="s2">"value"</span><span class="o">:</span><span class="s2">"345"</span><span class="p">},</span> <span class="p">{.....}]</span>
<span class="p">});</span>
</code></pre></div>
Reversing Dynadot two-factor token authenticationhttp://divideoverflow.com/2014/03/reversing-dynadot-two-factor-auth/2014-03-27T00:00:00+01:00Divide Overflowhttp://divideoverflow.com/<p>So I was reading another scary post how someone`s domain was stolen and blah blah blah it is time to enable 2-factor auth at your domain registrar (and if it doesn't support it, find a better one). I’ve checked mine, a couple of those I use, and it seems <a href="http://www.dynadot.com">Dynadot</a> was a good fit to use two-factor with and move most important domains to be hosted there.</p>
<p>To enable 2-factor auth on dynadot.com, I clicked through my account settings and found the menu: “Dynadot Token Authentication for iPhone/Android”. Hmm.. why only iPhone/Android?</p>
Annoyed by Airbnbhttp://divideoverflow.com/2014/03/annoyed-by-airbnb/2014-03-11T00:00:00+01:00Divide Overflowhttp://divideoverflow.com/<p>I've used Airbnb with a moderate success in some countries and with a very poor experience in the others. There seems to be a major disbalance between people who professionally rent their properties and between many 'show-offs' who list their lavish, designer flats and attach price tags seemingly only to satisfy own egos and/or make a quick buck on the side, while at the same time having least ability or desire to rent their nest out. It seems to many, once things get serious and someone is asking for staying at their apartments, they have nowhere to live themselves and have to decline guest offers most of the time. Then - there are professional letting services who create personal profiles on Airbnb and bulk-list all their flats as availble just to attract custom and start offering something else instead, usually totally out of preferences, which is also highly annoying.</p>