vulnguard_library 0.0.3 copy "vulnguard_library: ^0.0.3" to clipboard
vulnguard_library: ^0.0.3 copied to clipboard

Cross-platform library to detect vulnerable/blocked installed applications

VulnGuard 🛡️ #

A powerful cross-platform Flutter library for detecting and blocking vulnerable applications across Android, iOS, Windows, Linux, and macOS. VulnGuard helps secure your app by identifying potentially harmful or blocked applications installed on the user's device.

🌍 Cross-Platform Support #

Platform Support Level Detection Method Availability
🤖 Android Full PackageManager API ✅ Complete
🍎 iOS Limited URL Scheme Detection ✅ Available
🪟 Windows Full Registry Scanning ✅ Complete
🐧 Linux Full Desktop Files + Package Managers ✅ Complete
🍎 macOS Limited Application Bundle Detection ✅ Available
🌐 Web None Browser Security Restrictions ❌ Not Supported

Features ✨ #

  • 🔍 Real-time Detection: Automatically scans installed apps against a curated vulnerability database
  • 🚫 App Blocking: Prevents app usage when vulnerable applications are detected
  • 🌍 Cross-Platform: Works seamlessly on Android, iOS, Windows, Linux, and macOS
  • 🎨 Beautiful UI: Modern, customizable security alert dialogs with platform-specific designs
  • 🔄 Auto-sync: Automatically updates vulnerability database from remote server
  • 💾 Local Caching: Efficient local storage for offline functionality using Hive
  • 🔧 Easy Integration: Simple API with minimal setup required
  • 🎯 Auto Platform Detection: Automatically detects the current platform
  • 📱 Universal App Info: Unified interface for app information across all platforms

Screenshot #

[screen_shot_01]

Installation 📦 #

Add VulnGuard to your pubspec.yaml:

dependencies:
  vulnguard: ^0.0.3

Then run:

flutter pub get

Quick Start 🚀 #

1. Initialize VulnGuard #

Initialize VulnGuard in your main.dart before running your app:

import 'package:flutter/material.dart';
import 'package:vulnguard/vulnguard.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  // Initialize VulnGuard with your API credentials
  await Vulnguard.initialize(
    apiKey: 'your_api_key_here',
    platform: 'android',
    category: 'camera', // or your app category
  );

  runApp(MyApp());
}

2. Check for Vulnerable Apps #

Add the vulnerability check in your main screen:

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Your App',
      home: HomeScreen(),
    );
  }
}

class HomeScreen extends StatefulWidget {
  @override
  State<HomeScreen> createState() => _HomeScreenState();
}

class _HomeScreenState extends State<HomeScreen> {
  @override
  void initState() {
    super.initState();
    
    // Check for vulnerable apps after the widget is built
    WidgetsBinding.instance.addPostFrameCallback((_) {
      Vulnguard.checkForVulnerableApps(context);
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text('Your App')),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Text('Platform: ${Vulnguard.getCurrentPlatform()}'),
            SizedBox(height: 20),
            Text('Your app content here'),
            SizedBox(height: 20),
            ElevatedButton(
              onPressed: () => Vulnguard.checkForVulnerableApps(context),
              child: Text('Check Security'),
            ),
          ],
        ),
      ),
    );
  }
}

API Reference 📖 #

Initialization #

static Future<void> initialize({
  required String apiKey,
  String? platform,
  String category = 'default',
})

Parameters:

  • apiKey: Your VulnGuard API key (required)
  • platform: Target platform (optional - auto-detected: 'android', 'ios', 'windows', 'linux', 'macos')
  • category: App category for targeted vulnerability checking

Core Methods #

Check for Vulnerable Apps

static void checkForVulnerableApps(BuildContext context)

Displays a platform-specific security dialog if vulnerable apps are detected.

Get Vulnerable Apps List

static List<VulnerableApp> getVulnerableApps()

Returns a list of detected vulnerable applications.

Check if Vulnerable Apps Exist

bool hasVulnerableApps()

Returns true if any vulnerable apps were found.

Cross-Platform Methods #

Get Installed Packages (Cross-Platform)

static Future<List<UniversalAppInfo>> getInstalledPackages()
static Future<void> getInstalledPackage()

Returns unified app information across all platforms.

Platform Detection

static String getCurrentPlatform()

Returns the current platform: 'android', 'ios', 'windows', 'linux', 'macos', or 'web'.

Utility Methods #

Package Information

static Future<String?> getAppName(String packageName)
static Future<String?> getIconUrl(String packageName)
static Future<List<PackageInfo>> getAllPackages()
static Future<int> getPackagesCount()

Version Management

static Future<String?> getStoredVersion()

Cleanup

static Future<void> dispose()

Configuration Options ⚙️ #

Platform Support #

  • android: Full Android platform support with PackageManager API
  • ios: Limited iOS platform support (URL scheme detection)
  • windows: Full Windows platform support with Registry scanning
  • linux: Full Linux platform support (Desktop files + package managers)
  • macos: Limited macOS platform support (Application bundle detection)
  • web: Not supported due to browser security restrictions

Categories #

Choose the appropriate category for your app:

  • security: Security and antivirus apps
  • camera: Camera and photo apps
  • social: Social media applications
  • finance: Financial and banking apps
  • gaming: Gaming applications
  • productivity: Productivity tools
  • default: General applications

Platform-Specific Setup 🔧 #

Android Setup #

Add permissions to android/app/src/main/AndroidManifest.xml:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />

iOS Setup #

No additional permissions required, but detection is limited to apps with registered URL schemes.

