__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
import 'dart:convert';
import 'dart:io';
import 'package:flutter/foundation.dart';
import 'package:prompting_client/prompting_client.dart';
import 'package:ubuntu_logger/ubuntu_logger.dart';
final _log = Logger('fake_prompting_client');
class FakeApparmorPromptingClient implements PromptingClient {
FakeApparmorPromptingClient({required this.currentPrompt});
factory FakeApparmorPromptingClient.fromFile(String path) {
final currentPrompt = PromptDetails.fromJson(
jsonDecode(File(path).readAsStringSync()) as Map<String, dynamic>,
);
return FakeApparmorPromptingClient(currentPrompt: currentPrompt);
}
final PromptDetails currentPrompt;
@visibleForTesting
void Function(PromptReply reply)? onReply;
@override
Future<PromptDetails> getCurrentPrompt() async => currentPrompt;
@override
Future<PromptReplyResponse> replyToPrompt(PromptReply reply) async {
_log.info('replyToPrompt: $reply');
onReply?.call(reply);
// This regex checks whether the provided path starts with a `/` and does
// not contain any `[` or `]` characters. (Same check that snapd does
// internally)
final validPattern = RegExp(r'^/([^\[\]]|\\[\[\]])*$');
if (!validPattern.hasMatch(reply.pathPattern)) {
_log.info('invalid pattern');
return PromptReplyResponse.unknown(message: 'invalid pattern');
}
_log.info('valid pattern');
return PromptReplyResponse.success();
}
@override
Future<HomePatternType> resolveHomePatternType(String pattern) {
throw UnimplementedError();
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| app | Folder | 0755 |
|
|
| l10n | Folder | 0755 |
|
|
| pages | Folder | 0755 |
|
|
| widgets | Folder | 0755 |
|
|
| fake_prompting_client.dart | File | 1.52 KB | 0644 |
|
| l10n.dart | File | 603 B | 0644 |
|
| l10n_x.dart | File | 1.87 KB | 0644 |
|
| main.dart | File | 2.79 KB | 0644 |
|
| test_prompt_details.json | File | 1.38 KB | 0644 |
|
| theme.dart | File | 268 B | 0644 |
|