def main(path): print "main started!!" global dissector_global_dir config = ConfigurationReader() #Config parameters #Check if the path is a file or a dir if os.path.isdir(path): #Checking if path is OK if path[-1:] is not "/": path = path + "/" analyzeSample(path, config) #Could call to statistics.py to get some permissions statistics print "[*] Getting some statistics..." stats = Statistics(config.outputdir) stats.getStatistics() print "[*] Errors are reported in " + config.errorlogdir print "[*] More output for each APK available in " + config.outputdir else: #apkname = os.path.basename(path) start = time.time() #analyzeAPK(path, config) apk = ThreadAnalyzer(path,config) print "Analyzing APK " + path apk.start() #Wait until thread ends #if apk.isAlive(): # apk.join() end = time.time() print "Total time spent (seconds): %.2f" % (end - start)
def main(dir): if dir[-1:] is not "/": dir = dir + "/" if os.path.isdir(dir): statistics = Statistics(dir) statistics.getStatistics()