ohmyg0sh 1.70.0 copy "ohmyg0sh: ^1.70.0" to clipboard
ohmyg0sh: ^1.70.0 copied to clipboard

APK security scanner that detects hardcoded API keys and credentials before they reach production.

example/ohmyg0sh_example.dart

/// Example: OhMyG0sh library usage entrypoint.
///
/// Run with:
///   dart run example/ohmyg0sh_example.dart <path_to_apk>
///
/// Exit codes:
/// - 1 when no APK path is provided
/// - 2 for runtime failures
///
/// Tip:
/// Un-comment pattern/notKeyHacks/jadx options below to customize behavior.
library;

import 'dart:io';
import 'package:ohmyg0sh/ohmyg0sh.dart';

/// Demonstration entrypoint that constructs and runs OhMyG0sh.
///
/// Validates arguments, creates the scanner with JSON output, and
/// ensures cleanup on error.
Future<void> main(List<String> args) async {
  if (args.isEmpty) {
    print('Usage: dart run example/ohmyg0sh_example.dart <path_to_apk>');
    exit(1);
  }

  final apk = args.first;
  final scanner = OhMyG0sh(
    apkPath: apk,
    outputJson: true,
    // patternPath: 'config/regexes.json', // optional
    // notKeyHacksPath: 'config/notkeyhacks.json', // optional
    // jadxPath: '/usr/local/bin/jadx', // optional
  );

  try {
    await scanner.run();
  } catch (e) {
    stderr.writeln('Error: $e');
    await scanner.cleanup();
    exit(2);
  }
}
6
likes
160
points
8
downloads

Publisher

unverified uploader

Weekly Downloads

APK security scanner that detects hardcoded API keys and credentials before they reach production.

Repository (GitHub)
View/report issues

Topics

#security #scanner #apk #regex #dart

Documentation

API reference

License

MIT (license)

Dependencies

args, path, yaml

More

Packages that depend on ohmyg0sh