chromesync 0.2.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. chromesync/__init__.py +36 -0
  2. chromesync/_client.py +113 -0
  3. chromesync/_nigori.py +66 -0
  4. chromesync/_oscrypt.py +49 -0
  5. chromesync/_profile.py +101 -0
  6. chromesync/_proto/__init__.py +3 -0
  7. chromesync/_proto/components/__init__.py +0 -0
  8. chromesync/_proto/components/sync/__init__.py +0 -0
  9. chromesync/_proto/components/sync/protocol/__init__.py +0 -0
  10. chromesync/_proto/components/sync/protocol/account_setting_specifics_pb2.py +26 -0
  11. chromesync/_proto/components/sync/protocol/agile_encryption_keys_pb2.py +35 -0
  12. chromesync/_proto/components/sync/protocol/ai_thread_specifics_pb2.py +28 -0
  13. chromesync/_proto/components/sync/protocol/app_list_specifics_pb2.py +34 -0
  14. chromesync/_proto/components/sync/protocol/app_setting_specifics_pb2.py +27 -0
  15. chromesync/_proto/components/sync/protocol/app_specifics_pb2.py +45 -0
  16. chromesync/_proto/components/sync/protocol/arc_package_specifics_pb2.py +26 -0
  17. chromesync/_proto/components/sync/protocol/attachment_pb2.py +26 -0
  18. chromesync/_proto/components/sync/protocol/autofill_entity_suppression_specifics_pb2.py +38 -0
  19. chromesync/_proto/components/sync/protocol/autofill_offer_specifics_pb2.py +36 -0
  20. chromesync/_proto/components/sync/protocol/autofill_specifics_pb2.py +118 -0
  21. chromesync/_proto/components/sync/protocol/autofill_valuable_metadata_specifics_pb2.py +28 -0
  22. chromesync/_proto/components/sync/protocol/autofill_valuable_specifics_pb2.py +58 -0
  23. chromesync/_proto/components/sync/protocol/autofill_wallet_credential_specifics_pb2.py +26 -0
  24. chromesync/_proto/components/sync/protocol/autofill_wallet_usage_specifics_pb2.py +28 -0
  25. chromesync/_proto/components/sync/protocol/bookmark_specifics_pb2.py +31 -0
  26. chromesync/_proto/components/sync/protocol/client_commands_pb2.py +32 -0
  27. chromesync/_proto/components/sync/protocol/client_debug_info_pb2.py +34 -0
  28. chromesync/_proto/components/sync/protocol/collaboration_group_specifics_pb2.py +26 -0
  29. chromesync/_proto/components/sync/protocol/contact_info_specifics_pb2.py +38 -0
  30. chromesync/_proto/components/sync/protocol/contextual_task_specifics_pb2.py +31 -0
  31. chromesync/_proto/components/sync/protocol/cookie_specifics_pb2.py +36 -0
  32. chromesync/_proto/components/sync/protocol/data_type_progress_marker_pb2.py +42 -0
  33. chromesync/_proto/components/sync/protocol/deletion_origin_pb2.py +27 -0
  34. chromesync/_proto/components/sync/protocol/device_info_specifics_pb2.py +59 -0
  35. chromesync/_proto/components/sync/protocol/dictionary_specifics_pb2.py +26 -0
  36. chromesync/_proto/components/sync/protocol/encrypted_tab_context_container_specifics_pb2.py +27 -0
  37. chromesync/_proto/components/sync/protocol/encrypted_tab_context_item_specifics_pb2.py +29 -0
  38. chromesync/_proto/components/sync/protocol/encryption_pb2.py +26 -0
  39. chromesync/_proto/components/sync/protocol/entity_specifics_pb2.py +110 -0
  40. chromesync/_proto/components/sync/protocol/extension_setting_specifics_pb2.py +26 -0
  41. chromesync/_proto/components/sync/protocol/extension_specifics_pb2.py +32 -0
  42. chromesync/_proto/components/sync/protocol/gaia_password_reuse_pb2.py +42 -0
  43. chromesync/_proto/components/sync/protocol/gemini_thread_specifics_pb2.py +26 -0
  44. chromesync/_proto/components/sync/protocol/get_updates_caller_info_pb2.py +26 -0
  45. chromesync/_proto/components/sync/protocol/history_delete_directive_specifics_pb2.py +32 -0
  46. chromesync/_proto/components/sync/protocol/history_specifics_pb2.py +33 -0
  47. chromesync/_proto/components/sync/protocol/journey_specifics_pb2.py +34 -0
  48. chromesync/_proto/components/sync/protocol/managed_user_setting_specifics_pb2.py +26 -0
  49. chromesync/_proto/components/sync/protocol/nigori_specifics_pb2.py +49 -0
  50. chromesync/_proto/components/sync/protocol/notebook_specifics_pb2.py +28 -0
  51. chromesync/_proto/components/sync/protocol/os_preference_specifics_pb2.py +27 -0
  52. chromesync/_proto/components/sync/protocol/os_priority_preference_specifics_pb2.py +27 -0
  53. chromesync/_proto/components/sync/protocol/password_sharing_invitation_specifics_pb2.py +43 -0
  54. chromesync/_proto/components/sync/protocol/password_specifics_pb2.py +45 -0
  55. chromesync/_proto/components/sync/protocol/preference_specifics_pb2.py +26 -0
  56. chromesync/_proto/components/sync/protocol/printer_specifics_pb2.py +38 -0
  57. chromesync/_proto/components/sync/protocol/printers_authorization_server_specifics_pb2.py +26 -0
  58. chromesync/_proto/components/sync/protocol/priority_preference_specifics_pb2.py +27 -0
  59. chromesync/_proto/components/sync/protocol/product_comparison_specifics_pb2.py +33 -0
  60. chromesync/_proto/components/sync/protocol/reading_list_specifics_pb2.py +28 -0
  61. chromesync/_proto/components/sync/protocol/saved_tab_group_specifics_pb2.py +33 -0
  62. chromesync/_proto/components/sync/protocol/search_engine_specifics_pb2.py +38 -0
  63. chromesync/_proto/components/sync/protocol/security_event_specifics_pb2.py +27 -0
  64. chromesync/_proto/components/sync/protocol/send_tab_to_self_specifics_pb2.py +40 -0
  65. chromesync/_proto/components/sync/protocol/session_specifics_pb2.py +50 -0
  66. chromesync/_proto/components/sync/protocol/shared_comment_specifics_pb2.py +44 -0
  67. chromesync/_proto/components/sync/protocol/shared_tab_group_account_data_specifics_pb2.py +30 -0
  68. chromesync/_proto/components/sync/protocol/shared_tab_group_data_specifics_pb2.py +33 -0
  69. chromesync/_proto/components/sync/protocol/sharing_message_specifics_pb2.py +39 -0
  70. chromesync/_proto/components/sync/protocol/skill_specifics_pb2.py +30 -0
  71. chromesync/_proto/components/sync/protocol/sync_entity_pb2.py +40 -0
  72. chromesync/_proto/components/sync/protocol/sync_enums_pb2.py +70 -0
  73. chromesync/_proto/components/sync/protocol/sync_pb2.py +76 -0
  74. chromesync/_proto/components/sync/protocol/tab_group_attribution_metadata_pb2.py +30 -0
  75. chromesync/_proto/components/sync/protocol/tab_navigation_pb2.py +57 -0
  76. chromesync/_proto/components/sync/protocol/theme_android_specifics_pb2.py +29 -0
  77. chromesync/_proto/components/sync/protocol/theme_ios_specifics_pb2.py +27 -0
  78. chromesync/_proto/components/sync/protocol/theme_specifics_pb2.py +33 -0
  79. chromesync/_proto/components/sync/protocol/theme_types_pb2.py +30 -0
  80. chromesync/_proto/components/sync/protocol/typed_url_specifics_pb2.py +30 -0
  81. chromesync/_proto/components/sync/protocol/unencrypted_sharing_message_pb2.py +36 -0
  82. chromesync/_proto/components/sync/protocol/unique_position_pb2.py +32 -0
  83. chromesync/_proto/components/sync/protocol/user_consent_specifics_pb2.py +45 -0
  84. chromesync/_proto/components/sync/protocol/user_consent_types_pb2.py +50 -0
  85. chromesync/_proto/components/sync/protocol/user_event_specifics_pb2.py +37 -0
  86. chromesync/_proto/components/sync/protocol/web_app_specifics_pb2.py +32 -0
  87. chromesync/_proto/components/sync/protocol/webauthn_credential_specifics_pb2.py +32 -0
  88. chromesync/_proto/components/sync/protocol/wifi_configuration_specifics_pb2.py +42 -0
  89. chromesync/_proto/components/sync/protocol/workspace_desk_specifics_pb2.py +65 -0
  90. chromesync/_proto/components/trusted_vault/__init__.py +0 -0
  91. chromesync/_proto/components/trusted_vault/proto/__init__.py +0 -0
  92. chromesync/_proto/components/trusted_vault/proto/local_trusted_vault_pb2.py +42 -0
  93. chromesync/_tags.py +32 -0
  94. chromesync/cli.py +96 -0
  95. chromesync/passwords.py +173 -0
  96. chromesync-0.2.0.dist-info/METADATA +97 -0
  97. chromesync-0.2.0.dist-info/RECORD +100 -0
  98. chromesync-0.2.0.dist-info/WHEEL +4 -0
  99. chromesync-0.2.0.dist-info/entry_points.txt +2 -0
  100. chromesync-0.2.0.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,65 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: components/sync/protocol/workspace_desk_specifics.proto
