soot

Call graphs in Soot

帅比萌擦擦* 提交于 2021-02-07 09:49:45
问题 How do I use SOOT to build at Call graph? Or are there any better programs for this? I have been sent around the same five pages looking for answers and I can't find what I am looking for. There are also a problem with the plugin version to Eclipse. It is installed correct but I cant choose it when I want to run the code. 回答1: Small modification to previous answer private static void visit(CallGraph cg, SootMethod method) { String identifier = method.getSignature(); visited.put(method

如何从Java中的其他类读取私有字段的值?

爱⌒轻易说出口 提交于 2020-02-27 05:02:30
我在第三方 JAR 设计的课程设计不佳,需要访问其 私有 字段之一。 例如,为什么我需要选择私有字段? class IWasDesignedPoorly { private Hashtable stuffIWant; } IWasDesignedPoorly obj = ...; 我如何使用反射来获取 stuffIWant 的价值? #1楼 为了访问私有字段,您需要从类的 声明 字段中获取它们,然后使其可访问: Field f = obj.getClass().getDeclaredField("stuffIWant"); //NoSuchFieldException f.setAccessible(true); Hashtable iWantThis = (Hashtable) f.get(obj); //IllegalAccessException 编辑 :正如 aperkins 所评论的 那样 ,访问字段,将其设置为可访问并获取值都将抛出 Exception ,尽管上面仅提到了您需要注意的所有 检查 异常。 如果您请求的字段名称与声明的字段不对应,则将引发 NoSuchFieldException 。 obj.getClass().getDeclaredField("misspelled"); //will throw NoSuchFieldException

How to create a control-flow graph with Soot?

旧时模样 提交于 2019-12-25 11:28:22
问题 For a while I have been struggling with creating a control-flow graph with Soot and I kinda got lost in its tutorials. Rather than using Soot as an Eclipse plugin, I have been trying to use Soot as a library or API. What I want to do is, I have a bunch of Java projects and I want to create/generate a control-flow graph of these projects. I also saw that there is a feature in Soot that I can generate control-flow graphs in "DOT" format, which is quite acceptable for me as well. Any guide or

How to create a control-flow graph with Soot?

你说的曾经没有我的故事 提交于 2019-12-25 11:28:10
问题 For a while I have been struggling with creating a control-flow graph with Soot and I kinda got lost in its tutorials. Rather than using Soot as an Eclipse plugin, I have been trying to use Soot as a library or API. What I want to do is, I have a bunch of Java projects and I want to create/generate a control-flow graph of these projects. I also saw that there is a feature in Soot that I can generate control-flow graphs in "DOT" format, which is quite acceptable for me as well. Any guide or

Flow analysis for android

懵懂的女人 提交于 2019-12-11 16:08:39
问题 Is there a control flow graph generator for Android applications. (preferrably open source) I wish to do some flow analysis on applications. But I could not find any such static analyzer. If there is no such software, can soot be extended to do the static analysis for Android app. Some pointers on how to do so (especially handling multiple entry points and asynchronous calls to onPause, onDestroy etc. while making Control Flow Graph) will be very helpful. Thanks 回答1: you can use Androguard to

Instrumenting Android apps with Soot using a helper class

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 05:49:43
问题 I am instrumenting Android applications using a helper class following the example for Java instrumentation in http://www.sable.mcgill.ca/soot/tutorial/profiler2/profiler2.html. In my BodyTransformer, I have a static block to load MyCounter class counterClass = Scene.v().loadClassAndSupport("MyCounter"); Since Soot.Main.main(args) that processes my args (in which I provide -android-jars) is not executed while it is loading MyCounter, Soot cannot find my android jar and gives the error: Caused

Intraprocedural taint variable analysis in backward direction [closed]

偶尔善良 提交于 2019-12-02 13:43:42
enter image description here I have attached a picture of my question . intraprocedural taint variable analysis that traverses and analyzes your program in a backward direction to find out which variables are affecting the sinks. Consider return and print statements as sinks here. 来源: https://stackoverflow.com/questions/58417798/intraprocedural-taint-variable-analysis-in-backward-direction