Package soot.jimple.infoflow.android
Class InfoflowAndroidConfiguration.CallbackConfiguration
java.lang.Object
soot.jimple.infoflow.android.InfoflowAndroidConfiguration.CallbackConfiguration
- Enclosing class:
- InfoflowAndroidConfiguration
The configuration for analyzing callbacks in Android apps
- Author:
- Steven Arzt
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanintGets the timeout in seconds after which the callback analysis shall be stopped.Gets the callback analyzer that is being used in preparation for the taint analysisGets the full path and file name of the file to which the collected callback shall be written, or from which they shall be read, respectivelybooleanGets whether the taint analysis shall consider callbacksbooleanGets whether the callback analysis algorithm should follow paths that contain threads.intGets the maximum depth up to which the callback analyzer shall look into chains of callbacks registering other callbacks.intGets the maximum number of callbacks per component.inthashCode()booleanGets whether the collected callbacks shall be serialized into a filevoidCopies the settings of the given configuration into this configuration objectvoidsetCallbackAnalysisTimeout(int callbackAnalysisTimeout) Sets the timeout in seconds after which the callback analysis shall be stopped.voidsetCallbackAnalyzer(InfoflowAndroidConfiguration.CallbackAnalyzer callbackAnalyzer) Sets the callback analyzer to be used in preparation for the taint analysisvoidsetCallbacksFile(String callbacksFile) Sets the full path and file name of the file to which the collected callback shall be written, or from which they shall be read, respectivelyvoidsetEnableCallbacks(boolean enableCallbacks) Sets whether the taint analysis shall consider callbacksvoidsetFilterThreadCallbacks(boolean filterThreadCallbacks) Sets whether the callback analysis algorithm should follow paths that contain threads.voidsetMaxAnalysisCallbackDepth(int maxCallbackAnalysisDepth) Sets the maximum depth up to which the callback analyzer shall look into chains of callbacks registering other callbacks.voidsetMaxCallbacksPerComponent(int maxCallbacksPerComponent) Sets the maximum number of callbacks per component.voidsetSerializeCallbacks(boolean serializeCallbacks) Sets whether the collected callbacks shall be serialized into a file
-
Constructor Details
-
CallbackConfiguration
public CallbackConfiguration()
-
-
Method Details
-
merge
Copies the settings of the given configuration into this configuration object- Parameters:
cbConfig- The other configuration object
-
setEnableCallbacks
public void setEnableCallbacks(boolean enableCallbacks) Sets whether the taint analysis shall consider callbacks- Parameters:
enableCallbacks- True if taints shall be tracked through callbacks, otherwise false
-
getEnableCallbacks
public boolean getEnableCallbacks()Gets whether the taint analysis shall consider callbacks- Returns:
- True if taints shall be tracked through callbacks, otherwise false
-
setCallbackAnalyzer
Sets the callback analyzer to be used in preparation for the taint analysis- Parameters:
callbackAnalyzer- The callback analyzer to be used
-
getCallbackAnalyzer
Gets the callback analyzer that is being used in preparation for the taint analysis- Returns:
- The callback analyzer being used
-
setFilterThreadCallbacks
public void setFilterThreadCallbacks(boolean filterThreadCallbacks) Sets whether the callback analysis algorithm should follow paths that contain threads. If this option is disabled, callbacks only registered in threads will be missed. If it is enabled, context-insensitive callgraph algorithms can lead to a high number of false positives for the callback analyzer.- Parameters:
filterThreadCallbacks- True to discover callbacks registered in threads, otherwise false
-
getFilterThreadCallbacks
public boolean getFilterThreadCallbacks()Gets whether the callback analysis algorithm should follow paths that contain threads. If this option is disabled, callbacks only registered in threads will be missed. If it is enabled, context-insensitive callgraph algorithms can lead to a high number of false positives for the callback analyzer.- Returns:
- True to discover callbacks registered in threads, otherwise false
-
getMaxCallbacksPerComponent
public int getMaxCallbacksPerComponent()Gets the maximum number of callbacks per component. If the callback collector finds more callbacks than this number for one given component, the analysis will assume that precision has degraded too much and will analyze this component without callbacks.- Returns:
- The maximum number of callbacks per component
-
setMaxCallbacksPerComponent
public void setMaxCallbacksPerComponent(int maxCallbacksPerComponent) Sets the maximum number of callbacks per component. If the callback collector finds more callbacks than this number for one given component, the analysis will assume that precision has degraded too much and will analyze this component without callbacks.- Parameters:
maxCallbacksPerComponent- The maximum number of callbacks per component
-
getCallbackAnalysisTimeout
public int getCallbackAnalysisTimeout()Gets the timeout in seconds after which the callback analysis shall be stopped. After the timeout, the data flow analysis will continue with those callbacks that have been found so far.- Returns:
- The callback analysis timeout in seconds
-
setCallbackAnalysisTimeout
public void setCallbackAnalysisTimeout(int callbackAnalysisTimeout) Sets the timeout in seconds after which the callback analysis shall be stopped. After the timeout, the data flow analysis will continue with those callbacks that have been found so far.- Parameters:
callbackAnalysisTimeout- The callback analysis timeout in seconds
-
getMaxAnalysisCallbackDepth
public int getMaxAnalysisCallbackDepth()Gets the maximum depth up to which the callback analyzer shall look into chains of callbacks registering other callbacks. A value equal to or smaller than zero indicates an infinite maximum depth.- Returns:
- The maximum depth up to which to look into callback registration chains.
-
setMaxAnalysisCallbackDepth
public void setMaxAnalysisCallbackDepth(int maxCallbackAnalysisDepth) Sets the maximum depth up to which the callback analyzer shall look into chains of callbacks registering other callbacks. A value equal to or smaller than zero indicates an infinite maximum depth.- Parameters:
maxCallbackAnalysisDepth- The maximum depth up to which to look into callback registration chains.
-
isSerializeCallbacks
public boolean isSerializeCallbacks()Gets whether the collected callbacks shall be serialized into a file- Returns:
- True to serialize the collected callbacks into a file, false otherwise
-
setSerializeCallbacks
public void setSerializeCallbacks(boolean serializeCallbacks) Sets whether the collected callbacks shall be serialized into a file- Parameters:
serializeCallbacks- True to serialize the collected callbacks into a file, false otherwise
-
getCallbacksFile
Gets the full path and file name of the file to which the collected callback shall be written, or from which they shall be read, respectively- Returns:
- The file for the collected callbacks
-
setCallbacksFile
Sets the full path and file name of the file to which the collected callback shall be written, or from which they shall be read, respectively- Parameters:
callbacksFile- The file for the collected callbacks
-
hashCode
public int hashCode() -
equals
-