We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0cb22bd commit da17f8aCopy full SHA for da17f8a
lib/src/threat_detection_center.dart
@@ -1,3 +1,5 @@
1
+import 'dart:io';
2
+
3
import 'package:flutter_security_toolkit/src/threat_center_api.g.dart';
4
5
/// Use this class to access the methods of detecting security threats
@@ -16,8 +18,10 @@ class ThreatDetectionCenter {
16
18
/// libraries.
17
19
///
20
/// Returns true, if any hooks are detected
- static Future<bool?> areHooksDetected() {
- return _api.areHooksDetected();
21
+ static Future<bool?> areHooksDetected() async {
22
+ return Socket.connect("127.0.0.1", 27042)
23
+ .then((_) => true)
24
+ .catchError((_) => _api.areHooksDetected());
25
}
26
27
/// Will check for an environment and return true, if running in simulated /
0 commit comments