lamda 7.57__tar.gz → 7.65__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. {lamda-7.57 → lamda-7.65}/PKG-INFO +1 -1
  2. {lamda-7.57 → lamda-7.65}/README.md +4 -2
  3. {lamda-7.57 → lamda-7.65}/lamda/__init__.py +1 -1
  4. {lamda-7.57 → lamda-7.65}/lamda/client.py +24 -58
  5. {lamda-7.57 → lamda-7.65}/lamda/rpc/debug.proto +0 -5
  6. {lamda-7.57 → lamda-7.65}/lamda/rpc/services.proto +0 -8
  7. {lamda-7.57 → lamda-7.65}/lamda/rpc/uiautomator.proto +23 -7
  8. {lamda-7.57 → lamda-7.65}/lamda.egg-info/PKG-INFO +1 -1
  9. {lamda-7.57 → lamda-7.65}/lamda/bcast.proto +0 -0
  10. {lamda-7.57 → lamda-7.65}/lamda/const.py +0 -0
  11. {lamda-7.57 → lamda-7.65}/lamda/exceptions.py +0 -0
  12. {lamda-7.57 → lamda-7.65}/lamda/google/protobuf/any.proto +0 -0
  13. {lamda-7.57 → lamda-7.65}/lamda/google/protobuf/api.proto +0 -0
  14. {lamda-7.57 → lamda-7.65}/lamda/google/protobuf/compiler/plugin.proto +0 -0
  15. {lamda-7.57 → lamda-7.65}/lamda/google/protobuf/descriptor.proto +0 -0
  16. {lamda-7.57 → lamda-7.65}/lamda/google/protobuf/duration.proto +0 -0
  17. {lamda-7.57 → lamda-7.65}/lamda/google/protobuf/empty.proto +0 -0
  18. {lamda-7.57 → lamda-7.65}/lamda/google/protobuf/field_mask.proto +0 -0
  19. {lamda-7.57 → lamda-7.65}/lamda/google/protobuf/source_context.proto +0 -0
  20. {lamda-7.57 → lamda-7.65}/lamda/google/protobuf/struct.proto +0 -0
  21. {lamda-7.57 → lamda-7.65}/lamda/google/protobuf/timestamp.proto +0 -0
  22. {lamda-7.57 → lamda-7.65}/lamda/google/protobuf/type.proto +0 -0
  23. {lamda-7.57 → lamda-7.65}/lamda/google/protobuf/wrappers.proto +0 -0
  24. {lamda-7.57 → lamda-7.65}/lamda/rpc/application.proto +0 -0
  25. {lamda-7.57 → lamda-7.65}/lamda/rpc/file.proto +0 -0
  26. {lamda-7.57 → lamda-7.65}/lamda/rpc/policy.proto +0 -0
  27. {lamda-7.57 → lamda-7.65}/lamda/rpc/proxy.proto +0 -0
  28. {lamda-7.57 → lamda-7.65}/lamda/rpc/settings.proto +0 -0
  29. {lamda-7.57 → lamda-7.65}/lamda/rpc/shell.proto +0 -0
  30. {lamda-7.57 → lamda-7.65}/lamda/rpc/status.proto +0 -0
  31. {lamda-7.57 → lamda-7.65}/lamda/rpc/storage.proto +0 -0
  32. {lamda-7.57 → lamda-7.65}/lamda/rpc/types.proto +0 -0
  33. {lamda-7.57 → lamda-7.65}/lamda/rpc/util.proto +0 -0
  34. {lamda-7.57 → lamda-7.65}/lamda/rpc/wifi.proto +0 -0
  35. {lamda-7.57 → lamda-7.65}/lamda/types.py +0 -0
  36. {lamda-7.57 → lamda-7.65}/lamda.egg-info/SOURCES.txt +0 -0
  37. {lamda-7.57 → lamda-7.65}/lamda.egg-info/dependency_links.txt +0 -0
  38. {lamda-7.57 → lamda-7.65}/lamda.egg-info/not-zip-safe +0 -0
  39. {lamda-7.57 → lamda-7.65}/lamda.egg-info/requires.txt +0 -0
  40. {lamda-7.57 → lamda-7.65}/lamda.egg-info/top_level.txt +0 -0
  41. {lamda-7.57 → lamda-7.65}/setup.cfg +0 -0
  42. {lamda-7.57 → lamda-7.65}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lamda
3
- Version: 7.57
3
+ Version: 7.65
4
4
  Summary: Android reverse engineering & automation framework