Windows Setup #

No additional setup required. Uses Windows Registry for app detection.

Linux Setup #

No additional setup required. Scans desktop files and package managers.

macOS Setup #

No additional setup required. Scans Applications directory.

API Key 🔑 #

To use VulnGuard, you need a valid API key. Purchase your API key from:

🌐 VulnGuard Official Website

Pricing Plans #

  • Starter: Perfect for small apps (Android support)
  • Professional: For growing businesses (Android + iOS)
  • Enterprise: Custom solutions for large organizations (All platforms)

Visit our website for detailed pricing and features comparison.

Advanced Usage 💡 #

Cross-Platform App Detection #

// Get all installed apps (works on all platforms)
List<UniversalAppInfo> allApps = await Vulnguard.getInstalledPackages();

for (UniversalAppInfo app in allApps) {
  print('App: ${app.appName}');
  print('Package: ${app.packageName}');
  print('Version: ${app.version ?? "Unknown"}');
  print('Platform: ${Vulnguard.getCurrentPlatform()}');
}

Platform-Specific Handling #

String platform = Vulnguard.getCurrentPlatform();

switch (platform) {
  case 'android':
    // Android-specific logic
    print('Full app detection available');
    break;
  case 'ios':
  case 'macos':
    // Apple platforms with limited detection
    print('Limited app detection due to platform restrictions');
    break;
  case 'windows':
  case 'linux':
    // Desktop platforms with full support
    print('Desktop app detection available');
    break;
  case 'web':
    // Web platform
    print('App detection not available on web');
    break;
}

Manual Vulnerability Check #

// Get vulnerable apps without showing dialog
List<VulnerableApp> vulnerableApps = Vulnguard.getVulnerableApps();

if (vulnerableApps.isNotEmpty) {
  print('Found ${vulnerableApps.length} vulnerable apps on ${Vulnguard.getCurrentPlatform()}');
  
  for (VulnerableApp app in vulnerableApps) {
    print('Vulnerable app: ${app.appName} (${app.packageName})');
  }
}

Custom Security Actions #

// Check if vulnerable apps exist
if (Vulnguard.instance.hasVulnerableApps()) {
  // Platform-specific security measures
  String platform = Vulnguard.getCurrentPlatform();
  
  if (platform == 'android') {
    // Android-specific security actions
  } else if (platform == 'ios') {
    // iOS-specific security actions
  }
  // ... handle other platforms
}

Error Handling 🔧 #

try {
  await Vulnguard.initialize(
    apiKey: 'your_api_key',
    platform: 'android',
    category: 'security',
  );
  
  print('Initialized on platform: ${Vulnguard.getCurrentPlatform()}');
} catch (e) {
  print('VulnGuard initialization failed: $e');
  // Handle initialization error gracefully
}

Platform Limitations 📋 #

iOS & macOS Limitations #

  • Privacy Restrictions: Apple platforms limit app enumeration for privacy
  • URL Scheme Detection: Can only detect apps with registered URL schemes
  • Sandbox Limitations: Apps in sandbox cannot access other app information

Web Limitations #

  • Browser Security: Modern browsers prevent installed app detection
  • Not Supported: VulnGuard cannot function on web platforms

Detection Accuracy #

  • Android: 99% accuracy - Full access to all installed apps
  • Windows/Linux: 95% accuracy - Covers most GUI applications
  • iOS/macOS: 30-50% accuracy - Limited to detectable apps only

Best Practices 📋 #

  1. Initialize Early: Always initialize VulnGuard before runApp()
  2. Handle Platform Differences: Account for platform-specific limitations
  3. Handle Errors: Wrap initialization in try-catch blocks
  4. Check Periodically: Consider checking for vulnerabilities periodically during app usage
  5. Respect Privacy: Inform users about app scanning in your privacy policy
  6. Update Regularly: Keep the VulnGuard library updated for latest security definitions
  7. Platform Testing: Test on all target platforms before release

Requirements 📋 #

  • Flutter 3.0.0 or higher
  • Dart 2.17.0 or higher

Platform-Specific Requirements #

  • Android: API level 21+ (Android 5.0+)
  • iOS: iOS 11.0+
  • Windows: Windows 10+
  • Linux: Ubuntu 18.04+ / Any modern Linux distribution
  • macOS: macOS 10.14+

Migration Guide 🔄 #

From v1.0.0 to v0.0.2 #

  1. Platform parameter now optional:

    // Old (required)
    await Vulnguard.initialize(apiKey: 'key', platform: 'android');
       
    // New (auto-detected)
    await Vulnguard.initialize(apiKey: 'key');
    
  2. New cross-platform methods:

    // New platform detection
    String platform = Vulnguard.getCurrentPlatform();
       
    // New universal app info
    List<UniversalAppInfo> apps = await Vulnguard.getInstalledPackages();
    

Support 🤝 #

Changelog 📝 #

v0.0.2 - Cross-Platform Release #

  • ✅ Added support for iOS, Windows, Linux, and macOS
  • ✅ Auto platform detection
  • ✅ Universal app information interface
  • ✅ Platform-specific native implementations
  • ✅ Improved error handling and documentation

v1.0.0 - Initial Release Name - Vulnguard #

  • ✅ Android support only
  • ✅ Basic vulnerability detection
  • ✅ Security dialog UI

License 📄 #

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing 🤝 #

We welcome contributions! Please see our Contributing Guide for details.


Made with ❤️ by the VulnGuard Team

🌐 Website: vulnguard.com
📧 Email: ceo@m7corporation.tech