bollafa

Fixing Reflutter’s “Unknown Snapshot Hash” error

It looked easy

It’s seven in the morning. Coffee in hand, you’re ready to analyze a new Android app. Then you notice—it’s made with Flutter. You groan, remembering that intercepting Flutter app traffic isn’t exactly a walk in the park. “Ah, SSL pinning”, you mutter with an exasperated sigh.

No problem, you think. Time to fire up reflutter. You run it… and it doesn’t work. Annoying, sure, but nothing a quick Google search can’t solve, right? After all, you can’t be the only one dealing with this!

And you’re not. Turns out, plenty of people have hit this roadblock. But here’s the catch—fixing it isn’t exactly straightforward. Everyone’s pointing to that Dockerfile. But when you actually try to use it, you’re hit with confusion: it asks for two inputs, a snapshot hash and a commit hash. “What’s a commit hash? And how do I even find it?” you wonder, spiraling into yet another rabbit hole.

Okay, maybe that was me a couple of months ago. But here’s the good news—if that frantic Google search brought you here, you’re in luck. Hopefully, this post will save you the headaches I went through and get you unstuck faster than I did. Let’s dive in!

Reflutter

Sit excepteur do velit veniam mollit in nostrud laboris incididunt ea. Amet eu cillum ut reprehenderit culpa aliquip labore laborum amet sit sit duis. Laborum id proident nostrud dolore laborum reprehenderit quis mollit nulla amet veniam officia id id. Aliquip in deserunt qui magna duis qui pariatur officia sunt deserunt.

A photograph of Zion National Park

The reflutter logo

import Levenshtein

seed = raw_input('enter your wallet seed: ')

for seed_word in seed.split():
  for dict_word in open('dictionary.txt'):
    dict_word = dict_word.strip()
    distance = Levenshtein.distance(seed_word, dict_word)
    if distance != 1:
      continue
    print '"%s" -> "%s"\n%s\n' % (seed_word, dict_word,
                                  seed.replace(seed_word, dict_word))

And some Go code:

// got and want are only available within the if statement.
if got, want := GetUser(), "dummyUser"; got != want {
  t.Errorf("username=%s, want=%s", got, want)
}
log.Printf("username was %s", got) // This won't compile
Tags: