sudofox's journal

Austin Burk's journal, where I share little snippets of my writing, code, and dreams.

motemen puzzle

I became curious about id:motemen's profile image today. Is it a puzzle?

f:id:austinburk:20180817095930p:plain

What if we interpret each color as an HTML color code?

#BCCFDE #FCFFF5 #15357C #9AA6B8
#754826 #FEDBCE #F6BFAE #D32925
#9AA2B8 #FDBCB0 #FDAA9A #DB6055
#A4AAAE #30363C #481E11 #4F5054
aburk@aburk:~/Research/motemen-puzzle$ file motemen.png 
motemen.png: PNG image data, 400 x 400, 8-bit/color RGBA, non-interlaced
aburk@aburk:~/Research/motemen-puzzle$ cat color_codes.txt 
#BCCFDE #FCFFF5 #15357C #9AA6B8
#754826 #FEDBCE #F6BFAE #D32925
#9AA2B8 #FDBCB0 #FDAA9A #DB6055
#A4AAAE #30363C #481E11 #4F5054

But which order is it in?

Left to right, then top to bottom
aburk@aburk:~/Research/motemen-puzzle$ cat color_codes.txt | tr -d "#" |tr -d " "|tr -d "\n"|xxd -r -p|xxd
00000000: bccf defc fff5 1535 7c9a a6b8 7548 26fe  .......5|...uH&.
00000010: dbce f6bf aed3 2925 9aa2 b8fd bcb0 fdaa  ......)%........
00000020: 9adb 6055 a4aa ae30 363c 481e 114f 5054  ..`U...06<H..OPT

That doesn't resemble anything particularly useful.

Top to bottom, then left to right
aburk@aburk:~/Research/motemen-puzzle$ for position in $(for word in $(seq 1 4); do echo $word; done); do awk -v position="$position" '{print $position}' color_codes.txt ; done|tr -d '#'|tr -d '\n'
BCCFDE7548269AA2B8A4AAAEFCFFF5FEDBCEFDBCB030363C15357CF6BFAEFDAA9A481E119AA6B8D32925DB60554F5054

Hm..

aburk@aburk:~/Research/motemen-puzzle$ for position in $(for word in $(seq 1 4); do echo $word; done); do awk -v position="$position" '{print $position}' color_codes.txt ; done|tr -d '#'|tr -d '\n'|xxd -r -p|xxd
00000000: bccf de75 4826 9aa2 b8a4 aaae fcff f5fe  ...uH&..........
00000010: dbce fdbc b030 363c 1535 7cf6 bfae fdaa  .....06<.5|.....
00000020: 9a48 1e11 9aa6 b8d3 2925 db60 554f 5054  .H......)%.`UOPT

Clearly I will get the same 3-byte words here, no matter which way I read it. We have 48 bytes from the color codes - this is not a power of 2. Could it be a hash?

I looked up the hash functions that would produce a 48-byte hash.

The only hash function that I can find that produces a 48-byte hash is SHA-384.

Let's write a quick script we can use to test it out:

#!/usr/bin/env perl
# Sudofox - motemen puzzle tester

if (!@ARGV) {
    print "Usage: ./generate.pl <48 bytes of hex>\n";
    exit();
}
my $hex        = $ARGV[0];
my @colorCodes    = unpack("(A6)*", $hex);

print <<'HTML';
<style>
.motemen-cell { width: 50px; height: 50px; word-break:break-all; text-transform: uppercase; font-size:21px; text-align: center; font-family:monospace; line-height:initial;}
.motemen-holder { display: flex; flex-wrap:wrap; width: 200px;}
</style>

<div class="motemen-holder">
HTML
foreach my $color(@colorCodes) {
    print '<div class="motemen-cell" style="background-color: #' .$color. ';">'.$color.'</div>';
}
print "</div>\n";

First, the original image:

f:id:austinburk:20180817095930p:plain

How about "motemen"?

printf motemen|sha384sum|awk '{print $1}'|xargs ./generate.pl
a2acaa
da0a3a
20c41e
b28a08
9c510b
59280d
d2b967
5e9454
dda0bf
4fc087
29cb61
960a7a
cec04c
637bde
f1b95f
a8e7e5