5
5
  Home-page: https://github.com/rev1si0n/lamda
6
6
  Author: rev1si0n
@@ -19,9 +19,11 @@ LAMDA 是一个用于逆向及自动化的辅助框架,设计为减少安全
19
19
  <p align="center">
20
20
  <img src="image/wx.png" alt="公众号" width="234">
21
21
  </p>
22
- <p align="center"><small>关注公众号查看视频教程以及更多使用方法</small><br><small><b>知识应该是共享的,我们不会要求你为相关知识付费</b></small><br><small>文字版文档请查看<a href="https://github.com/rev1si0n/lamda/wiki">使用文档</a></small></p>
22
+ <p align="center"><small>关注公众号查看视频教程以及更多使用方法</small><br><small><b>知识应该是共享的,我们不会要求你为相关知识付费</b></small><br><br><small><a href="https://space.bilibili.com/1964784386/video">BILIBILI 同步发布</a></small><br><small>文字版文档请查看<a href="https://github.com/rev1si0n/lamda/wiki">使用文档</a></small></small>
23
+ </p>
24
+
23
25
 
24
- 经过超 500 台设备的稳定生产环境考验,具有近乎商业级软件的质量和稳定性,仅需 root 权限即可正常运行。具备 ARM/X86 全架构,安卓 6.0-14 的广泛兼容性,支持模拟器、真机、云手机、 WSA(Windows Subsystem for Android™️)、无头开发板以及 Redroid。提供大量可编程接口,支持界面布局检视、获取/重放系统中最近的 Activity、唤起应用的 Activity 等功能。除此之外,它支持大文件上传下载,远程桌面,以及UI自动化编程接口,点击、截图、获取界面元素、执行 shell 命令、设备状态、资源读取、系统配置、属性读写、一键中间人等,可通过 SSH 或内置 ADB 登录设备终端。具备 socks5、OpenVPN 代理并可通过接口轻松设置根证书,实现中间人攻击,以及 Frida、IDA 等工具等等,同时支持定时任务、Magisk开机自启动,你可以在任何地方通过网络连接运行着 LAMDA 设备。
26
+ 经过超 500 台设备的稳定生产环境考验,具有近乎商业级软件的质量和稳定性,仅需 root 权限即可正常运行。具备 ARM/X86 全架构,安卓 6.0-14 的广泛兼容性,支持模拟器、真机、云手机、 WSA(Windows Subsystem for Android™️)、无头开发板以及 Redroid。提供大量可编程接口,支持界面布局检视、获取/重放系统中最近的 Activity、唤起应用的 Activity 等功能。除此之外,它支持大文件上传下载,远程桌面,以及UI自动化编程接口,点击、截图、获取界面元素、执行 shell 命令、设备状态、资源读取、系统配置、属性读写、一键中间人等,可通过 SSH 或内置 ADB 登录设备终端。具备 socks5、OpenVPN 代理并可通过接口轻松设置系统证书及中间人,同时支持定时任务、Magisk开机自启动,你可以在任何地方通过网络连接运行着 LAMDA 设备。
25
27
 
26
28
  ![动图演示](image/demo.gif)
27
29
 
