<reponame>arghya17/SecIotserver<filename>scripts/res/MobSF-master/mobsf/DynamicAnalyzer/tools/frida_scripts/auxiliary/get_methods.js<gh_stars>0/*
 * raptor_frida_android_enum.js - Java class/method enumerator
 * Copyright (c) 2017 Marco Ivaldi <kenaa@example.com>
 *
*/
Java.perform(function() {
	var hook;
	var targetClass = '{{CLASS}}';
	try{
		send('[AUXILIARY] Getting Methods and Implementations of Class: ' + targetClass)
		hook = Java.use(targetClass);
	} catch (err){
		send('[AUXILIARY] Hooking ' + targetClass + ' [\"Error\"] => ' + err);
		return;
	}
	var methods = hook.class.getDeclaredMethods();
	hook.$dispose;
	methods.forEach(function(method) { 
		send('[AUXILIARY] ' + method)
	});
	
});