lamda 3.123__tar.gz → 3.138__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. {lamda-3.123 → lamda-3.138}/PKG-INFO +3 -2
  2. {lamda-3.123 → lamda-3.138}/README.md +7 -1
  3. {lamda-3.123 → lamda-3.138}/lamda/__init__.py +1 -1
  4. {lamda-3.123 → lamda-3.138}/lamda/client.py +16 -3
  5. {lamda-3.123 → lamda-3.138}/lamda/rpc/services.proto +1 -0
  6. {lamda-3.123 → lamda-3.138}/lamda/rpc/uiautomator.proto +6 -0
  7. {lamda-3.123 → lamda-3.138}/lamda.egg-info/PKG-INFO +3 -2
  8. {lamda-3.123 → lamda-3.138}/lamda.egg-info/requires.txt +4 -1
  9. {lamda-3.123 → lamda-3.138}/setup.py +2 -1
  10. {lamda-3.123 → lamda-3.138}/lamda/bcast.proto +0 -0
  11. {lamda-3.123 → lamda-3.138}/lamda/const.py +0 -0
  12. {lamda-3.123 → lamda-3.138}/lamda/exceptions.py +0 -0
  13. {lamda-3.123 → lamda-3.138}/lamda/google/protobuf/any.proto +0 -0
  14. {lamda-3.123 → lamda-3.138}/lamda/google/protobuf/api.proto +0 -0
  15. {lamda-3.123 → lamda-3.138}/lamda/google/protobuf/compiler/plugin.proto +0 -0
  16. {lamda-3.123 → lamda-3.138}/lamda/google/protobuf/descriptor.proto +0 -0
  17. {lamda-3.123 → lamda-3.138}/lamda/google/protobuf/duration.proto +0 -0
  18. {lamda-3.123 → lamda-3.138}/lamda/google/protobuf/empty.proto +0 -0
  19. {lamda-3.123 → lamda-3.138}/lamda/google/protobuf/field_mask.proto +0 -0
  20. {lamda-3.123 → lamda-3.138}/lamda/google/protobuf/source_context.proto +0 -0
  21. {lamda-3.123 → lamda-3.138}/lamda/google/protobuf/struct.proto +0 -0
  22. {lamda-3.123 → lamda-3.138}/lamda/google/protobuf/timestamp.proto +0 -0
  23. {lamda-3.123 → lamda-3.138}/lamda/google/protobuf/type.proto +0 -0
  24. {lamda-3.123 → lamda-3.138}/lamda/google/protobuf/wrappers.proto +0 -0
  25. {lamda-3.123 → lamda-3.138}/lamda/rpc/application.proto +0 -0
  26. {lamda-3.123 → lamda-3.138}/lamda/rpc/debug.proto +0 -0
  27. {lamda-3.123 → lamda-3.138}/lamda/rpc/file.proto +0 -0
  28. {lamda-3.123 → lamda-3.138}/lamda/rpc/policy.proto +0 -0
  29. {lamda-3.123 → lamda-3.138}/lamda/rpc/proxy.proto +0 -0
  30. {lamda-3.123 → lamda-3.138}/lamda/rpc/settings.proto +0 -0
  31. {lamda-3.123 → lamda-3.138}/lamda/rpc/shell.proto +0 -0
  32. {lamda-3.123 → lamda-3.138}/lamda/rpc/status.proto +0 -0
  33. {lamda-3.123 → lamda-3.138}/lamda/rpc/types.proto +0 -0
  34. {lamda-3.123 → lamda-3.138}/lamda/rpc/util.proto +0 -0
  35. {lamda-3.123 → lamda-3.138}/lamda/rpc/wifi.proto +0 -0
  36. {lamda-3.123 → lamda-3.138}/lamda/types.py +0 -0
  37. {lamda-3.123 → lamda-3.138}/lamda.egg-info/SOURCES.txt +0 -0
  38. {lamda-3.123 → lamda-3.138}/lamda.egg-info/dependency_links.txt +0 -0
  39. {lamda-3.123 → lamda-3.138}/lamda.egg-info/not-zip-safe +0 -0
  40. {lamda-3.123 → lamda-3.138}/lamda.egg-info/top_level.txt +0 -0
  41. {lamda-3.123 → lamda-3.138}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lamda
3
- Version: 3.123
3
+ Version: 3.138
4
4
  Summary: Android reverse engineering & automation framework
5
5
  Home-page: https://github.com/rev1si0n/lamda
6
6
  Author: rev1si0n
@@ -12,4 +12,5 @@ Classifier: Programming Language :: Python :: 3
12
12
  Classifier: Operating System :: Android
13
13
  Classifier: Topic :: Security
14
14
  Requires-Python: >=3.6,<3.11
15
- Provides-Extra: frida
15
+ Provides-Extra: next
16
+ Provides-Extra: full
@@ -300,7 +300,7 @@ pip3 install -U lamda
300
300
  # 如果需要使用内置 frida,务必使用下列方法安装
301
301
  # 你可能需要外网访问来安装 frida,否则可能会卡住许久(~10分钟)直至安装失败
302
302
  # 即使之前安装过 frida,也应该重新执行以下命令
303
- pip3 install -U --force-reinstall 'lamda[frida]'
303
+ pip3 install -U --force-reinstall 'lamda[full]'
304
304
  # 请注意完成安装后,你需要同时使用 pip 更新任何依赖 frida
305
305
  # 的第三方库例如 frida-tools objection 等(如果安装过的话)
306
306
  # 否则后期使用可能会出现难以察觉的异常