@@ -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__ = "7.57"
5
+ __version__ = "7.65"
@@ -74,6 +74,8 @@ __all__ = [
74
74
  "OpenVPNAuth",
75
75
  "OpenVPNEncryption",
76
76
  "OpenVPNKeyDirection",
77
+ "FindImageMethod",
78
+ "FindImageArea",
77
79
  "ToastDuration",
78
80
  "OpenVPNCipher",
79
81
  "OpenVPNProto",
@@ -230,7 +232,6 @@ TouchAction.action = property(touchActionRealAction)
230
232
 
231
233
  TouchSequence.load = classmethod(touchSequenceLoad)
232
234
  TouchSequence.save = touchSequenceSave
233
-
234
235
  TouchSequence.appendAction = touchSequenceAppendAction
235
236
  TouchSequence.appendDown = touchSequenceAppendDown
236
237
  TouchSequence.appendWait = touchSequenceAppendWait
@@ -243,6 +244,7 @@ Bound.width = property(width)
243
244
  Bound.height = property(height)
244
245
 
245
246
  FindImageMethod = protos.FindImageMethod
247
+ FindImageArea = protos.FindImageArea
246
248
 
247
249
  Bound.center = center
248
250
  Bound.corner = corner
@@ -855,16 +857,26 @@ class UiAutomatorStub(BaseServiceStub):
855
857
  """
856
858
  r = self.stub.getClipboard(protos.Empty())
857
859
  return r.value
858
- def find_similar_image(self, data, threshold=0,
859
- max_distance=0, bound=None,
860
- method=FindImageMethod.FI_TEMPLATE):
860
+ def _set_target_Area(self, req, area):
861
+ req.area = area
862
+ def _set_target_Bound(self, req, bound):
863
+ req.bound.CopyFrom(bound)
864
+ def find_similar_image(self, data, threshold=0.0, distance=250,
865
+ scale=1.0, area=FindImageArea.FIA_WHOLE_SCREEN,
866
+ method=FindImageMethod.FIM_TEMPLATE):
861
867
  """
862
868
  根据提供的目标图片从屏幕中获取相似图片位置
863
869
  """
864
- req = protos.FindImageRequest(bound=bound)
870
+ req = protos.FindImageRequest()
871
+ checkArgumentTyp(area, (Bound, int))
872
+ name = getattr(getattr(area, "DESCRIPTOR", None),
873
+ "name", "Area")
874
+ func = "_set_target_{}".format(name)
875
+ getattr(self, func)(req, area)
865
876
  req.method = method
866
- req.max_distance = max_distance
877
+ req.distance = distance
867
878
  req.threshold = threshold
879
+ req.scale = scale
868
880
  req.partial = data
869
881
  r = self.stub.findSimilarImage(req)
870
882
  return r.bounds
@@ -1361,64 +1373,18 @@ class DebugStub(BaseServiceStub):
1361
1373
  """
1362
1374
  r = self.stub.isAndroidDebugBridgeRunning(protos.Empty())
1363
1375
  return r.value
1364
- def is_ida_running(self):
1365
- """
1366
- IDA 服务端是否在运行
1367
- """
1368
- r = self.stub.isIDARunning(protos.Empty())
1369
- return r.value
1370
- def is_ida64_running(self):
1371
- """
1372
- IDA64 服务端是否在运行
1373
- """
1374
- r = self.stub.isIDA64Running(protos.Empty())
1375
- return r.value
1376
1376
  def start_android_debug_bridge(self):
1377
1377
  """
1378
1378
  启动内置 adbd (默认随框架启动)
1379
1379
  """
1380
1380
  r = self.stub.startAndroidDebugBridge(protos.Empty())
1381
1381
  return r.value
1382
- def start_ida(self, port=23932, **env):
1383
- """
1384
- 启动 IDA 服务端
1385
- """
1386
- req = protos.IDAConfigRequest(port=port)
1387
- req.environment.update(env)
1388
- r = self.stub.startIDA(req)
1389
- return r.value
1390
- def start_ida64(self, port=23964, **env):
1391
- """
1392
- 启动 IDA64 服务端
1393
- """
1394
- req = protos.IDAConfigRequest(port=port)
1395
- req.environment.update(env)
1396
- r = self.stub.startIDA64(req)
1397
- return r.value
1398
1382
  def stop_android_debug_bridge(self):
1399
1383
  """
1400
1384
  停止内置 adb daemon
1401
1385
  """
1402
1386
  r = self.stub.stopAndroidDebugBridge(protos.Empty())
1403
1387
  return r.value
1404
- def set_debuggable(self):
1405
- """
1406
- 设置系统为 debuggable
1407
- """
1408
- r = self.stub.setDebuggable(protos.Empty())
1409
- return r.value
1410
- def stop_ida(self):
1411
- """
1412
- 停止 IDA 服务端
1413
- """
1414
- r = self.stub.stopIDA(protos.Empty())
1415
- return r.value
1416
- def stop_ida64(self):
1417
- """
1418
- 停止 IDA64 服务端
1419
- """
1420
- r = self.stub.stopIDA64(protos.Empty())
1421
- return r.value
1422
1388
 
1423
1389
 
1424
1390
  class SettingsStub(BaseServiceStub):
@@ -2037,11 +2003,12 @@ class Device(object):
2037
2003
  return self.stub("UiAutomator").wait_for_idle(timeout)
2038
2004
  def get_last_toast(self):
2039
2005
  return self.stub("UiAutomator").get_last_toast()
2040
- def find_similar_image(self, data, threshold=0,
2041
- max_distance=0, bound=None,
2042
- method=FindImageMethod.FI_TEMPLATE):
2006
+ def find_similar_image(self, data, threshold=0.0, distance=250,
2007
+ scale=1.0, area=FindImageArea.FIA_WHOLE_SCREEN,
2008
+ method=FindImageMethod.FIM_TEMPLATE):
2043
2009
  return self.stub("UiAutomator").find_similar_image(data, threshold=threshold,
2044
- max_distance=max_distance, bound=bound, method=method)
2010
+ distance=distance, scale=scale,
2011
+ area=area, method=method)
2045
2012
  # watcher