4
+ """Generated protocol buffer code."""
5
+ from google.protobuf.internal import builder as _builder
6
+ from google.protobuf import descriptor as _descriptor
7
+ from google.protobuf import descriptor_pool as _descriptor_pool
8
+ from google.protobuf import symbol_database as _symbol_database
9
+ # @@protoc_insertion_point(imports)
10
+
11
+ _sym_db = _symbol_database.Default()
12
+
13
+
14
+ from chromesync._proto.components.sync.protocol import sync_enums_pb2 as components_dot_sync_dot_protocol_dot_sync__enums__pb2
15
+
16
+
17
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n7components/sync/protocol/workspace_desk_specifics.proto\x12\x07sync_pb\x1a)components/sync/protocol/sync_enums.proto\"\x98\x1a\n\x16WorkspaceDeskSpecifics\x12\x0c\n\x04uuid\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12)\n!created_time_windows_epoch_micros\x18\x03 \x01(\x03\x12)\n!updated_time_windows_epoch_micros\x18\x05 \x01(\x03\x12\x32\n\x04\x64\x65sk\x18\x04 \x01(\x0b\x32$.sync_pb.WorkspaceDeskSpecifics.Desk\x12;\n\tdesk_type\x18\x06 \x01(\x0e\x32(.sync_pb.WorkspaceDeskSpecifics.DeskType\x12\x19\n\x11\x63lient_cache_guid\x18\x07 \x01(\t\x12?\n\x12\x64\x65vice_form_factor\x18\x08 \x01(\x0e\x32#.sync_pb.SyncEnums.DeviceFormFactor\x12S\n\x16\x63oral_tab_app_entities\x18\t \x01(\x0b\x32\x33.sync_pb.WorkspaceDeskSpecifics.CoralTabAppEntities\x1a\x39\n\x04\x44\x65sk\x12\x31\n\x04\x61pps\x18\x01 \x03(\x0b\x32#.sync_pb.WorkspaceDeskSpecifics.App\x1a\xab\x04\n\x03\x41pp\x12\x41\n\x0cwindow_bound\x18\x01 \x01(\x0b\x32+.sync_pb.WorkspaceDeskSpecifics.WindowBound\x12\x41\n\x0cwindow_state\x18\x02 \x01(\x0e\x32+.sync_pb.WorkspaceDeskSpecifics.WindowState\x12\x0f\n\x07z_index\x18\x03 \x01(\x05\x12\x35\n\x03\x61pp\x18\x04 \x01(\x0b\x32(.sync_pb.WorkspaceDeskSpecifics.AppOneOf\x12\x11\n\twindow_id\x18\x05 \x01(\x05\x12\x12\n\ndisplay_id\x18\x06 \x01(\x03\x12O\n\x1apre_minimized_window_state\x18\x07 \x01(\x0e\x32+.sync_pb.WorkspaceDeskSpecifics.WindowState\x12\x42\n\tcontainer\x18\x08 \x01(\x0e\x32/.sync_pb.WorkspaceDeskSpecifics.LaunchContainer\x12J\n\x0b\x64isposition\x18\t \x01(\x0e\x32\x35.sync_pb.WorkspaceDeskSpecifics.WindowOpenDisposition\x12\x10\n\x08\x61pp_name\x18\n \x01(\t\x12\r\n\x05title\x18\x0b \x01(\t\x12\x17\n\x0fsnap_percentage\x18\x0c \x01(\x05\x12\x14\n\x0coverride_url\x18\r \x01(\t\x1a\xac\x02\n\x08\x41ppOneOf\x12N\n\x12\x62rowser_app_window\x18\x01 \x01(\x0b\x32\x30.sync_pb.WorkspaceDeskSpecifics.BrowserAppWindowH\x00\x12?\n\nchrome_app\x18\x02 \x01(\x0b\x32).sync_pb.WorkspaceDeskSpecifics.ChromeAppH\x00\x12M\n\x10progress_web_app\x18\x03 \x01(\x0b\x32\x31.sync_pb.WorkspaceDeskSpecifics.ProgressiveWebAppH\x00\x12\x39\n\x07\x61rc_app\x18\x04 \x01(\x0b\x32&.sync_pb.WorkspaceDeskSpecifics.ArcAppH\x00\x42\x05\n\x03\x61pp\x1a\xc8\x03\n\x10\x42rowserAppWindow\x12L\n\x04tabs\x18\x01 \x03(\x0b\x32>.sync_pb.WorkspaceDeskSpecifics.BrowserAppWindow.BrowserAppTab\x12\x18\n\x10\x61\x63tive_tab_index\x18\x02 \x01(\x05\x12\x13\n\x0bshow_as_app\x18\x03 \x01(\x08\x12M\n\ntab_groups\x18\x04 \x03(\x0b\x32\x39.sync_pb.WorkspaceDeskSpecifics.BrowserAppWindow.TabGroup\x12\"\n\x1a\x66irst_non_pinned_tab_index\x18\x05 \x01(\x05\x1a+\n\rBrowserAppTab\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\r\n\x05title\x18\x02 \x01(\t\x1a\x96\x01\n\x08TabGroup\x12\x13\n\x0b\x66irst_index\x18\x01 \x01(\x05\x12\x12\n\nlast_index\x18\x02 \x01(\x05\x12\r\n\x05title\x18\x03 \x01(\t\x12<\n\x05\x63olor\x18\x04 \x01(\x0e\x32-.sync_pb.WorkspaceDeskSpecifics.TabGroupColor\x12\x14\n\x0cis_collapsed\x18\x05 \x01(\x08\x1a!\n\tChromeApp\x12\x0e\n\x06\x61pp_id\x18\x01 \x01(\tJ\x04\x08\x02\x10\x03\x1a)\n\x11ProgressiveWebApp\x12\x0e\n\x06\x61pp_id\x18\x01 \x01(\tJ\x04\x08\x02\x10\x03\x1a\xa2\x02\n\x06\x41rcApp\x12\x0e\n\x06\x61pp_id\x18\x01 \x01(\t\x12G\n\x0cminimum_size\x18\x02 \x01(\x0b\x32\x31.sync_pb.WorkspaceDeskSpecifics.ArcApp.WindowSize\x12G\n\x0cmaximum_size\x18\x03 \x01(\x0b\x32\x31.sync_pb.WorkspaceDeskSpecifics.ArcApp.WindowSize\x12\x43\n\x0e\x62ounds_in_root\x18\x05 \x01(\x0b\x32+.sync_pb.WorkspaceDeskSpecifics.WindowBound\x1a+\n\nWindowSize\x12\r\n\x05width\x18\x01 \x01(\x05\x12\x0e\n\x06height\x18\x02 \x01(\x05J\x04\x08\x04\x10\x05\x1aG\n\x0bWindowBound\x12\x0b\n\x03top\x18\x01 \x01(\x05\x12\x0c\n\x04left\x18\x02 \x01(\x05\x12\r\n\x05width\x18\x03 \x01(\x05\x12\x0e\n\x06height\x18\x04 \x01(\x05\x1a\xa1\x01\n\x13\x43oralTabAppEntities\x12\x44\n\x0ctab_entities\x18\x01 \x03(\x0b\x32..sync_pb.WorkspaceDeskSpecifics.CoralTabEntity\x12\x44\n\x0c\x61pp_entities\x18\x02 \x03(\x0b\x32..sync_pb.WorkspaceDeskSpecifics.CoralAppEntity\x1a\x34\n\x0e\x43oralTabEntity\x12\x11\n\ttab_title\x18\x01 \x01(\t\x12\x0f\n\x07tab_url\x18\x02 \x01(\t\x1a\x32\n\x0e\x43oralAppEntity\x12\x10\n\x08\x61pp_name\x18\x01 \x01(\t\x12\x0e\n\x06\x61pp_id\x18\x02 \x01(\t\"\xac\x01\n\x0fLaunchContainer\x12 \n\x1cLAUNCH_CONTAINER_UNSPECIFIED\x10\x00\x12\x1b\n\x17LAUNCH_CONTAINER_WINDOW\x10\x01\x12%\n!LAUNCH_CONTAINER_PANEL_DEPRECATED\x10\x02\x12\x18\n\x14LAUNCH_CONTAINER_TAB\x10\x03\x12\x19\n\x15LAUNCH_CONTAINER_NONE\x10\x04\"\x9a\x01\n\x0bWindowState\x12\x18\n\x14UNKNOWN_WINDOW_STATE\x10\x00\x12\n\n\x06NORMAL\x10\x01\x12\r\n\tMINIMIZED\x10\x02\x12\r\n\tMAXIMIZED\x10\x03\x12\x0e\n\nFULLSCREEN\x10\x04\x12\x13\n\x0fPRIMARY_SNAPPED\x10\x05\x12\x15\n\x11SECONDARY_SNAPPED\x10\x06\x12\x0b\n\x07\x46LOATED\x10\x07\"\xff\x01\n\x15WindowOpenDisposition\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0f\n\x0b\x43URRENT_TAB\x10\x01\x12\x11\n\rSINGLETON_TAB\x10\x02\x12\x16\n\x12NEW_FOREGROUND_TAB\x10\x03\x12\x16\n\x12NEW_BACKGROUND_TAB\x10\x04\x12\r\n\tNEW_POPUP\x10\x05\x12\x0e\n\nNEW_WINDOW\x10\x06\x12\x10\n\x0cSAVE_TO_DISK\x10\x07\x12\x12\n\x0eOFF_THE_RECORD\x10\x08\x12\x11\n\rIGNORE_ACTION\x10\t\x12\x11\n\rSWITCH_TO_TAB\x10\n\x12\x1a\n\x16NEW_PICTURE_IN_PICTURE\x10\x0b\"W\n\x08\x44\x65skType\x12\x10\n\x0cUNKNOWN_TYPE\x10\x00\x12\x0c\n\x08TEMPLATE\x10\x01\x12\x13\n\x0fSAVE_AND_RECALL\x10\x02\x12\x16\n\x12\x46LOATING_WORKSPACE\x10\x03\"\x82\x01\n\rTabGroupColor\x12\x11\n\rUNKNOWN_COLOR\x10\x00\x12\x08\n\x04GREY\x10\x01\x12\x08\n\x04\x42LUE\x10\x02\x12\x07\n\x03RED\x10\x03\x12\n\n\x06YELLOW\x10\x04\x12\t\n\x05GREEN\x10\x05\x12\x08\n\x04PINK\x10\x06\x12\n\n\x06PURPLE\x10\x07\x12\x08\n\x04\x43YAN\x10\x08\x12\n\n\x06ORANGE\x10\tR\x11\x63reated_time_usecB+\n%org.chromium.components.sync.protocolH\x03P\x01')
18
+
19
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
20
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'components.sync.protocol.workspace_desk_specifics_pb2', globals())
21
+ if _descriptor._USE_C_DESCRIPTORS == False:
22
+
23
+ DESCRIPTOR._options = None
24
+ DESCRIPTOR._serialized_options = b'\n%org.chromium.components.sync.protocolH\003P\001'
25
+ _WORKSPACEDESKSPECIFICS._serialized_start=112
26
+ _WORKSPACEDESKSPECIFICS._serialized_end=3464
27
+ _WORKSPACEDESKSPECIFICS_DESK._serialized_start=542
28
+ _WORKSPACEDESKSPECIFICS_DESK._serialized_end=599
29
+ _WORKSPACEDESKSPECIFICS_APP._serialized_start=602
30
+ _WORKSPACEDESKSPECIFICS_APP._serialized_end=1157
31
+ _WORKSPACEDESKSPECIFICS_APPONEOF._serialized_start=1160
32
+ _WORKSPACEDESKSPECIFICS_APPONEOF._serialized_end=1460
33
+ _WORKSPACEDESKSPECIFICS_BROWSERAPPWINDOW._serialized_start=1463
34
+ _WORKSPACEDESKSPECIFICS_BROWSERAPPWINDOW._serialized_end=1919
35
+ _WORKSPACEDESKSPECIFICS_BROWSERAPPWINDOW_BROWSERAPPTAB._serialized_start=1723
36
+ _WORKSPACEDESKSPECIFICS_BROWSERAPPWINDOW_BROWSERAPPTAB._serialized_end=1766
37
+ _WORKSPACEDESKSPECIFICS_BROWSERAPPWINDOW_TABGROUP._serialized_start=1769
38
+ _WORKSPACEDESKSPECIFICS_BROWSERAPPWINDOW_TABGROUP._serialized_end=1919
39
+ _WORKSPACEDESKSPECIFICS_CHROMEAPP._serialized_start=1921
40
+ _WORKSPACEDESKSPECIFICS_CHROMEAPP._serialized_end=1954
41
+ _WORKSPACEDESKSPECIFICS_PROGRESSIVEWEBAPP._serialized_start=1956
42
+ _WORKSPACEDESKSPECIFICS_PROGRESSIVEWEBAPP._serialized_end=1997
43
+ _WORKSPACEDESKSPECIFICS_ARCAPP._serialized_start=2000
44
+ _WORKSPACEDESKSPECIFICS_ARCAPP._serialized_end=2290
45
+ _WORKSPACEDESKSPECIFICS_ARCAPP_WINDOWSIZE._serialized_start=2241
46
+ _WORKSPACEDESKSPECIFICS_ARCAPP_WINDOWSIZE._serialized_end=2284
47
+ _WORKSPACEDESKSPECIFICS_WINDOWBOUND._serialized_start=2292
48
+ _WORKSPACEDESKSPECIFICS_WINDOWBOUND._serialized_end=2363
49
+ _WORKSPACEDESKSPECIFICS_CORALTABAPPENTITIES._serialized_start=2366
50
+ _WORKSPACEDESKSPECIFICS_CORALTABAPPENTITIES._serialized_end=2527
51
+ _WORKSPACEDESKSPECIFICS_CORALTABENTITY._serialized_start=2529
52
+ _WORKSPACEDESKSPECIFICS_CORALTABENTITY._serialized_end=2581
53
+ _WORKSPACEDESKSPECIFICS_CORALAPPENTITY._serialized_start=2583
54
+ _WORKSPACEDESKSPECIFICS_CORALAPPENTITY._serialized_end=2633
55
+ _WORKSPACEDESKSPECIFICS_LAUNCHCONTAINER._serialized_start=2636
56
+ _WORKSPACEDESKSPECIFICS_LAUNCHCONTAINER._serialized_end=2808
57
+ _WORKSPACEDESKSPECIFICS_WINDOWSTATE._serialized_start=2811
58
+ _WORKSPACEDESKSPECIFICS_WINDOWSTATE._serialized_end=2965
59
+ _WORKSPACEDESKSPECIFICS_WINDOWOPENDISPOSITION._serialized_start=2968
60
+ _WORKSPACEDESKSPECIFICS_WINDOWOPENDISPOSITION._serialized_end=3223
61
+ _WORKSPACEDESKSPECIFICS_DESKTYPE._serialized_start=3225
62
+ _WORKSPACEDESKSPECIFICS_DESKTYPE._serialized_end=3312
63
+ _WORKSPACEDESKSPECIFICS_TABGROUPCOLOR._serialized_start=3315
64
+ _WORKSPACEDESKSPECIFICS_TABGROUPCOLOR._serialized_end=3445
65
+ # @@protoc_insertion_point(module_scope)
File without changes
@@ -0,0 +1,42 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: components/trusted_vault/proto/local_trusted_vault.proto
4
+ """Generated protocol buffer code."""
5
+ from google.protobuf.internal import builder as _builder
6
+ from google.protobuf import descriptor as _descriptor
7
+ from google.protobuf import descriptor_pool as _descriptor_pool
8
+ from google.protobuf import symbol_database as _symbol_database
9
+ # @@protoc_insertion_point(imports)
10
+
11
+ _sym_db = _symbol_database.Default()
12
+
13
+
14
+
15
+
16
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n8components/trusted_vault/proto/local_trusted_vault.proto\x12\x10trusted_vault_pb\",\n\x14LocalTrustedVaultKey\x12\x14\n\x0ckey_material\x18\x01 \x01(\x0c\"\xc0\x01\n\x1bLocalDeviceRegistrationInfo\x12\x1c\n\x14private_key_material\x18\x01 \x01(\x0c\x12\x19\n\x11\x64\x65vice_registered\x18\x02 \x01(\x08\x12!\n\x19\x64\x65vice_registered_version\x18\x03 \x01(\x05\x12\x45\n9deprecated_last_registration_returned_local_data_obsolete\x18\x04 \x01(\x08\x42\x02\x18\x01\"4\n\x1eICloudKeychainRegistrationInfo\x12\x12\n\nregistered\x18\x01 \x01(\x08\"\xbd\x01\n,LocalTrustedVaultDegradedRecoverabilityState\x12\x31\n)last_refresh_time_millis_since_unix_epoch\x18\x02 \x01(\x03\x12T\n\x1d\x64\x65graded_recoverability_value\x18\x03 \x01(\x0e\x32-.trusted_vault_pb.DegradedRecoverabilityValueJ\x04\x08\x01\x10\x02\"\xeb\x04\n\x18LocalTrustedVaultPerUser\x12\x0f\n\x07gaia_id\x18\x01 \x01(\x0c\x12\x39\n\tvault_key\x18\x02 \x03(\x0b\x32&.trusted_vault_pb.LocalTrustedVaultKey\x12\x1e\n\x16last_vault_key_version\x18\x03 \x01(\x05\x12(\n keys_marked_as_stale_by_consumer\x18\x04 \x01(\x08\x12U\n\x1elocal_device_registration_info\x18\x05 \x01(\x0b\x32-.trusted_vault_pb.LocalDeviceRegistrationInfo\x12[\n!icloud_keychain_registration_info\x18\n \x01(\x0b\x32\x30.trusted_vault_pb.ICloudKeychainRegistrationInfo\x12\x33\n+last_failed_request_millis_since_unix_epoch\x18\x06 \x01(\x03\x12+\n#should_delete_keys_when_non_primary\x18\x07 \x01(\x08\x12\x65\n\x1d\x64\x65graded_recoverability_state\x18\x08 \x01(\x0b\x32>.trusted_vault_pb.LocalTrustedVaultDegradedRecoverabilityState\x12\x36\n.last_registration_returned_local_data_obsolete\x18\x0b \x01(\x08J\x04\x08\t\x10\n\"c\n\x11LocalTrustedVault\x12\x38\n\x04user\x18\x01 \x03(\x0b\x32*.trusted_vault_pb.LocalTrustedVaultPerUser\x12\x14\n\x0c\x64\x61ta_version\x18\x02 \x01(\x05\"\x87\x01\n\x1cLocalTrustedVaultFileContent\x12&\n\x1eserialized_local_trusted_vault\x18\x01 \x01(\t\x12\x1d\n\x15md5_digest_hex_string\x18\x02 \x01(\t\x12 \n\x18sha256_digest_hex_string\x18\x03 \x01(\t*L\n\x1b\x44\x65gradedRecoverabilityValue\x12\x0c\n\x08kUnknown\x10\x00\x12\x10\n\x0ckNotDegraded\x10\x01\x12\r\n\tkDegraded\x10\x02\x42\x02H\x03')
17
+
18
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
19
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'components.trusted_vault.proto.local_trusted_vault_pb2', globals())
20
+ if _descriptor._USE_C_DESCRIPTORS == False:
21
+
22
+ DESCRIPTOR._options = None
23
+ DESCRIPTOR._serialized_options = b'H\003'
24
+ _LOCALDEVICEREGISTRATIONINFO.fields_by_name['deprecated_last_registration_returned_local_data_obsolete']._options = None
25
+ _LOCALDEVICEREGISTRATIONINFO.fields_by_name['deprecated_last_registration_returned_local_data_obsolete']._serialized_options = b'\030\001'
26
+ _DEGRADEDRECOVERABILITYVALUE._serialized_start=1426
27
+ _DEGRADEDRECOVERABILITYVALUE._serialized_end=1502
28
+ _LOCALTRUSTEDVAULTKEY._serialized_start=78
29
+ _LOCALTRUSTEDVAULTKEY._serialized_end=122
30
+ _LOCALDEVICEREGISTRATIONINFO._serialized_start=125
31
+ _LOCALDEVICEREGISTRATIONINFO._serialized_end=317
32
+ _ICLOUDKEYCHAINREGISTRATIONINFO._serialized_start=319
33
+ _ICLOUDKEYCHAINREGISTRATIONINFO._serialized_end=371
34
+ _LOCALTRUSTEDVAULTDEGRADEDRECOVERABILITYSTATE._serialized_start=374
35
+ _LOCALTRUSTEDVAULTDEGRADEDRECOVERABILITYSTATE._serialized_end=563
36
+ _LOCALTRUSTEDVAULTPERUSER._serialized_start=566
37
+ _LOCALTRUSTEDVAULTPERUSER._serialized_end=1185
38
+ _LOCALTRUSTEDVAULT._serialized_start=1187
39
+ _LOCALTRUSTEDVAULT._serialized_end=1286
40
+ _LOCALTRUSTEDVAULTFILECONTENT._serialized_start=1289
41
+ _LOCALTRUSTEDVAULTFILECONTENT._serialized_end=1424
42
+ # @@protoc_insertion_point(module_scope)
chromesync/_tags.py ADDED
@@ -0,0 +1,32 @@
1
+ """Client tags: the identity of a sync entity (components/sync/base/client_tag_hash.cc)."""
2
+ from __future__ import annotations
3
+
4
+ import base64
5
+ import hashlib
6
+
7
+ from chromesync._proto.components.sync.protocol import entity_specifics_pb2, password_specifics_pb2
8
+
9
+ # base::EscapePath (base/strings/escape.cc kPathCharmap): bit set = byte is %XX-escaped.
10
+ _PATH_CHARMAP = (0xFFFFFFFF, 0xD400002D, 0x78000000, 0xB8000001, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF)
11
+
12
+
13
+ def escape_path(s: str) -> str:
14
+ return "".join(f"%{b:02X}" if _PATH_CHARMAP[b >> 5] & (1 << (b & 31)) else chr(b) for b in s.encode())
15
+
16
+
17
+ def type_field_number(name: str) -> int:
18
+ """The EntitySpecifics field number of a data type, which is also its sync data_type_id."""
19
+ return int(entity_specifics_pb2.EntitySpecifics.DESCRIPTOR.fields_by_name[name].number)
20
+
21
+
22
+ def client_tag_hash(type_name: str, client_tag: str) -> str:
23
+ """base64(SHA1(EntitySpecifics with an empty `type_name` field ‖ client_tag))."""
24
+ prefix = entity_specifics_pb2.EntitySpecifics()
25
+ getattr(prefix, type_name).SetInParent()
26
+ return base64.b64encode(hashlib.sha1(prefix.SerializeToString() + client_tag.encode()).digest()).decode()
27
+
28
+
29
+ def password_client_tag(d: password_specifics_pb2.PasswordSpecificsData) -> str:
30
+ """password_manager::GetClientTag (password_proto_utils.cc)."""
31
+ fields = (d.origin, d.username_element, d.username_value, d.password_element, d.signon_realm)
32
+ return "|".join(escape_path(f) for f in fields)
chromesync/cli.py ADDED
@@ -0,0 +1,96 @@
1
+ """chromesync command line: saved passwords of the account signed in to the local Chrome.
2
+
3
+ chromesync passwords list [--fingerprint FP] [--json]
4
+ printf %s "$NEW" | chromesync passwords set --fingerprint FP # every entry holding that value
5
+ printf %s "$NEW" | chromesync passwords set --client-tag-hash H
6
+ printf %s "$PW" | chromesync passwords add --origin https://example.org/ --username me
7
+ chromesync passwords delete --client-tag-hash H
8
+
9
+ Secrets are read from stdin (or prompted twice on a terminal), never taken as arguments and never
10
+ printed: entries are identified by origin, username, client tag hash and the 12-hex SHA-256
11
+ fingerprint of their password. Exit 0 on success, 1 when nothing matched or the server refused,
12
+ 2 on usage errors.
13
+ """
14
+ from __future__ import annotations
15
+
16
+ import argparse
17
+ import getpass
18
+ import json
19
+ import sys
20
+ from pathlib import Path
21
+
22
+ from chromesync import ChromeProfile, Password, PasswordStore, open_passwords
23
+
24
+
25
+ def _read_secret() -> str:
26
+ if sys.stdin.isatty():
27
+ first, second = getpass.getpass("new password: "), getpass.getpass("again: ")
28
+ if first != second:
29
+ raise SystemExit("the two entries differ; nothing changed")
30
+ value = first
31
+ else:
32
+ value = sys.stdin.read().rstrip("\n")
33
+ if not value:
34
+ raise SystemExit("empty password; nothing changed")
35
+ return value
36
+
37
+
38
+ def _row(p: Password) -> dict[str, str]:
39
+ return {"origin": p.origin, "username": p.username, "fingerprint": p.fingerprint,
40
+ "client_tag_hash": p.client_tag_hash}
41
+
42
+
43
+ def _select(store: PasswordStore, a: argparse.Namespace) -> list[Password]:
44
+ if not (a.fingerprint or a.client_tag_hash):
45
+ raise SystemExit("give --fingerprint or --client-tag-hash")
46
+ return store.find(fingerprint_of_password=a.fingerprint, client_tag_hash=a.client_tag_hash)
47
+
48
+
49
+ def main(argv: list[str] | None = None) -> int:
50
+ ap = argparse.ArgumentParser(prog="chromesync", description=__doc__,
51
+ formatter_class=argparse.RawDescriptionHelpFormatter)
52
+ ap.add_argument("--profile", type=Path, help="Chrome profile directory (default ~/.config/google-chrome/Default)")
53
+ ap.add_argument("--json", action="store_true", help="JSON output")
54
+ sub = ap.add_subparsers(dest="kind", required=True)
55
+ pw = sub.add_parser("passwords").add_subparsers(dest="cmd", required=True)
56
+ for name in ("list", "set", "delete"):
57
+ p = pw.add_parser(name)
58
+ p.add_argument("--fingerprint", help="12-hex SHA-256 prefix of the saved password")
59
+ p.add_argument("--client-tag-hash")
60
+ add = pw.add_parser("add")
61
+ add.add_argument("--origin", required=True)
62
+ add.add_argument("--username", required=True)
63
+ a = ap.parse_args(argv)
64
+
65
+ store = open_passwords(ChromeProfile(a.profile) if a.profile else None)
66
+ if a.cmd == "list":
67
+ rows = [_row(p) for p in store.find(fingerprint_of_password=a.fingerprint, client_tag_hash=a.client_tag_hash)]
68
+ if a.json:
69
+ print(json.dumps(rows, indent=1))
70
+ for r in [] if a.json else rows:
71
+ print(f"{r['fingerprint']} {r['origin']} {r['username']} {r['client_tag_hash']}")
72
+ return 0
73
+ if a.cmd == "add":
74
+ result = [_row(store.add(a.origin, a.username, _read_secret()))]
75
+ else:
76
+ targets = _select(store, a)
77
+ if not targets:
78
+ print("no saved password matches", file=sys.stderr)
79
+ return 1
80
+ if a.cmd == "set":
81
+ value = _read_secret()
82
+ result = [_row(store.set_password(p, value)) for p in targets]
83
+ else:
84
+ for t in targets:
85
+ store.delete(t)
86
+ result = [_row(p) for p in targets]
87
+ if a.json:
88
+ print(json.dumps({a.cmd: result}, indent=1))
89
+ else:
90
+ for r in result:
91
+ print(f"{a.cmd}: {r['origin']} {r['username']} now {r['fingerprint']}")
92
+ return 0
93
+
94
+
95
+ if __name__ == "__main__":
96
+ raise SystemExit(main())
@@ -0,0 +1,173 @@
1
+ """Saved passwords of a Chrome Sync account: list, add, change, delete on the server."""
2
+ from __future__ import annotations
3
+
4
+ import base64
5
+ import hashlib
6
+ import time
7
+ import uuid
8
+ from collections.abc import Sequence
9
+ from dataclasses import dataclass
10
+
11
+ from chromesync._client import SyncClient
12
+ from chromesync._nigori import Nigori
13
+ from chromesync._proto.components.sync.protocol import (
14
+ nigori_specifics_pb2,
15
+ password_specifics_pb2,
16
+ sync_entity_pb2,
17
+ )
18
+ from chromesync._tags import client_tag_hash, password_client_tag, type_field_number
19
+
20
+ PASSWORDS = type_field_number("password")
21
+ NIGORI = type_field_number("nigori")
22
+ _WINDOWS_EPOCH_OFFSET_S = 11_644_473_600
23
+
24
+
25
+ def windows_epoch_micros(t: float | None = None) -> int:
26
+ """Chrome's timestamp: microseconds since 1601-01-01."""
27
+ return int(((time.time() if t is None else t) + _WINDOWS_EPOCH_OFFSET_S) * 1_000_000)
28
+
29
+
30
+ def fingerprint(secret: bytes | str) -> str:
31
+ """First 12 hex digits of SHA-256: identifies a secret without revealing it."""
32
+ return hashlib.sha256(secret.encode() if isinstance(secret, str) else secret).hexdigest()[:12]
33
+
34
+
35
+ class KeyBag(dict[str, Nigori]):
36
+ """The account's Nigori keys, by key name."""
37
+
38
+ @classmethod
39
+ def from_nigori(cls, nigori: nigori_specifics_pb2.NigoriSpecifics, *,
40
+ trusted_vault_keys: Sequence[bytes] = (),
41
+ keystore_keys: Sequence[bytes] = (),
42
+ custom_passphrase: str | None = None) -> KeyBag:
43
+ """Open the server's encryption_keybag with whichever secret the passphrase type needs."""
44
+ candidates = [Nigori.derive_pbkdf2(base64.b64encode(k)) for k in (*trusted_vault_keys, *keystore_keys)]
45
+ if custom_passphrase is not None:
46
+ if nigori.custom_passphrase_key_derivation_method == 2: # SCRYPT_8192_8_11
47
+ salt = base64.b64decode(nigori.custom_passphrase_key_derivation_salt)
48
+ candidates.append(Nigori.derive_scrypt(custom_passphrase.encode(), salt))
49
+ else:
50
+ candidates.append(Nigori.derive_pbkdf2(custom_passphrase.encode()))
51
+ bag = nigori.encryption_keybag
52
+ for key in candidates:
53
+ if key.key_name() == bag.key_name:
54
+ keys = nigori_specifics_pb2.NigoriKeyBag.FromString(key.decrypt(bag.blob))
55
+ out = cls()
56
+ for k in keys.key:
57
+ n = Nigori(k.encryption_key, k.mac_key)
58
+ out[n.key_name()] = n
59
+ return out
60
+ raise LookupError("none of the given secrets opens the account's key bag")
61
+
62
+
63
+ @dataclass
64
+ class Password:
65
+ """One saved password: the server entity and its decrypted data."""
66
+
67
+ entity: sync_entity_pb2.SyncEntity
68
+ data: password_specifics_pb2.PasswordSpecificsData
69
+
70
+ @property
71
+ def client_tag_hash(self) -> str:
72
+ return str(self.entity.client_tag_hash)
73
+
74
+ @property
75
+ def origin(self) -> str:
76
+ return str(self.data.origin)
77
+
78
+ @property
79
+ def username(self) -> str:
80
+ return str(self.data.username_value)
81
+
82
+ @property
83
+ def fingerprint(self) -> str:
84
+ return fingerprint(self.data.password_value)
85
+
86
+
87
+ class PasswordStore:
88
+ """The PASSWORDS data type of one account, read and written through a SyncClient."""
89
+
90
+ def __init__(self, client: SyncClient, keys: KeyBag) -> None:
91
+ self.client, self.keys = client, keys
92
+
93
+ @classmethod
94
+ def open(cls, client: SyncClient, **secrets: object) -> PasswordStore:
95
+ """Fetch the account's Nigori node and open its key bag (secrets: see KeyBag.from_nigori)."""
96
+ nodes = client.get_updates(NIGORI, need_encryption_key=True)
97
+ nigori = next(e.specifics.nigori for e in nodes.entities if e.specifics.HasField("nigori"))
98
+ if "keystore_keys" not in secrets:
99
+ secrets["keystore_keys"] = nodes.encryption_keys
100
+ return cls(client, KeyBag.from_nigori(nigori, **secrets)) # type: ignore[arg-type]
101
+
102
+ def _decrypt(self, entity: sync_entity_pb2.SyncEntity) -> Password:
103
+ enc = entity.specifics.password.encrypted
104
+ return Password(entity, password_specifics_pb2.PasswordSpecificsData.FromString(
105
+ self.keys[enc.key_name].decrypt(enc.blob)))
106
+
107
+ def all(self) -> list[Password]:
108
+ """Every live saved password, decrypted."""
109
+ return [self._decrypt(e) for e in self.client.get_updates(PASSWORDS).entities
110
+ if not e.deleted and e.specifics.HasField("password")]
111
+
112
+ def find(self, *, fingerprint_of_password: str | None = None, client_tag_hash: str | None = None) -> list[Password]:
113
+ return [p for p in self.all()
114
+ if (fingerprint_of_password is None or p.fingerprint == fingerprint_of_password)
115
+ and (client_tag_hash is None or p.client_tag_hash == client_tag_hash)]
116
+
117
+ def _current_key(self) -> str:
118
+ if len(self.keys) == 1:
119
+ return next(iter(self.keys))
120
+ # the key the newest record was written with is the default encryption key
121
+ newest = max((e for e in self.client.get_updates(PASSWORDS).entities if e.specifics.HasField("password")),
122
+ key=lambda e: e.version, default=None)
123
+ if newest is None:
124
+ raise LookupError("cannot tell the account's current encryption key")
125
+ return str(newest.specifics.password.encrypted.key_name)
126
+
127
+ def set_password(self, password: Password, new_value: str) -> Password:
128
+ """Change one saved password on the server; returns it as committed."""
129
+ data = password_specifics_pb2.PasswordSpecificsData()
130
+ data.CopyFrom(password.data)
131
+ data.password_value = new_value
132
+ data.date_password_modified_windows_epoch_micros = windows_epoch_micros()
133
+ old = password.entity
134
+ entity = sync_entity_pb2.SyncEntity(id_string=old.id_string, version=old.version, name=old.name,
135
+ client_tag_hash=old.client_tag_hash, ctime=old.ctime,
136
+ mtime=int(time.time() * 1000), deleted=False)
137
+ entity.specifics.CopyFrom(old.specifics) # keeps unencrypted metadata and the notes backup
138
+ key_name = old.specifics.password.encrypted.key_name
139
+ entity.specifics.password.encrypted.blob = self.keys[key_name].encrypt(data.SerializeToString())
140
+ reply = self.client.commit(entity)
141
+ entity.version = reply.version
142
+ return Password(entity, data)
143
+
144
+ def add(self, origin: str, username: str, value: str, signon_realm: str | None = None) -> Password:
145
+ """Save a new password for a web form login."""
146
+ now = time.time()
147
+ data = password_specifics_pb2.PasswordSpecificsData(
148
+ scheme=0, signon_realm=signon_realm or origin, origin=origin, action=origin,
149
+ username_element="", username_value=username, password_element="", password_value=value,
150
+ date_created=windows_epoch_micros(now),
151
+ date_password_modified_windows_epoch_micros=windows_epoch_micros(now),
152
+ blacklisted=False, type=0, times_used=0)
153
+ entity = sync_entity_pb2.SyncEntity(
154
+ id_string=str(uuid.uuid4()), version=0, name="encrypted", deleted=False,
155
+ client_tag_hash=client_tag_hash("password", password_client_tag(data)),
156
+ ctime=int(now * 1000), mtime=int(now * 1000))
157
+ key_name = self._current_key()
158
+ spec = entity.specifics.password
159
+ spec.encrypted.key_name = key_name
160
+ spec.encrypted.blob = self.keys[key_name].encrypt(data.SerializeToString())
161
+ spec.unencrypted_metadata.url = data.signon_realm
162
+ spec.unencrypted_metadata.blacklisted = False
163
+ reply = self.client.commit(entity)
164
+ entity.id_string, entity.version = reply.id_string or entity.id_string, reply.version
165
+ return Password(entity, data)
166
+
167
+ def delete(self, password: Password) -> None:
168
+ old = password.entity
169
+ entity = sync_entity_pb2.SyncEntity(id_string=old.id_string, version=old.version, name=old.name,
170
+ client_tag_hash=old.client_tag_hash, deleted=True,
171
+ mtime=int(time.time() * 1000))
172
+ entity.specifics.password.SetInParent()
173
+ self.client.commit(entity)
@@ -0,0 +1,97 @@
1
+ Metadata-Version: 2.5
2
+ Name: chromesync
3
+ Version: 0.2.0
4
+ Summary: A Chrome Sync protocol client: read and change the saved passwords of a Google account, server side
5
+ Project-URL: Homepage, https://github.com/monperrus/chromesync
6
+ Project-URL: Repository, https://github.com/monperrus/chromesync
7
+ Project-URL: Issues, https://github.com/monperrus/chromesync/issues
8
+ Author: Martin Monperrus
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Keywords: chrome,chrome-sync,google-password-manager,nigori,passwords,trusted-vault
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Operating System :: POSIX :: Linux
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Topic :: Security :: Cryptography
18
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
19
+ Requires-Python: >=3.13
20
+ Requires-Dist: cryptography>=42
21
+ Requires-Dist: protobuf>=4.21
22
+ Requires-Dist: secretstorage>=3.3
23
+ Provides-Extra: dev
24
+ Requires-Dist: mypy>=1.10; extra == 'dev'
25
+ Requires-Dist: pytest-cov>=5; extra == 'dev'
26
+ Requires-Dist: pytest>=8; extra == 'dev'
27
+ Requires-Dist: ruff>=0.5; extra == 'dev'
28
+ Requires-Dist: types-protobuf; extra == 'dev'
29
+ Description-Content-Type: text/markdown
30
+
31
+ # chromesync
32
+
33
+ A Python client for the Chrome Sync protocol. It reads and changes the saved passwords of a Google
34
+ account **on the sync server**, so every Chrome signed in to that account downloads the change
35
+ (within seconds for a running Chrome). Nothing is edited in Chrome's local files.
36
+
37
+ It works for accounts with on-device encryption ("trusted vault"), the default keystore encryption,
38
+ and custom sync passphrases.
39
+
40
+ ## How it authenticates
41
+
42
+ chromesync acts as the Chrome installed on the same machine, for the account signed in to it:
43
+
44
+ - the OAuth refresh token Chrome stores in the profile's `Web Data` (encrypted with OSCrypt, whose key
45
+ is the "Chrome Safe Storage" secret in the Secret Service);
46
+ - Google Chrome's OAuth client, whose secret is read from the installed binary
47
+ (`/opt/google/chrome/chrome`) at run time; the `chromesync` scope is granted to no other client;
48
+ - for on-device encryption, the trusted-vault keys in the profile's `trusted_vault.pb`.
49
+
50
+ Linux only, Google Chrome with the libsecret password store. Use it on your own account.
51
+
52
+ ## Command line
53
+
54
+ ```bash
55
+ chromesync passwords list # fingerprint, origin, username, client tag hash
56
+ chromesync passwords list --fingerprint f52fbd32b2b3 --json
57
+ printf %s "$NEW" | chromesync passwords set --fingerprint f52fbd32b2b3 # every entry holding that password
58
+ printf %s "$PW" | chromesync passwords add --origin https://example.org/ --username me
59
+ chromesync passwords delete --client-tag-hash 'iNFQtRFQb+IZcn1kKUJEZDDkLs4='
60
+ ```
61
+
62
+ Passwords are read from stdin (or prompted twice on a terminal); they are never arguments and never
63
+ printed. A password is identified by its fingerprint: the first 12 hex digits of its SHA-256.
64
+
65
+ ## Library
66
+
67
+ ```python
68
+ from chromesync import open_passwords
69
+
70
+ store = open_passwords() # ~/.config/google-chrome/Default
71
+ for p in store.find(fingerprint_of_password="f52fbd32b2b3"):
72
+ store.set_password(p, new_value)
73
+ ```
74
+
75
+ Lower layers: `SyncClient` (GetUpdates/Commit over HTTPS, any transport), `PasswordStore`,
76
+ `KeyBag`/`Nigori` (Chrome Sync encryption), `ChromeProfile` (local token, account and keys).
77
+
78
+ ## Protocol buffers
79
+
80
+ `proto/` holds Chromium's sync `.proto` files and `chromesync/_proto/` the code generated from them,
81
+ at the commit recorded in `chromesync._proto.CHROMIUM_COMMIT`. `tools/update_protos.py` updates
82
+ both to Chromium main (needs `protoc`); `tools/update_protos.py --check` fails when Chromium main's
83
+ `.proto` files differ from `proto/`, which CI runs on every push and weekly.
84
+
85
+ ## Development
86
+
87
+ ```bash
88
+ uv venv && uv pip install -e '.[dev]'
89
+ .venv/bin/pytest && .venv/bin/ruff check . && .venv/bin/mypy chromesync tests
90
+ ```
91
+
92
+ The crypto tests are known-answer tests copied from Chromium's own unit tests; the protocol tests run
93
+ against an in-memory sync server (`tests/fake_server.py`).
94
+
95
+ ## License
96
+
97
+ MIT
@@ -0,0 +1,100 @@
1
+ chromesync/__init__.py,sha256=9wrdUkEL-q6WFMXptW4xdXzonACeEE93w1-SpxqQPAw,1918
2
+ chromesync/_client.py,sha256=geBX1Bho36lZhMsMFvINqlNJKc-ymgSxmNBryyMUUd4,5008
3
+ chromesync/_nigori.py,sha256=CoboxIA4FaSC_sS7CHdMWS0MB82h0HQTTI_f29cXx_c,3243
4
+ chromesync/_oscrypt.py,sha256=FoFTePo6v2VLMgTiupX_agTqg2UCdsAepQyAJxADYPE,2016
5
+ chromesync/_profile.py,sha256=kdXxHWns-9USMts0uriT6aFFhMQAW29Z8P06zCFQDXA,4503
6
+ chromesync/_tags.py,sha256=Q6bfVU0W3zJJ4whl33q1fIO1IlTrA5AQNmliW5g0U4E,1492
7
+ chromesync/cli.py,sha256=GTylD9XMUD2Gjw9us7hwAZ2aatr1-yLWXdA2zHWqVFE,3957
8
+ chromesync/passwords.py,sha256=leg6qGSqGbLVlzzrs1sSY2npr_c32XVI6rVvLv9Xjh4,8251
9
+ chromesync/_proto/__init__.py,sha256=S6lKcu_iVhNE3BlFnTdwG2pZvFZeoe0GP_oad2PmfOk,150
10
+ chromesync/_proto/components/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
+ chromesync/_proto/components/sync/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
+ chromesync/_proto/components/sync/protocol/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
+ chromesync/_proto/components/sync/protocol/account_setting_specifics_pb2.py,sha256=GzPF6tBuZ-2CsmIoBAEgQnDoUbQGJT7HkAIlqhqyoZs,1408
14
+ chromesync/_proto/components/sync/protocol/agile_encryption_keys_pb2.py,sha256=kkcqFKoqXPzfzXH7VoXGFBw_AeiE1z9AE0fiRFabkE8,2539
15
+ chromesync/_proto/components/sync/protocol/ai_thread_specifics_pb2.py,sha256=A1JpkjRFB0yW9n8N47rD8q4KVmr9lC2_zq0ZuFp6xBg,1630
16
+ chromesync/_proto/components/sync/protocol/app_list_specifics_pb2.py,sha256=KfOkSIniTQIU8P5CF5OOiP01OQ0Vec1w6PmC26zopTw,2844
17
+ chromesync/_proto/components/sync/protocol/app_setting_specifics_pb2.py,sha256=_Nh57l1xzuMVNr0wPSIBHqzq-mCOE0qACZwSMIMMGx4,1504
18
+ chromesync/_proto/components/sync/protocol/app_specifics_pb2.py,sha256=YKTeKC4hpp6yowMYVqvw0npU4QorS8xF07nG8KO9GOI,3770
19
+ chromesync/_proto/components/sync/protocol/arc_package_specifics_pb2.py,sha256=0hB4AO5jmqrIQoTuWupOI-1Ge4w2nTLJ330JGUsZ0G4,1383
20
+ chromesync/_proto/components/sync/protocol/attachment_pb2.py,sha256=P2V7Uwf-UAUbvsDgMpy62lldcvIoQof01SlZtyEmMgY,1235
21
+ chromesync/_proto/components/sync/protocol/autofill_entity_suppression_specifics_pb2.py,sha256=ZLuGb_3DwjsDG5atlyZLKksvVAzq1DJGVhAHGdBwozs,3126
22
+ chromesync/_proto/components/sync/protocol/autofill_offer_specifics_pb2.py,sha256=mcMd9XTLa7WSmO9iZ-Ajl8uxRCCjRPGsJ8vDpLqYH1I,3315
23
+ chromesync/_proto/components/sync/protocol/autofill_specifics_pb2.py,sha256=MpF17ZIUKK7A7vZgWK0cwelxC8awTxlxNL4ILs3ocnE,26112
24
+ chromesync/_proto/components/sync/protocol/autofill_valuable_metadata_specifics_pb2.py,sha256=GhYIShIRJ2pIEfzrD3fNTQbxy62xPifIyS2u7nOSu_g,2132
25
+ chromesync/_proto/components/sync/protocol/autofill_valuable_specifics_pb2.py,sha256=M9hDk8IBpOrLnmbRBeYJ7zrow4i48M8SEd8JpdP3hHQ,9162
26
+ chromesync/_proto/components/sync/protocol/autofill_wallet_credential_specifics_pb2.py,sha256=EpE3ZuFxgMx4HAL3qurggYMfFTsqhMfXvqrRf1St9Mg,1411
27
+ chromesync/_proto/components/sync/protocol/autofill_wallet_usage_specifics_pb2.py,sha256=uhNJJXeeWhlnfM8tU7NQJAROluYNzPU67V3jis_vPek,1806
28
+ chromesync/_proto/components/sync/protocol/bookmark_specifics_pb2.py,sha256=1NBPvNB_ZykF7s0R4MSgDpxo8ah0Yjfu1PFhjSe4_N0,2403
29
+ chromesync/_proto/components/sync/protocol/client_commands_pb2.py,sha256=yqDVFY981h57W_U-QFnohm1i8SDWjhYYZeI27U7wHFA,2498
30
+ chromesync/_proto/components/sync/protocol/client_debug_info_pb2.py,sha256=x1B_0lMY993xys1CE86m5P0D5YDcn2feAQ-kNGQo-P4,3245
31
+ chromesync/_proto/components/sync/protocol/collaboration_group_specifics_pb2.py,sha256=RKvKukBKhnpPwwfmuOiYSNdz4X2aqVIQbfCUn3lRD-M,1454
32
+ chromesync/_proto/components/sync/protocol/contact_info_specifics_pb2.py,sha256=FI_HqdPL02rGZwJTefjAjWVw3avgmTD72S-kz01w3U8,8027
33
+ chromesync/_proto/components/sync/protocol/contextual_task_specifics_pb2.py,sha256=tmIEgyVch5k-Wp9awtQIFDcup2b0wjA-QrwgybYRRBg,2102
34
+ chromesync/_proto/components/sync/protocol/cookie_specifics_pb2.py,sha256=c92RGZD5KOpzsIMdFqxnlTXRZAsKDlsOznnyRhGyYI0,3447
35
+ chromesync/_proto/components/sync/protocol/data_type_progress_marker_pb2.py,sha256=SHNMP1AO0SNYaaMbvP5MQ_wtpJPwxRzNswOSLCVs4nc,4101
36
+ chromesync/_proto/components/sync/protocol/deletion_origin_pb2.py,sha256=X75-hDWeRrZjhFJarS7Lbs_Z3TljxPOyPR0Q8-Rh3dA,1908
37
+ chromesync/_proto/components/sync/protocol/device_info_specifics_pb2.py,sha256=TS_UmkOzajj4oC-J9izEEYFuKSSXqMSpdgzpypGS0kQ,8258
38
+ chromesync/_proto/components/sync/protocol/dictionary_specifics_pb2.py,sha256=Xyf6G19NH1ZaoSae9z7pLBPjQKq-07xRzFJZrwhaQMY,1219
39
+ chromesync/_proto/components/sync/protocol/encrypted_tab_context_container_specifics_pb2.py,sha256=b0iNYxw9fo76YmgsZEjgwO2B5Grl-QTv1sDsIsA-xUY,1698
40
+ chromesync/_proto/components/sync/protocol/encrypted_tab_context_item_specifics_pb2.py,sha256=ZC6k8OABL1t0vWQaZh19vKVz3lg77x_SunChSIBdOrY,1850
41
+ chromesync/_proto/components/sync/protocol/encryption_pb2.py,sha256=v9CO3cwPqlqrYfDL4EsPEZDi2WOqAQdXmRPYAxNFdQA,1287
42
+ chromesync/_proto/components/sync/protocol/entity_specifics_pb2.py,sha256=Le_uzv3b2GNxF7d9-2xji7Ndy8XiJ6D3pp3cOMUSznE,24345
43
+ chromesync/_proto/components/sync/protocol/extension_setting_specifics_pb2.py,sha256=NTj4MT33Me6s3_lV15S8sLE1JheVu7kCHtZEHHRCwtU,1336
44
+ chromesync/_proto/components/sync/protocol/extension_specifics_pb2.py,sha256=hRHeK-vAxrt4V34UOJ5TS6mVtOO_HtcxeHViauanJEw,2247
45
+ chromesync/_proto/components/sync/protocol/gaia_password_reuse_pb2.py,sha256=IXn3Q5WPGR1g4gHUWyzocipxm2xtZJV1oqajC6Y4QaI,4558
46
+ chromesync/_proto/components/sync/protocol/gemini_thread_specifics_pb2.py,sha256=4K2HBMnmozBMaT_DjMChxldixKDJXQn-u_bNlotN-qg,1340
47
+ chromesync/_proto/components/sync/protocol/get_updates_caller_info_pb2.py,sha256=5n2fb7xp9PR5-WV5nWjx6PmHhsH4uufO8PSDCIOqE5A,1280
48
+ chromesync/_proto/components/sync/protocol/history_delete_directive_specifics_pb2.py,sha256=L0_VMMj-Ttrn6Ji8Aqj7zo3T3H0k16l7pFBF-46wPoc,2243
49
+ chromesync/_proto/components/sync/protocol/history_specifics_pb2.py,sha256=ZqpkHUqphf4BYdgKrk9lUsvwvc6wbJ0Pv_dgdPPvjgI,3809
50
+ chromesync/_proto/components/sync/protocol/journey_specifics_pb2.py,sha256=jIyvikCq_3YCvQsIeOnlD6L4WcrhyNz1gwl2N_oAMsE,2569
51
+ chromesync/_proto/components/sync/protocol/managed_user_setting_specifics_pb2.py,sha256=WexUcDKGeAudTsgmBvei1AqyaSTagFAZauTWOu6oNrM,1304
52
+ chromesync/_proto/components/sync/protocol/nigori_specifics_pb2.py,sha256=11IHLPlZ3zelQsAY65apBN-sinH_x_x8trl1auAtFlM,7234
53
+ chromesync/_proto/components/sync/protocol/notebook_specifics_pb2.py,sha256=erNOGBw_csx8FQrsZZ2OO54SzYxlMX0EcUeEo_Lwt1I,1549
54
+ chromesync/_proto/components/sync/protocol/os_preference_specifics_pb2.py,sha256=4KgEWf7ojwwshvfX6IrQtqabA6T3sJQFlByC21I2bIA,1484
55
+ chromesync/_proto/components/sync/protocol/os_priority_preference_specifics_pb2.py,sha256=Ldqg2Vd2gQNClCCa3aO_ZJN1KTFGRxJRsl3o7Hz8Dk0,1535
56
+ chromesync/_proto/components/sync/protocol/password_sharing_invitation_specifics_pb2.py,sha256=zC3uhYEzrRA19WMRHQ_-R8ww7iDgHB_fOH7tDS-LnKA,4704
57
+ chromesync/_proto/components/sync/protocol/password_specifics_pb2.py,sha256=8YKoFdvf_aCiv0qcMjFyRT7Gt_guVBYaAuikHpeHABQ,5611
58
+ chromesync/_proto/components/sync/protocol/preference_specifics_pb2.py,sha256=nv6A0quI12bZci3UfjWS5WpiVMtLtiLYqTf1ayBcF-o,1250
59
+ chromesync/_proto/components/sync/protocol/printer_specifics_pb2.py,sha256=WzG8om4vhze1lFCD4VVxI_YVNKeiog39Q9zheIfL1yc,2945
60
+ chromesync/_proto/components/sync/protocol/printers_authorization_server_specifics_pb2.py,sha256=0TtZl2rsjABPkV8UVHKCRJ3N8sya5iB1pdBnzTtAZCY,1321
61
+ chromesync/_proto/components/sync/protocol/priority_preference_specifics_pb2.py,sha256=MH4yrB2OV3B6F7knTwKhR2fwRQjWEwc1dSHOETnPM2o,1520
62
+ chromesync/_proto/components/sync/protocol/product_comparison_specifics_pb2.py,sha256=VJXSnS_uJ1iWeYWhfY6wvydOT2iEk_7rcg5dzD4fQWU,2504
63
+ chromesync/_proto/components/sync/protocol/reading_list_specifics_pb2.py,sha256=xAdPpmGrXWVQWI4YSQgfatpY9y577aLh7KtKWu3cF2Q,1911
64
+ chromesync/_proto/components/sync/protocol/saved_tab_group_specifics_pb2.py,sha256=1ZrzC34X_GUEpWo5oQu2c9NW91mLK8Or2oKtHyDadQI,3197
65
+ chromesync/_proto/components/sync/protocol/search_engine_specifics_pb2.py,sha256=HXtALkw0EzBXcD2Z44R5SW5exejIw0B81r5BKot6dFg,3720
66
+ chromesync/_proto/components/sync/protocol/security_event_specifics_pb2.py,sha256=0mT7yj4EDVcoH21xc2ipT4x5hLfJyIQP149lzfenkhM,1577
67
+ chromesync/_proto/components/sync/protocol/send_tab_to_self_specifics_pb2.py,sha256=9b1MKjOXMIFu3H9WxdOZ29CgSAQmQyJkJCkjQXzjAj4,9977
68
+ chromesync/_proto/components/sync/protocol/session_specifics_pb2.py,sha256=uNDRrctnujYl53bV1vN-F2-d_dxQJTUdYq3lImZ3Y-w,4888
69
+ chromesync/_proto/components/sync/protocol/shared_comment_specifics_pb2.py,sha256=q0TuzwH6Y1l8cS4Fw6rCxi1WbrUwDH-11O2lQE4DNY0,3858
70
+ chromesync/_proto/components/sync/protocol/shared_tab_group_account_data_specifics_pb2.py,sha256=Kso9KEPCpTkGqIvNn4IgK9XHTbBZR38kW1FH99YjQjE,2119
71
+ chromesync/_proto/components/sync/protocol/shared_tab_group_data_specifics_pb2.py,sha256=GlgxJwCxlmVr_eCYuOVSwyHTlsB1XYcdjfVhRP8zT6o,2720
72
+ chromesync/_proto/components/sync/protocol/sharing_message_specifics_pb2.py,sha256=QV2bH-piNnR4w9a39tsYG1C1e4TlHJ9VcahCj5qHwPQ,4294
73
+ chromesync/_proto/components/sync/protocol/skill_specifics_pb2.py,sha256=-Tj51M4RWl0x2b04EgnCMg4ri5D0NIB_pKF851xHkNE,2214
74
+ chromesync/_proto/components/sync/protocol/sync_entity_pb2.py,sha256=Y66OFqLsT8SktivMDsWQhg0F34gpqjWHaQLSHv6LF-U,4774
75
+ chromesync/_proto/components/sync/protocol/sync_enums_pb2.py,sha256=aj8wLlJ7ET87EGsyUOipc7D2P9X_ITgcpdLQwx9_HcA,7966
76
+ chromesync/_proto/components/sync/protocol/sync_pb2.py,sha256=YnwEySgCoXl3_oySNgCclxEXI0hr3ntsuEnNC7LMkco,11339
77
+ chromesync/_proto/components/sync/protocol/tab_group_attribution_metadata_pb2.py,sha256=siukNv7gygvJUeDeCcRJKjpJhh9H6l_p1W02tAYGTRc,1880
78
+ chromesync/_proto/components/sync/protocol/tab_navigation_pb2.py,sha256=39-IseD94ypQRYaXajZg9qS9XU9xasPibw2T5qQ-jVU,5656
79
+ chromesync/_proto/components/sync/protocol/theme_android_specifics_pb2.py,sha256=pei-yzgkZJJcBuZwz_8gvnghUxyPVF_2EziD_myVQ14,1905
80
+ chromesync/_proto/components/sync/protocol/theme_ios_specifics_pb2.py,sha256=58qkE-Hfd0HL3HLmAw6RvjP4QTk6_zaaVlANXHdtjaY,1512
81
+ chromesync/_proto/components/sync/protocol/theme_specifics_pb2.py,sha256=o4R3mxNoZ-7IJ7YAasdVahf_Ys1skjubmoVFDHE_4uc,2674
82
+ chromesync/_proto/components/sync/protocol/theme_types_pb2.py,sha256=T6SwJQt2D-2rhioS7X-xxdXoXS3giogR8gNsMiFkGlQ,2130
83
+ chromesync/_proto/components/sync/protocol/typed_url_specifics_pb2.py,sha256=N6m7tX4Cg-u3QObb6YktVAQMZ7eV-DpGNafeY5DtGpU,1815
84
+ chromesync/_proto/components/sync/protocol/unencrypted_sharing_message_pb2.py,sha256=fyoBtUlfkdq2o7KISaJDxJk4_8ro9fpLQH7MPzgM2O4,3284
85
+ chromesync/_proto/components/sync/protocol/unique_position_pb2.py,sha256=SJxuoz_dJDV1NNhi3YVN5CPDLDQt8Q7Ob_vtMfmb6FM,1857
86
+ chromesync/_proto/components/sync/protocol/user_consent_specifics_pb2.py,sha256=8St--jM2vTyj_wMF2a9uoYuhCHtRvZ6XJTENe6w0XlE,5094
87
+ chromesync/_proto/components/sync/protocol/user_consent_types_pb2.py,sha256=AVSU5QzT3-54WN3EMJub0BlwbFV4RwNVd3o30NMnTm0,5539
88
+ chromesync/_proto/components/sync/protocol/user_event_specifics_pb2.py,sha256=Y91TwqWd_n6_Vc6rlssWZ0aIkRq_FGaedshkgvxt6aM,3304
89
+ chromesync/_proto/components/sync/protocol/web_app_specifics_pb2.py,sha256=1qMsY6skd1We4ypY7NCWgq-Q4hkFBW5jTcAILojZTjc,2642
90
+ chromesync/_proto/components/sync/protocol/webauthn_credential_specifics_pb2.py,sha256=WHpOS8De9TS9KqWJJ_j2O5q3-lhjJPvGxXtIXJmuElY,3123
91
+ chromesync/_proto/components/sync/protocol/wifi_configuration_specifics_pb2.py,sha256=fq9d1N_rPVork7YhCYkNFY1phd-YV8RjZ5mIColvggc,5055
92
+ chromesync/_proto/components/sync/protocol/workspace_desk_specifics_pb2.py,sha256=0fQAjQZwHsH5r0lrXUALeEnylD7H4Bm3eAtDxpWKASI,9275
93
+ chromesync/_proto/components/trusted_vault/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
94
+ chromesync/_proto/components/trusted_vault/proto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
95
+ chromesync/_proto/components/trusted_vault/proto/local_trusted_vault_pb2.py,sha256=JINvwBxypr9m9xR8AUyz2-0zNgRfPcXRoyDXx-W3dAI,4186
96
+ chromesync-0.2.0.dist-info/METADATA,sha256=kGI9Rw2q3qAIrcPrMO9LKSf-pkCAt9luLKp-SBr1aoo,4143
97
+ chromesync-0.2.0.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
98
+ chromesync-0.2.0.dist-info/entry_points.txt,sha256=d7428bYPFmitusun6UVojGuDrgc37XRTgUjgeKyNaJI,51
99
+ chromesync-0.2.0.dist-info/licenses/LICENSE,sha256=cZcVt0H9cnb7yEUhuaOjEY44tOenoE73-XlnbE3fTG8,1073
100
+ chromesync-0.2.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.33.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ chromesync = chromesync.cli:main