earlence / smartthingsanalysistools Goto Github PK
View Code? Open in Web Editor NEWSmartThings Analysis Tools
License: Apache License 2.0
SmartThings Analysis Tools
License: Apache License 2.0
Hi, Earlence:
Thanks for your presentation at PSU, I was wondering if your tool, or you know some tool for Binary code dynamic instrumentation
not just Byte code dynamic instrumentation
please?
Thanks,
Wenhui
Hi,
I am a student that trying to run your tool on some smart apps. However, I met some error when I run the tool.
The error happened in the OPAnalysisAST file.The code that the eclipse report error is "OPAnalysisAST.this.append_manual()".
java.lang.Error: Unresolved compilation problems:
Groovy:The usage of 'Class.this' and 'Class.super' is only allowed in nested/inner classes.
Groovy:The usage of 'Class.this' and 'Class.super' is only allowed in nested/inner classes.
Groovy:The usage of 'Class.this' and 'Class.super' is only allowed in nested/inner classes.
Groovy:The usage of 'Class.this' and 'Class.super' is only allowed in nested/inner classes.
at edu.umich.smartthings.overprivilege.OPAnalysisAST.<init>(OPAnalysisAST.groovy:1190)
at edu.umich.smartthings.overprivilege.AnalysisDriver.main(AnalysisDriver.groovy:34)
And then I removed the OPAnalysisAST. (then the code is this.appen_manual()), there's no this error anymore. And the tool can run now.However, during the run-time, when I analysis a smartapp, it always give me the following error:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
General error during semantic analysis: Cannot use mod() on this number type: java.math.BigDecimal with value: 0
java.lang.UnsupportedOperationException: Cannot use mod() on this number type: java.math.BigDecimal with value: 0
at org.codehaus.groovy.runtime.typehandling.NumberMath.createUnsupportedException(NumberMath.java:269)
at org.codehaus.groovy.runtime.typehandling.NumberMath.modImpl(NumberMath.java:249)
at org.codehaus.groovy.runtime.typehandling.NumberMath.mod(NumberMath.java:92)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.mod(DefaultGroovyMethods.java:14516)
at org.codehaus.groovy.runtime.dgm$439.invoke(Unknown Source)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
at edu.umich.smartthings.overprivilege.Utils.allUniqueCombinations(Utils.groovy:30)
at edu.umich.smartthings.overprivilege.Utils$allUniqueCombinations.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
at edu.umich.smartthings.overprivilege.OPAnalysisAST.computeType2Overprivilege(OPAnalysisAST.groovy:1005)
at edu.umich.smartthings.overprivilege.OPAnalysisAST$computeType2Overprivilege$5.callCurrent(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:157)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:177)
at edu.umich.smartthings.overprivilege.OPAnalysisAST.call(OPAnalysisAST.groovy:117)
at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1087)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:624)
at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:602)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:579)
at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:323)
at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:293)
at groovy.lang.GroovyShell.parseClass(GroovyShell.java:677)
at groovy.lang.GroovyShell.parse(GroovyShell.java:689)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:573)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:621)
at groovy.lang.GroovyShell$evaluate.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
at edu.umich.smartthings.overprivilege.AnalysisDriver$_main_closure2.doCall(AnalysisDriver.groovy:84)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:264)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1034)
at groovy.lang.Closure.call(Closure.java:418)
at groovy.lang.Closure.call(Closure.java:434)
at org.codehaus.groovy.runtime.ResourceGroovyMethods.eachFile(ResourceGroovyMethods.java:1090)
at org.codehaus.groovy.runtime.ResourceGroovyMethods.eachFile(ResourceGroovyMethods.java:1108)
at org.codehaus.groovy.runtime.dgm$937.invoke(Unknown Source)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
at edu.umich.smartthings.overprivilege.AnalysisDriver.main(AnalysisDriver.groovy:71)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1463)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:921)
at groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:276)
at groovy.lang.GroovyShell.run(GroovyShell.java:507)
at groovy.lang.GroovyShell.run(GroovyShell.java:496)
at groovy.ui.GroovyMain.processOnce(GroovyMain.java:597)
at groovy.ui.GroovyMain.run(GroovyMain.java:329)
at groovy.ui.GroovyMain.process(GroovyMain.java:315)
at groovy.ui.GroovyMain.processArgs(GroovyMain.java:134)
at groovy.ui.GroovyMain.main(GroovyMain.java:114)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:116)
at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:138)
1 error
May I ask how can I make the tool runnable on my laptop? I currently deployed it on Eclipse Oxygen and the version of java is 1.7, and the version of groovy is 2.4.15. My laptop's OS is Mac OS.
Sorry for asking this silly question. I am new at groovy. :)
And thanks for your time and patience .
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.