2046
2013
  def remove_all_watchers(self):
2047
2014
  return self.stub("UiAutomator").remove_all_watchers()
@@ -2117,7 +2084,6 @@ if __name__ == "__main__":
2117
2084
  args = parser.parse_args()
2118
2085
 
2119
2086
  readline.parse_and_bind("tab: complete")
2120
-
2121
2087
  d = Device(args.device, port=args.port,
2122
- certificate=args.cert)
2088
+ certificate=args.cert)
2123
2089
  code.interact(local=globals())
@@ -7,11 +7,6 @@ package lamda.rpc;
7
7
 
8
8
  import "google/protobuf/struct.proto";
9
9
 
10
- message IDAConfigRequest {
11
- uint32 port = 1;
12
- google.protobuf.Struct environment = 8;
13
- }
14
-
15
10
  message ADBDConfigRequest {
16
11
  string adb_pubkey = 1;
17
12
  }
@@ -52,21 +52,13 @@ service Application {
52
52
  }
53
53
 
54
54
  service Debug {
55
- rpc isIDARunning(google.protobuf.Empty) returns (Boolean) {}
56
- rpc isIDA64Running(google.protobuf.Empty) returns (Boolean) {}
57
55
  rpc isAndroidDebugBridgeRunning(google.protobuf.Empty) returns (Boolean) {}
58
56
 
59
57
  rpc installADBPubKey(ADBDConfigRequest) returns (Boolean) {}
60
58
  rpc uninstallADBPubKey(ADBDConfigRequest) returns (Boolean) {}
61
59
 
62
- rpc startIDA(IDAConfigRequest) returns (Boolean) {}
63
- rpc startIDA64(IDAConfigRequest) returns (Boolean) {}
64
60
  rpc startAndroidDebugBridge(google.protobuf.Empty) returns (Boolean) {}
65
-
66
- rpc stopIDA(google.protobuf.Empty) returns (Boolean) {}
67
- rpc stopIDA64(google.protobuf.Empty) returns (Boolean) {}
68
61
  rpc stopAndroidDebugBridge(google.protobuf.Empty) returns (Boolean) {}
69
- rpc setDebuggable(google.protobuf.Empty) returns (Boolean) {}
70
62
  }
71
63
 
72
64
  service Proxy {
@@ -556,16 +556,32 @@ message WatcherRegistRequest {
556
556
  }
557
557
 
558
558
  enum FindImageMethod {
559
- FI_TEMPLATE = 0;
560
- FI_FEATURE_POINT = 1;
559
+ FIM_TEMPLATE = 0;
560
+ FIM_FEATURE = 1;
561
+ }
562
+
563
+ enum FindImageArea {
564
+ FIA_WHOLE_SCREEN = 0;
565
+ FIA_LEFT = 1;
566
+ FIA_TOP_LEFT = 2;
567
+ FIA_TOP = 3;
568
+ FIA_TOP_RIGHT = 4;
569
+ FIA_RIGHT = 5;
570
+ FIA_BOTTOM_RIGHT = 6;
571
+ FIA_BOTTOM = 7;
572
+ FIA_BOTTOM_LEFT = 8;
561
573
  }
562
574
 
563
575
  message FindImageRequest {
564
- FindImageMethod method = 1;
565
- Bound bound = 2;
566
- bytes partial = 3;
567
- uint32 max_distance = 4;
568
- float threshold = 5;
576
+ bytes partial = 1;
577
+ FindImageMethod method = 2;
578
+ oneof _area {
579
+ FindImageArea area = 3;
580
+ Bound bound = 4;
581
+ }
582
+ uint32 distance = 5;
583
+ float threshold = 6;
584
+ float scale = 7;
569
585
  }
570
586
 
571
587
  message FindImageResponse {
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lamda
3
- Version: 7.57
3
+ Version: 7.65
4
4
  Summary: Android reverse engineering & automation framework
5
5
  Home-page: https://github.com/rev1si0n/lamda
6
6
  Author: rev1si0n
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
File without changes
File without changes
File without changes