Giter Site home page Giter Site logo

pbl2-testapp's Introduction

PBL2-testapp

SDK Functionality Demo

Anti Screenshot Functionality

Anti Screenshot GIF

Anti Screencast Functionality

Anti Screencast GIF

Root Detection Functionality

Root Detection GIF

Data Obfuscation Functionality

Data Obfuscation GIF

AntiScreenshot

A utility object for preventing screenshots in an Android app by setting the FLAG_SECURE flag on the window.

Usage

To prevent screenshots in your app, call the preventScreenshots function with a valid Context:

AntiScreenshot.preventScreenshots(context)

Example

To prevent screenshots in your app, call the preventScreenshots function with a valid Context:

// Call preventScreenshots in your Activity
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
        // Prevent screenshots
        AntiScreenshot.preventScreenshots(this)
    }
}

Parameters

  • context: The context of the activity or application.

Notes

  • Screenshots will be prevented for the duration of the activity or application window

DataObfuscation

A utility object for obfuscating data in various ways.

Functions

obfuscateData

Obfuscates the data by replacing all characters except the last 4 with an obscure character.

  • Parameters

    • data: The data to obfuscate.
  • Returns

    • A string with the data obfuscated.

deobfuscateData

Deobfuscates the data. This function currently returns the obfuscated data as-is for demonstration purposes.

  • Parameters

    • obfuscatedData: The obfuscated data to deobfuscate.
  • Returns

    • The deobfuscated data.

randomCharacterObfuscate

Obfuscates the data by replacing each letter or digit with a random lowercase letter.

  • Parameters

    • data: The data to obfuscate.
  • Returns

    • A string with the data obfuscated using random characters.

customCharacterObfuscate

Obfuscates the data by replacing all letters with a custom character.

  • Parameters

    • data: The data to obfuscate.
    • charToReplace: The custom character to use for obfuscation.
  • Returns

    • A string with the data obfuscated using the custom character.

shuffleDatabaseRecords

Shuffles the order of records in a list.

  • Parameters

    • records: The list of records to shuffle.
  • Returns

    • A shuffled list of records.

maskOutData

Masks out a portion of the data with a specified mask character.

  • Parameters

    • data: The data to mask out.
    • start: The starting index of the portion to mask out.
    • end: The ending index of the portion to mask out.
    • maskChar: The character to use for masking. Defaults to *.
  • Returns

    • A string with the specified portion of the data masked out.

RootChecker

A utility object for checking if an Android device is rooted.

Functions

isDeviceRooted

Checks if the device is rooted using multiple methods.

  • Returns
    • true if the device is rooted, false otherwise.

checkRootMethod1

Checks if the device is rooted using method 1, which looks for specific build tags associated with rooted devices.

  • Returns
    • true if the device is rooted using method 1, false otherwise.

checkRootMethod2

Checks if the device is rooted using method 2, which looks for common paths where root files are typically located.

  • Returns
    • true if the device is rooted using method 2, false otherwise.

checkRootMethod3

Checks if the device is rooted using method 3, which tries to execute the "which su" command to see if the su binary is present.

  • Returns
    • true if the device is rooted using method 3, false otherwise.

Usage

To check if the device is rooted, use the isDeviceRooted function in a coroutine:

viewModelScope.launch {
    val isRooted = RootChecker.isDeviceRooted()
    // Use isRooted value
}

pbl2-testapp's People

Contributors

vk-56 avatar tejasau avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.