Code Monkey home page Code Monkey logo

riskindroid's Issues

GradientBoostingClassifier error

hello i uing this code :

def analyze(path: str):
    filename = path[-(path.index('/')):]
    rid = RiskInDroid()
    permissions = rid.get_permission_json(path)
    try:
        response = {
            'success': 1,
            'message': "The app analyzed successfully",
            'md5': md5sum(path),
            'risk': round(rid.calculate_risk(rid.get_feature_vector_from_json(permissions)), 3),
            'permissions':
                [val for val in
                 list(map(lambda x: {'cat': 'Declared', 'name': x},
                          permissions['declared'])) +
                 list(map(lambda x: {'cat': 'Required and Used', 'name': x},
                          permissions['requiredAndUsed'])) +
                 list(map(lambda x: {'cat': 'Required but Not Used', 'name': x},
                          permissions['requiredButNotUsed'])) +
                 list(map(lambda x: {'cat': 'Not Required but Used', 'name': x},
                          permissions['notRequiredButUsed']))]
        }
        return response
    except Exception as e:
        response = {
            'success': 0,
            'message': "Error: " + str(e)
        }
        return response

but i get this error :
GradientBoostingClassifier' object has no attribute 'n_features_

I do not know what to do?
i useing python3.6

PermissionChecker fails to analyze some APKs

Hi there -- I have a handful of APK files that generate errors and cannot be analyzed due to issues with PermissionChecker.jar. For example, this app here:
https://play.google.com/store/apps/details?id=com.angelcam

generates the following message when passed to PermissionChecker.jar in RiskInDroid.py:get_permission_json:

# java -jar PermissionChecker.jar com.angelcam_20401_apps.evozi.com.apk 
PermissionChecker failed to analyze the application!

I'm running everything from within the docker container. I can give more detail (or a copy of the APK I'm using) if needed. You mention that PermissionChecker.jar is owned by Talos; is this fixable? Thanks in advance.

Why can't I use apk size above 10 MB

Thank you for the tool. This tool is very good.
However, I have noticed that the tool can not handle apk file size more than 10 MB. I am not sure why this tool can not handle more than 10 MB. Is there any way I can analyze apk size greater than 10 MB?

AttributeError: can't set attribute

Got an error:
sa_url.database = os.path.join(app.root_path, sa_url.database)
AttributeError: can't set attribute when connecting to sqlite database with flask-sqlalchemy

when trying to access results.
Solved issue by upgrading Flask-SQLAlchemy since default version here is 2.4.1. Current (and working) is >= 2.5.0
pip3 install Flask-SQLAlchemy -U

Can't train new models

Hi, I deleted the contents of "app/models/" and tried to train the models again. I re-upload a new apk to parse it, but the errors tell me that it is a "Bad request". I check the "app/models/" folder found it is created successfully but no models in it. Do you know how could I train the model successfully? I use RiskInDroid directly from the source code. My python version is 3.8.3

Buffer dtype mismatch

after selecting apk file and submitting, it is showing error

File "sklearn\tree_tree.pyx", line 601, in sklearn.tree._tree.Tree.cinit
ValueError: Buffer dtype mismatch, expected 'SIZE_t' but got 'long long'

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.