androlyze.analyze.parallel package

Submodules

androlyze.analyze.parallel.AnalysisStatsView module

class androlyze.analyze.parallel.AnalysisStatsView.AnalysisStatsView(cnt_done, cnt_complete, analyzed_apks)[source]

Bases: androlyze.util.StopThread.StopThread

Updates the progress on the command line

Attributes

Methods

get_latest_analyzed_apk_name()[source]

Get the latest analyze apk name

print_progess()[source]

Show the progress on run

run()[source]

Print progress until terminate event set

androlyze.analyze.parallel.ParallelAnalyzer module

class androlyze.analyze.parallel.ParallelAnalyzer.ParallelAnalyzer(storage, script_list, script_hashes, min_script_needs, apks_or_paths, concurrency=None)[source]

Bases: androlyze.analyze.BaseAnalyzer.BaseAnalyzer

Parallel analyzer which uses the multiprocessing module.

Attributes

Methods

analyzed_apks

Queue<FastAPK> : Yet analyzed APKs

concurrency

int : Number of workers to spawn.

del_analyzed_apks()[source]
del_workers()[source]
get_analyzed_apks()[source]
get_concurrency()[source]
get_work_queue()[source]
get_workers()[source]
set_analyzed_apks(value)[source]
set_workers(value)[source]
work_queue

Queue<str> : Queue with paths to apks which shall be analyzed.

workers

list<Worker> : List of workers.

androlyze.analyze.parallel.Worker module

class androlyze.analyze.parallel.Worker.Worker(script_list, script_hashes, min_script_needs, work_queue, storage, sm_analyzed_apks, analyzed_apks, storage_results=None)[source]

Bases: multiprocessing.process.Process

Worker process that does the actual analysis

Attributes

Methods

add_analyzed_apks_sm(cnt_analyzed_apks)[source]

Add cnt_analyzed_apks to the shared counter. Operation uses an lock!

add_storage_result(storage_result)[source]

Add res to the storage_results.

Parameters:

res : tuple<str, bool>

Storage results. First component is the id of the entry and the second a boolean indication if the result has been stored in gridfs.

analyze_apk(eandro_apk)[source]

Analyze the eandro_apk and return the analysis results.

Parameters:

eandro_apk : EAndroApk

The apk to analyze.

Returns:

list<FastApk, AndroScript>

None

If error happened.

androscripts

list<AndroScript> : List of `AndroScript`s

del_androscripts()[source]
del_min_script_needs()[source]
del_storage()[source]
del_storage_results()[source]
del_work_queue()[source]
get_androscripts()[source]
get_min_script_needs()[source]
get_storage()[source]
get_storage_results()[source]
get_work_queue()[source]
min_script_needs

tuple<bool> : See :py:method:`ScriptUtil.get_maximal_script_options`.

run()[source]
set_androscripts(value)[source]
set_min_script_needs(value)[source]
set_storage(value)[source]
set_storage_results(value)[source]
set_work_queue(value)[source]
storage

RedundantStorage : The storage to store the results.

storage_results

Queue<tuple<str, bool>> : Storage results. First component is the id of the entry and the second a boolean indication if the result has been stored in gridfs.

work_queue

Queue<str> : Queue with paths to apks which shall be analyzed.

Module contents