@@ -1467,6 +1467,12 @@ d.dump_window_hierarchy().getvalue()
1467
1467
  d.wait_for_idle(5*1000)
1468
1468
  ```
1469
1469
 
1470
+ > 获取最近的 toast
1471
+
1472
+ ```python
1473
+ d.get_last_toast()
1474
+ ```
1475
+
1470
1476
  ## 进阶UI操作
1471
1477
 
1472
1478
  > Selector
@@ -2,4 +2,4 @@
2
2
  #
3
3
  # Distributed under MIT license.
4
4
  # See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
5
- __version__ = "3.123"
5
+ __version__ = "3.138"
@@ -16,6 +16,10 @@ import builtins
16
16
  import logging
17
17
  import grpc
18
18
 
19
+ import collections.abc
20
+ # fix pyreadline on windows py310
21
+ collections.Callable = collections.abc.Callable
22
+
19
23
  from urllib.parse import quote
20
24
  from collections import defaultdict
21
25
  from os.path import basename, dirname, expanduser, join as joinpath
@@ -689,6 +693,12 @@ class UiAutomatorStub(BaseServiceStub):
689
693
  获取此 watcher 是否启用
690
694
  """
691
695
  return self.watchers.get(name, {}).get("enable")
696
+ def get_last_toast(self):
697
+ """
698
+ 获取系统中最后一个 toast 消息
699
+ """
700
+ r = self.stub.getLastToast(protos.Empty())
701
+ return r
692
702
  def remove_watcher(self, name):
693
703
  """
694
704
  移除一个 watcher
@@ -1754,6 +1764,8 @@ class Device(object):
1754
1764
  return self.stub("UiAutomator").dump_window_hierarchy()
1755
1765
  def wait_for_idle(self, timeout):
1756
1766
  return self.stub("UiAutomator").wait_for_idle(timeout)
1767
+ def get_last_toast(self):
1768
+ return self.stub("UiAutomator").get_last_toast()
1757
1769
  # watcher
1758
1770
  def remove_all_watchers(self):
1759
1771
  return self.stub("UiAutomator").remove_all_watchers()
@@ -1817,11 +1829,12 @@ if __name__ == "__main__":
1817
1829
  import argparse
1818
1830
 
1819
1831
  parser = argparse.ArgumentParser()
1820
- parser.add_argument("-device", type=str, required=True,
1832
+ crt = os.environ.get("CERTIFICATE", None)
1833
+ port = int(os.environ.get("PORT", 65000))
1834
+ parser.add_argument("-device", type=str, default="localhost",
1821
1835
  help="service ip address")
1822
- parser.add_argument("-port", type=int, default=65000,
1836
+ parser.add_argument("-port", type=int, default=port,
1823
1837
  help="service port")
1824
- crt = os.environ.get("CERTIFICATE", None)
1825
1838
  parser.add_argument("-cert", type=str, default=crt,
1826
1839
  help="ssl cert")
1827
1840
  args = parser.parse_args()
@@ -148,6 +148,7 @@ service UiAutomator {
148
148
  rpc selectorLongClick(SelectorClickRequest) returns (Boolean) {}
149
149
 
150
150
  rpc selectorExists(SelectorOnlyRequest) returns (Boolean) {}
151
+ rpc getLastToast(google.protobuf.Empty) returns (ToastInfo) {}
151
152
 
152
153
  rpc selectorObjInfo(SelectorOnlyRequest) returns (ObjInfo) {}
153
154
  rpc selectorObjInfoOfAllInstances(SelectorOnlyRequest) returns (ObjInfoList) {}
@@ -369,6 +369,12 @@ message ObjInfo {
369
369
  Bound visibleBounds = 17;
370
370
  }
371
371
 
372
+ message ToastInfo {
373
+ uint64 timestamp = 1;
374
+ string package = 2;
375
+ string message = 3;
376
+ }
377
+
372
378
  message ObjInfoList {
373
379
  repeated ObjInfo objects = 1;
374
380
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lamda
3
- Version: 3.123
3
+ Version: 3.138
4
4
  Summary: Android reverse engineering & automation framework
5
5
  Home-page: https://github.com/rev1si0n/lamda
6
6
  Author: rev1si0n
@@ -12,4 +12,5 @@ Classifier: Programming Language :: Python :: 3
12
12
  Classifier: Operating System :: Android
13
13
  Classifier: Topic :: Security
14
14
  Requires-Python: >=3.6,<3.11
15
- Provides-Extra: frida
15
+ Provides-Extra: next
16
+ Provides-Extra: full
@@ -6,5 +6,8 @@ asn1crypto<2,>=1.0.0
6
6
  [:sys_platform == "win32"]
7
7
  pyreadline==2.1
8
8
 
9
- [frida]
9
+ [full]
10
10
  frida!=15.1.15,!=15.1.16,!=15.1.17,<16.0.0,>=15.0.0
11
+
12
+ [next]
13
+ frida<17.0.0,>=16.0.0
@@ -13,7 +13,8 @@ setuptools.setup(
13
13
  python_requires = ">=3.6,<3.11",
14
14
  zip_safe = False,
15
15
  extras_require = {
16
- "frida": ["frida>=15.0.0,<16.0.0,!=15.1.15,!=15.1.16,!=15.1.17"],
16
+ "next": ["frida>=16.0.0,<17.0.0"],
17
+ "full": ["frida>=15.0.0,<16.0.0,!=15.1.15,!=15.1.16,!=15.1.17"],
17
18
  ":sys_platform == \"win32\"": [
18
19
  "pyreadline==2.1",
19
20
  ],
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes