Skip to content

yardexx/freerasp_brick

Repository files navigation

freeRASP brick

Powered by Mason Supported freeRASP style: very good analysis License: MIT

A brick for freeRASP to generate configuration code and automate necessary setup.

🚧 This brick is experimental and not stable! Changes to API/file generation reserved.

Overview

Setting up freeRASP can be quite tedious and repetitive. freerasp_brick provides you error-proof way to create configuration.

Features 🧰

  • 🛠 Configuration generation
  • 🎯 Dependency check using pub get
  • 🔧 Fix apply using dart fix
  • 🤖 Android SDK level check and automatic update
  • 🍎 iOS script insertion in Runner.xcscheme (Experimental)

How to add ➕

Using BrickHub.dev

You can add freerasp_brick to your project just like any other brick:

mason add freerasp_brick

Using GitHub dependency

You can also add freerasp_brick to your project using --git-url option:

mason add --git-url https://github.com/yardexx/freerasp_brick freerasp_brick

💡 If you plan to use freeRASP in many different projects, it's useful to have freerasp_brick as global brick. You can do it by adding --global option.

How to use 🚀

You can generate freeRASP configuration by running:

mason make freerasp_brick

After providing necessary information, freerasp_brick will generate following file structure:

freerasp
├── freerasp.g.dart
└── freerasp_callback.g.dart

Then simply import freerasp.g.dart in your desired file and use it:

import 'freerasp/freerasp.g.dart';

// Some other code...

talsec.start();

Generated reactions 💣

Default generated reaction for every callback is print to console.

If you wish to change it, you can do so by editing freerasp_callback.g.dart file.

Variables 📦

Variable Description Default Type Conditional When
watcher_mail An email for security reports N/A String false N/A
android Add Android configuration true bool false N/A
package_name Android app package name com.example.app String true android == true
signing_hash Android app signing hash N/A String true android == true
update_gradle Update build.gradle file true bool true android == true
ios Add iOS configuration true bool false N/A
bundle_id iOS app id com.example.app String true ios == true
team_id iOS team id N/A String true ios == true
update_scheme Update Runner.xcscheme file true bool true ios == true

⚠ Since freerasp_brick is heavily dependent on hooks, using -c option won't skip prompts generated by hooks.

Hooks 🎣

Type Enabled Can be disabled
pre-gen
post-gen

⚠ Brick won't generate files correctly if you disable pre-gen or post-gen hook.

Contribution 🤝

For issues, bugs, or feature proposals feel free to open issue or create PR.

Useful resources 📚

If this is your first touch with freeRASP or Mason, you refer to these resources to get started:

Getting started with freeRASP 🛡

Getting started with mason 🧱