Aegis
Aegis copied to clipboard
Import Battle.net Codes from various sources
It would be great if you could handle
- The official Battle.net Authenticator ( https://play.google.com/store/apps/details?id=com.blizzard.bma )
- The Restore code from https://account.blizzard.com/security
- The backup xml from https://bitbucket.org/sednogmah/foobma/src
The official Battle.net Authenticator ( https://play.google.com/store/apps/details?id=com.blizzard.bma )
Someone could look into whether that's possible. It'll require root access, just like the other importers that read from other app's internal storage.
The Restore code from https://account.blizzard.com/security
Is it possible to derive the secret from this restore code, without connecting to the internet? My guess would be no.
The backup xml from https://bitbucket.org/sednogmah/foobma/src
This seems like too much of a niche tool to add support for.
If you turn Wifi Off, the Battle-net Mobile App can't finish the restore Process.
https://github.com/winauth/winauth/blob/6af095b4d405563190e26c5ec1b129755d2cdf23/Authenticator/BattleNetAuthenticator.cs has the restore Process which involves some requests and calculations.
Maybe to niche that particular tool, but it seems rather straight forward
- Serial, Clockskew and a token.
This is similiar to what winauth stores, which i just labeled differently secretdata, servertimediff&Lastservertime is the winauth version, and they do not seem to store the serial number. So it comes down to just parsing different fields.
The winauth export file gives a totp url
otpauth://totp/BattleNet:Battle.net?secret=X&digits=8&issuer=BattleNet&serial=EUXXX
Blizzards Mobile App stores it in /data/data/com.Blizzard.bma/sharred_prefs/com.blizzard.bma.AUTH_STORE.xml
The secret to decoding this can be found at https://gist.github.com/stbuehler/8616943 https://github.com/jleclanche/python-bna
Another good source: https://github.com/andOTP/andOTP/wiki/Shared-secrets#battlenet
@07416 Don't quote me out of context. I was obviously talking about https://bitbucket.org/sednogmah/foobma/src, not Battle.net Authenticator itself.
@alexbakker I apologize, to be frank the main reason for commenting was to bring more attention towards the feature request.
I'll delete the comment.
We currently don't have plans to implement this feature ourselves, but if anyone is interested in picking this up, let us know. Note that we're just talking about importing from the Battle.net Authenticator Android app here.
I have made a solution for importing Battle.net Authenticator and would like to know if you are still interested in having the importer, if so, I can make the importer, here is the repository of the java implementation https://github.com/JordanPlayz158/BMA-TOTP
Does that read a file from the internal storage of the Battle.net Authenticator app? If so, sure! A pull request would be welcome.
It is implemented to read the AUTH_STORE file (which is located at /data/data/com.blizzard.bma/shared_prefs/com.blizzard.bma.AUTH_STORE.xml
) so all I need to do is rather than have it ask for a file, have it grab the file using root although will the apache codec dependency be an issue (or perhaps android has base 16 to base 32 classes like it appears it has an xml parser)
It is implemented to read the AUTH_STORE file (which is located at /data/data/com.blizzard.bma/shared_prefs/com.blizzard.bma.AUTH_STORE.xml)
Sounds good.
will the apache codec dependency be an issue (or perhaps android has base 16 to base 32 classes like it appears it has an xml parser)
Let's try to avoid adding additional dependencies. You can use Aegis' Hex
and Base32
wrapper classes. With regards to XML, try to see if the utility function we have for parsing shared preferences files suffice. Otherwise, please directly use the XML parser package included with Android (org.xmlpull).