I tried the following:

  • Hatena
  • hatena
  • Hironao OTSUBO
  • (motemen's publicly-listed email address)
  • Hiragana: ひろなおオツボ

However, none of these produced a matching image.

My next thought is "brute-force". We can pull a bunch of webpages related to motemen: github code, HTML, bios, et cetera, and then extract all words from it as tokens. We can then check if a substring of the SHA-384 hash contains one of the sections of 3-byte HTML color-codes.

Unfortunately, I had very little luck finding an effective way of extracting words from HTML documents as tokens. I tried HTML::Extract, HTML::Treebuilder, and HTML::TokeParser, but had very little success.

I had an idea, though! There's another source of keywords, right from Hatena!

Hatena Keyword Documentation

It comes in EUC-JP, but everyone uses UTF-8, come on..

First, there's some weird encoding things we need to fix up since it seems a bit broken.

aburk@aburk:~$ cat keywordlist_furigana.csv|tr '\t' '\n' > a.csv; iconv a.csv -f EUC-JP -t UTF-8//IGNORE|sort|uniq > b.csv
aburk@aburk:~$ wc -l b.csv
337408 b.csv

Now, let's try each against our two different ways of reading the colorcodes.

#!/bin/bash
# Motemen Puzzle Tester


function test_word () {
    COMBO1="bccfdefcfff515357c9aa6b8754826fedbcef6bfaed329259aa2b8fdbcb0fdaa9adb6055a4aaae30363c481e114f5054"
    COMBO2="bccfde7548269aa2b8a4aaaefcfff5fedbcefdbcb030363c15357cf6bfaefdaa9a481e119aa6b8d32925db60554f5054"
    INPUT=$1

    if [[ $COMBO1 == $(echo $INPUT|sha384sum|awk '{print $1}') || $COMBO2 == $(echo $INPUT|sha384sum|awk '{print $1}') ]]; then
        echo "MATCH: $INPUT";
    fi
}

while read line
do
    test_word "$line";
done

This turned out to be way too slow, so I converted the list of keywords into a list of hashes instead.

aburk@aburk:~/Research/motemen-puzzle$ grep bccfdefcfff515357c9aa6b8754826fedbcef6bfaed329259aa2b8fdbcb0fdaa9adb6055a4aaae30363c481e114f5054 ~/b_hashed.txt
aburk@aburk:~/Research/motemen-puzzle$ grep bccfde7548269aa2b8a4aaaefcfff5fedbcefdbcb030363c15357cf6bfaefdaa9a481e119aa6b8d32925db60554f5054 ~/b_hashed.txt
aburk@aburk:~/Research/motemen-puzzle$ grep bccfde ~/b_hashed.txt
5f5ec82739f9daba961803aab4d6f78382c0c5b4e519994e98bcd1c3589f31a95bccfde25fab41cffe92e730d080c743
9902899010abde2bcd5aea716c2ffa284639fbe22e3843f7a9f0d53bb1bbccfdeedf0b85c23685ba52f4debdce0f17b9
be1ebeb4a84d65f467e2e5545ab0991dfbccfdec7d5c80292210570a2f186cf1801c3cdb6a4478856011a162991e82fe
c637e83f6e129054270ce1ae97ab24a0260526a4fc57d60c87da7fb94bccfde319d07b4ac26aee1b2d68208b530497b0
aburk@aburk:~/Research/motemen-puzzle$ grep bccfde ~/b_hashed.txt --color
5f5ec82739f9daba961803aab4d6f78382c0c5b4e519994e98bcd1c3589f31a95bccfde25fab41cffe92e730d080c743
9902899010abde2bcd5aea716c2ffa284639fbe22e3843f7a9f0d53bb1bbccfdeedf0b85c23685ba52f4debdce0f17b9
be1ebeb4a84d65f467e2e5545ab0991dfbccfdec7d5c80292210570a2f186cf1801c3cdb6a4478856011a162991e82fe
c637e83f6e129054270ce1ae97ab24a0260526a4fc57d60c87da7fb94bccfde319d07b4ac26aee1b2d68208b530497b0
aburk@aburk:~/Research/motemen-puzzle$ grep bccfde ~/b_hashed.txt --color|grep fcfff5

Alas, I was once again unsuccessful. At this point, I'm going to guess that it's not a puzzle! But, I did give it my best shot, and learned some things along the way, so I can say that I'm satisfied :)

The Hatena Merchandise store feels like an afterthought to me.

I was excited to see this today:

 

pr.hatenastaff.com

However, upon further inspection, I was left disappointed in the product selection.

I am not surprised that they do not ship to the USA, but am a little disappointed, as I won't be able to even get the Hatena shirt.

I would totally spring for a Hatena hoodie! Or some old merch from Flipnote Hatena...

An Open Letter to Google

I've submitted many appeals to Google in the past, but this one I will be making public as well. This is the content of the Adsense ban appeal that I've just submitted.

Hello!

We're coming up on the seven-and-a-half year mark from when my Adsense account was disabled. I've submitted several appeals, each one denied, and am once again submitting my appeal due to insufficient information provided in your previous responses.

I was fourteen years old then, and just getting into a new hobby of taking apart Nintendo devices and learning about how they work, and decided to start a blog about it. With the help of my parents, I was able to get Adsense set up! It was a pretty exciting time for me...until the Adsense account got disabled.

I was able to work out that a well-meaning friend of mine decided to click on the ads a large number of
times. This led to my Adsense account getting disabled, which although upsetting, did not affect my greatly as I was just a kid between middle and high school.

Times are different now. For several years, I have been growing and fully financially supporting a large community of artists and animators, as well as working on preserving their defining moments in the form of Flipnotes from Flipnote Hatena. As time went on, and the traffic and server demands grew, the financial demands grew as well. As I've expanded and grown, I've tried to motivate people to donate, but had very little consistent success. I needed something more consistent.

I tried Project Wonderful ads, which were not successful. I submitted many appeals but had each turned down without sufficient explanation or information.

I'm in debt now. I'm struggling to pay between $250-275 each month for server bills, and to pay off the hard drives I purchased to archive content from Flipnote Hatena ($1000 - 23 TB of content). I have credit card debt and car payments as well. I need help, desperately, especially when we finish reverse-engineering Nintendo's format so that I can make all of the archived content available to people to watch again, thus preserving the history.

I must beg of you again to please take into consideration the community that I've put years of my life into growing, with my time, my love, and a serious chunk of my finances.

Please let me do my best to grow the community of Sudomemo and of Flipnote Hatena. Please let me do what I need to do to lighten the financial burden that I have to struggle with. For the sake of the entire Sudomemo and Flipnote artist community, please responsibly consider this appeal so that I can reach towards my dream of having the site sustain itself, and towards being free from debt.

Hagex

人の命は世界中のお金より価値あるものです。
 
私は祈ります。憎しみにかられた男の手によって地上から連れ出されたHagex氏のために。
そして、Hagex氏を家族や彼のブログの読者、彼のキャリアから恩恵を受けた人から奪った人の魂のために。
 
闇と邪悪から救われない魂はないと信じています。
贖いには悔い改め、赦される必要があります。

安らかな眠りを心よりお祈り申し上げます。

 

I believe that a human life is worth more than all the money in the world.

I pray for the soul of Mr. Hagex, who was taken from this world at the hands of another man who was burning with hatred.

I pray for the soul of the man who has taken Hagex from his family, from the readers of his blog, and from those who benefitted from Hagex's work and career.

For I also believe that no soul is unable to be redeemed from the darkness and evil that consumes it.

Redemption starts with forgiveness, and continues with repentance. 

Reflections on, and things to consider about, Republic Wireless

 
I got my first cell phone the day I graduated from high school, in June of 2014. It was a 1st-gen Motorola Moto G with Republic Wireless. At first it started out alright, but it quickly slowed down. This model didn't have 4G, either.

Memory management on 1st gen Moto G

At first, all was well. I was enjoying my new cell phone. However, it that enjoyment didn't last long. For one, that particular model has a terrible kernel bug in which Android's memory management doesn't work properly, leading to apps dying and being closed while you try to work. The keyboard being killed, and apps being killed while using the file upload handler, are two of the most annoying ones.  Sometimes the phone will entirely stop responding for seconds at a time. This issue is not specific to Republic Wireless.

Missed calls, voicemails, and failure to send outbound SMS

Calls
Nowadays, I'm often missing calls. My phone simply does not ring. Sometimes a few minutes later I get a missed call notification; or a voicemail, and am baffled as to how I missed the call.

Text messages
Sending outbound SMS has issues sometimes. From my experience, if you end up switching between wifi and cellular, SMS messages will oftentimes stall and hold up the line. A reboot will sometimes solve this. This issue is not specific to the Moto G.

Republic Wireless app

The Republic Wireless app is a pain. It does not allow you to disable cellular data. It is constantly restarting on my phone (due to the memory management bug), and is set up to enable WiFi when it starts, so I can't disable WiFi. Oftentimes when I am in a place with poor WiFi reception, I will try to switch to cellular, but it will oftentimes reconnect me to WiFi against my wishes. It's a pain and causes dropped calls and interrupts my SSH connections and other network connections.

Pricing

Republic Wireless used to be pretty cheap, and I am currently running on a grandfathered plan. They used to claim 'unlimited' data which meant 5GB, after which you are throttled, although the first time it happens you were granted 5GB more for that month and this was for $25/month, on 3G. For phones that had 4G, it was $45/month.

They've entirely dumped those plans now. For the same price, you get 1 GB of data. I'm actually on a 2-year contract with Verizon for a Mifi because I don't have access to WiFi at home. I cannot recall what the cost of overage data is.

Support

Republic has the Republic Community, which is a large forum that is well-used. They do not have phone or livechat support, but do have a ticketing system for support inquiries. On the one occasion that I did end up speaking to them on the phone, they were quite helpful, properly evaluated my technical skill level, and gave me information in accordance with what someone at that skill level should understand, which I greatly appreciated.

Security

Last time I checked, VoIP goes over an unencrypted connection.

In defense of price changes

Although I am unhappy with how bad things have become, I do admit that my phone is outdated, and that as Republic's popularity increases, the scalability of low-cost, high-quality plans, along with employees to manage the growing demand from the growing customer base, becomes a matter of ever-increasing strain on budget - the question is whether to expand quickly at higher cost, or grow at the slower pace. As I am not an expert in how financial and corporate pecuniary interests work on any scale, I'm just guessing that things were starting to get hard to run at the pricing model that they had.

In summary

You can get some pretty cheap plans at Republic Wireless, but they seem to have dumped the things I liked about them. I'm going to be sticking with them for now and see if things get better afterward, but I no longer recommend them as much. In my opinion, their primary merit is now the wifi/cellular handover ability, and the ability to get service wherever you have Internet, no matter where on the globe.

 

 

Some notes about Flipnote Hatena's .nbf background format

We're working on the nbf top-screen background format used on Flipnote Hatena.

f:id:austinburk:20150413093826p:plain

We're making some progress.

The nbf files appear to be composed of three sections. Hatena seems to have reused what I call the ugomenu format; which is also used for the menus on Flipnote Hatena. The first 0x16 bytes of any ugomenu usually contains:

  1. 0x4 -The ugomenu magic ("UGAR").
  2. 0x4 32-bit little-endian unsigned integer specifying the number of sections within the container.

After this, for however many entries specified above: 0x4 uint32 LE specifying the length of each entry.

For the nbf files, this header totals 0x16 bytes.

After the header comes palette data, and after that, a bitmap image. What we're currently trying to do is convert the palette to a format that TiledGGD likes; however, we're not quite there yet.

If I remember correctly, the image displayed above, both on the left, and the representation on the right is the art of id:chira_rhythm55, the Flipnote Hatena theme artist. 

I eventually hope to be able to create custom images and convert back and forth between the .nbf format and a regular image format, such as PNG.

Have a nice day, and thank you for reading :)

Update on Stolen DSi

My Nintendo DSi was stolen several weeks ago. I've given up hoping it'll be turned in to Lansing Community College Public Safety and will be putting up STOLEN posters soon offering a reward upon return. I'm done fooling around hoping someone will just turn it in. Thievery is wrong and I intend to recover my system.

Austin Burk