本文整理汇总了Java中soot.jimple.infoflow.source.ISourceSinkManager类的典型用法代码示例。如果您正苦于以下问题:Java ISourceSinkManager类的具体用法?Java ISourceSinkManager怎么用?Java ISourceSinkManager使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ISourceSinkManager类属于soot.jimple.infoflow.source包,在下文中一共展示了ISourceSinkManager类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: computeInfoflow
import soot.jimple.infoflow.source.ISourceSinkManager; //导入依赖的package包/类
@Override
public void computeInfoflow(String path, IEntryPointCreator entryPointCreator,
List<String> entryPoints, ISourceSinkManager sourcesSinks) {
results = null;
if (sourcesSinks == null) {
logger.error("Sources are empty!");
return;
}
initializeSoot(path,
SootMethodRepresentationParser.v().parseClassNames(entryPoints, false).keySet(),
sourcesSinks);
// entryPoints are the entryPoints required by Soot to calculate Graph - if there is no main method,
// we have to create a new main method and use it as entryPoint and store our real entryPoints
Scene.v().setEntryPoints(Collections.singletonList(entryPointCreator.createDummyMain(entryPoints)));
// We explicitly select the packs we want to run for performance reasons
PackManager.v().getPack("wspp").apply();//==>
PackManager.v().getPack("cg").apply();//==>
PackManager.v().getPack("wjtp").apply();
PackManager.v().getPack("wstp").apply();//==>
//Main.v().main(args); ==>
if (debug)
PackManager.v().writeOutput();
}
示例2: InfoflowProblem
import soot.jimple.infoflow.source.ISourceSinkManager; //导入依赖的package包/类
public InfoflowProblem(IInfoflowCFG icfg, ISourceSinkManager sourceSinkManager,
IAliasingStrategy aliasingStrategy) {
super(icfg, sourceSinkManager);
this.aliasingStrategy = aliasingStrategy;
this.implicitFlowAliasingStrategy = new ImplicitFlowAliasStrategy(icfg);
this.aliasing = new Aliasing(aliasingStrategy, icfg);
}
示例3: computeInfoflow
import soot.jimple.infoflow.source.ISourceSinkManager; //导入依赖的package包/类
@Override
public void computeInfoflow(String appPath, String libPath, String entryPoint,
ISourceSinkManager sourcesSinks) {
if (sourcesSinks == null) {
logger.error("Sources are empty!");
return;
}
initializeSoot(appPath, libPath,
SootMethodRepresentationParser.v().parseClassNames
(Collections.singletonList(entryPoint), false).keySet(), entryPoint);
if (!Scene.v().containsMethod(entryPoint)){
logger.error("Entry point not found: " + entryPoint);
return;
}
SootMethod ep = Scene.v().getMethod(entryPoint);
if (ep.isConcrete())
ep.retrieveActiveBody();
else {
logger.debug("Skipping non-concrete method " + ep);
return;
}
Scene.v().setEntryPoints(Collections.singletonList(ep));
Options.v().set_main_class(ep.getDeclaringClass().getName());
// Compute the additional seeds if they are specified
Set<String> seeds = Collections.emptySet();
if (entryPoint != null && !entryPoint.isEmpty())
seeds = Collections.singleton(entryPoint);
ipcManager.updateJimpleForICC();
// Run the analysis
runAnalysis(sourcesSinks, seeds);
}
示例4: scanMethodForSourcesSinks
import soot.jimple.infoflow.source.ISourceSinkManager; //导入依赖的package包/类
/**
* Scans the given method for sources and sinks contained in it. Sinks are
* just counted, sources are added to the InfoflowProblem as seeds.
* @param sourcesSinks The SourceSinkManager to be used for identifying
* sources and sinks
* @param forwardProblem The InfoflowProblem in which to register the
* sources as seeds
* @param m The method to scan for sources and sinks
* @return The number of sinks found in this method
*/
private int scanMethodForSourcesSinks(
final ISourceSinkManager sourcesSinks,
InfoflowProblem forwardProblem,
SootMethod m) {
int sinkCount = 0;
if (m.hasActiveBody()) {
// Check whether this is a system class we need to ignore
final String className = m.getDeclaringClass().getName();
if (ignoreFlowsInSystemPackages && SystemClassHandler.isClassInSystemPackage(className))
return sinkCount;
// Look for a source in the method. Also look for sinks. If we
// have no sink in the program, we don't need to perform any
// analysis
PatchingChain<Unit> units = m.getActiveBody().getUnits();
for (Unit u : units) {
Stmt s = (Stmt) u;
if (sourcesSinks.getSourceInfo(s, iCfg) != null) {
forwardProblem.addInitialSeeds(u, Collections.singleton(forwardProblem.zeroValue()));
logger.debug("Source found: {}", u);
}
if (sourcesSinks.isSink(s, iCfg, null)) {
logger.debug("Sink found: {}", u);
sinkCount++;
}
}
}
return sinkCount;
}
示例5: InfoflowProblem
import soot.jimple.infoflow.source.ISourceSinkManager; //导入依赖的package包/类
public InfoflowProblem(IInfoflowCFG icfg, ISourceSinkManager sourceSinkManager,
IAliasingStrategy aliasingStrategy) {
super(icfg);
this.sourceSinkManager = sourceSinkManager;
this.aliasingStrategy = aliasingStrategy;
this.implicitFlowAliasingStrategy = new ImplicitFlowAliasStrategy(icfg);
}
示例6: runAnalysis
import soot.jimple.infoflow.source.ISourceSinkManager; //导入依赖的package包/类
@Override
public void runAnalysis(final ISourceSinkManager sourcesSinks) {
super.runAnalysis(sourcesSinks);
}
示例7: BackwardsInfoflowProblem
import soot.jimple.infoflow.source.ISourceSinkManager; //导入依赖的package包/类
public BackwardsInfoflowProblem(BiDiInterproceduralCFG<Unit, SootMethod> icfg,
ISourceSinkManager sourceSinkManager) {
super(icfg, sourceSinkManager);
}
示例8: AbstractInfoflowProblem
import soot.jimple.infoflow.source.ISourceSinkManager; //导入依赖的package包/类
public AbstractInfoflowProblem(BiDiInterproceduralCFG<Unit, SootMethod> icfg,
ISourceSinkManager sourceSinkManager) {
super(icfg);
this.sourceSinkManager = sourceSinkManager;
}
示例9: setISSM
import soot.jimple.infoflow.source.ISourceSinkManager; //导入依赖的package包/类
public void setISSM(ISourceSinkManager issm){
this.issm = issm;
}
示例10: getISSM
import soot.jimple.infoflow.source.ISourceSinkManager; //导入依赖的package包/类
public ISourceSinkManager getISSM(){
return this.issm;
}
示例11: InterproceduralConstantValuePropagator
import soot.jimple.infoflow.source.ISourceSinkManager; //导入依赖的package包/类
/**
* Creates a new instance of the {@link InterproceduralConstantValuePropagator}
* class
* @param icfg The interprocedural control flow graph to use
* @param excludedMethods The methods that shall be excluded. If one of these
* methods calls another method with a constant argument, this argument will
* not be propagated into the callee.
* @param sourceSinkManager The SourceSinkManager to be used for not
* propagating constants out of source methods
* @param taintWrapper The taint wrapper to be used for not breaking dummy
* values that will later be replaced by artificial taints
*/
public InterproceduralConstantValuePropagator(IInfoflowCFG icfg,
Collection<SootMethod> excludedMethods,
ISourceSinkManager sourceSinkManager,
ITaintPropagationWrapper taintWrapper) {
this.icfg = icfg;
this.excludedMethods = new HashSet<SootMethod>(excludedMethods);
this.sourceSinkManager = sourceSinkManager;
this.taintWrapper = taintWrapper;
}
示例12: computeInfoflow
import soot.jimple.infoflow.source.ISourceSinkManager; //导入依赖的package包/类
/**
* Computes the information flow on a list of entry point methods. This list
* is used to construct an artificial main method following the Android
* life cycle for all methods that are detected to be part of Android's
* application infrastructure (e.g. android.app.Activity.onCreate)
* @param appPath The path containing the client program's files
* @param libPath the path to the main folder of the (unpacked) library class files
* @param entryPointCreator the entry point creator to use for generating the dummy
* main method
* @param sourcesSinks manager class for identifying sources and sinks in the source code
*/
public void computeInfoflow(String appPath, String libPath,
IEntryPointCreator entryPointCreator,
ISourceSinkManager sourcesSinks);
示例13: computeInfoflow
import soot.jimple.infoflow.source.ISourceSinkManager; //导入依赖的package包/类
/**
* Computes the information flow on a list of entry point methods. This list
* is used to construct an artificial main method following the Android
* life cycle for all methods that are detected to be part of Android's
* application infrastructure (e.g. android.app.Activity.onCreate)
* @param path the path to the main folder of the (unpacked) class files
* @param entryPointCreator the entry point creator to use for generating the dummy
* main method
* @param entryPoints the entryPoints (string conforms to SootMethod representation)
* @param sourcesSinks manager class for identifying sources and sinks in the source code
*/
public void computeInfoflow(String path, IEntryPointCreator entryPointCreator,
List<String> entryPoints, ISourceSinkManager sourcesSinks);
示例14: initializeSoot
import soot.jimple.infoflow.source.ISourceSinkManager; //导入依赖的package包/类
/**
* Initializes Soot.
* @param path The Soot classpath
* @param classes The set of classes that shall be checked for data flow
* analysis seeds. All sources in these classes are used as seeds.
* @param sourcesSinks The manager object for identifying sources and sinks
*/
private void initializeSoot(String path, Set<String> classes, ISourceSinkManager sourcesSinks) {
initializeSoot(path, classes, sourcesSinks, "");
}