Sneak Preview

These letters. Such announcement. Many words.

In the next few days I will publish two – not one – but two articles on how to approach a problem on how to reverse engineer protocols. There have been to applications I looked into to code a library for my home uses.

#1 – MC3000 Charger

MC3000_Charger provides an USB and Bluetooth (BT) interface (Spoiler: I am not covering the BT interface. Not yet). The USB interface is used to update the firmware and to program and interact with the charger during charging.

The Windows software provided by SkyRC can program each slot individually to support different types of batteries with different charging capacities.

As a result of my analysis, and this will be one of the upcoming articles, I reversed the application and wrote a Python library. To do so I dissected a .NET application. So no big magic here!

#2 – LW12 WiFi LED Controller

This was a tricky one. It is a low budget Chinese WiFi LED controlled with a mobile app. The Android app I looked at was encrypted using a separate VM layer on-top of the Dalvik engine. (Spoiler: No need to reverse this, and I did not do it.)

Sometimes there are simpler solutions. This is what the second article will be about.

The controller itself comes by many names: Foxnovo and I remember buying it as a Lagute.

KTHXBYE.

Are you a believer?

There are articles out there talking about the useless usage of dd and why cat is better. Cat is faster because it automatically adjusts the blocksize and dd is slow because it internally only works with 512 byte blocks. This and That.

I did some simple tests with time, dd and cat, added some obscure parameters to dd, because cat is better.

Testing dd with status and specific blocksize

 $ time dd if=/dev/sdd of=test.dd status=progress bs=8M
 15921577984 bytes (16 GB, 15 GiB) copied, 878 s, 18.1 MB/s 
 1899+1 records in
 1899+1 records out
 15931539456 bytes (16 GB, 15 GiB) copied, 879.018 s, 18.1 MB/s

 0.04s user 23.33s system 2% cpu 14:39.03 total

Testing dd

 $ dd if=/dev/sdd of=test.dd 
 31116288+0 records in
 31116288+0 records out
 15931539456 bytes (16 GB, 15 GiB) copied, 869.783 s, 18.3 MB/s
 16.13s user 159.22s system 20% cpu 14:29.80 total

Testingcat with pv

 $ time cat /dev/sdd | pv > test.raw
 14.8GiB 0:14:43 [17.2MiB/s] [        <=>                            ]
 0.28s user 25.84s system 2% cpu 14:43.18 total

Testing cat

 $ time dd if=/dev/sdd of=test.dd status=progress bs=8M
 15921577984 bytes (16 GB, 15 GiB) copied, 878 s, 18.1 MB/s 
 1899+1 records in
 1899+1 records out
 15931539456 bytes (16 GB, 15 GiB) copied, 879.018 s, 18.1 MB/s

 0.04s user 23.33s system 2% cpu 14:39.03 total

Testing dd

 $ dd if=/dev/sdd of=test.dd 
 31116288+0 records in
 31116288+0 records out
 15931539456 bytes (16 GB, 15 GiB) copied, 869.783 s, 18.3 MB/s
 16.13s user 159.22s system 20% cpu 14:29.80 total

Testing catwith pv

 $ time cat /dev/sdd | pv > test.raw
 14.8GiB 0:14:43 [17.2MiB/s] [        <=>                            ]
 0.28s user 25.84s system 2% cpu 14:43.18 total

Testing cat

 $ time cat /dev/sdd > test.raw
 0.18s user 21.21s system 2% cpu 14:42.25 total

Y U DO IT WRONG

Somehow my cat is not as fast as dd.

KTHBYE