biemster / FindMy

Query Apple's Find My network
225 stars 39 forks source link

Optimized the codes and README #36

Closed Chapoly1305 closed 7 months ago

Chapoly1305 commented 7 months ago
  1. Secure method of private key generation. The use of random to generate private key is dangerous. The better practice is to use secure library for generating cryptographic secure random number (key).
  2. Clarify variable names. The adv seems to be the public key numbers, and hash is the sha256 then base64 of the public key. Refactored the names improve clarity and matching the concepts (Public Key, Private Key, AdvertisementKey) used in openhaystack.
  3. Add notice for authentication error. Catch the password error message instead of crashing.
  4. Add details into README document.
  5. A few formatting improvement suggested by PyCharm.
Chapoly1305 commented 7 months ago

Will create a new pull request.

biemster commented 7 months ago

Thanks for this work! I'm not sure I'll merge this, since I have a 100 line target in request_reports.py and in general don't merge unless it fixes a blocking bug. This repo should be taken as minimal proof of concept, please fork if you want to extend functionality / usability.