Comments (11)
The second issue is probably related. Same applet, same code, except I am
calling a.get_methods()
Traceback (most recent call last):
File "./bla.py", line 23, in <module>
for i in a.get_methods() :
File "/home/spjsschl/androguard/androguard.py", line 474, in __getattr__
return getattr(self.__a, value)
AttributeError: 'NoneType' object has no attribute 'get_methods'
Original comment by [email protected]
on 29 Nov 2011 at 11:56
from androguard.
Ok I'm on it :)
Original comment by [email protected]
on 30 Nov 2011 at 8:08
- Changed state: Accepted
from androguard.
Can you try on the latest revision ?
Original comment by [email protected]
on 1 Dec 2011 at 7:51
from androguard.
Sorry, seems my email from last week got lost. Thanks for working on this.
I have tried the new version and both problems persist, there is no visible
effect for the changes on my system.
Johannes
Original comment by [email protected]
on 5 Dec 2011 at 7:13
from androguard.
Uhm not on my side:
ACC_PROTECTED json/Parser r Ljavax/swing/JList;
ACC_STATIC json/Parser exp [Ljava/lang/String;
ACC_PRIVATE json/Parser jsonData Ljava/lang/String;
ACC_PROTECTED json/Parser d Ljava/util/HashSet;
ACC_PRIVATE json/Parser postfix Ljava/lang/String;
ACC_PROTECTED ACC_STATIC json/Parser dc Ljava/lang/String;
ACC_PUBLIC ACC_STATIC json/Parser v Ljava/lang/String;
ACC_PROTECTED ACC_STATIC json/Parser pt Ljava/lang/String;
ACC_PROTECTED ACC_STATIC json/Parser pfx Ljava/lang/String;
ACC_PUBLIC ACC_STATIC ACC_FINAL json/SmartyPointer e Ljava/lang/String;
ACC_PUBLIC ACC_STATIC ACC_FINAL json/SmartyPointer c Ljava/lang/Class;
ACC_PUBLIC ACC_STATIC ACC_FINAL json/SmartyPointer g Ljava/lang/String;
ACC_PUBLIC ACC_STATIC ACC_FINAL json/SmartyPointer n S
ACC_PUBLIC ACC_STATIC json/ThreadParser m Ljava/lang/reflect/Method;
ACC_PROTECTED ACC_STATIC json/ThreadParser ctr I
ACC_PUBLIC ACC_STATIC json/ThreadParser rw [B
ACC_PRIVATE json/ThreadParser s Ljava/lang/String;
ACC_PRIVATE json/XML j Ljava/util/HashSet;
ACC_PRIVATE ACC_STATIC json/XML i [S
ACC_PUBLIC ACC_STATIC json/XML e Ljava/lang/String;
ACC_FINAL json/XML database Ljson/Parser;
#!/usr/bin/env python
import sys, hashlib
PATH_INSTALL = "./"
sys.path.append(PATH_INSTALL + "/core")
sys.path.append(PATH_INSTALL + "/core/bytecodes")
sys.path.append(PATH_INSTALL + "/core/bytecodes/libdvm/")
sys.path.append(PATH_INSTALL + "/core/analysis")
sys.path.append(PATH_INSTALL + "/core/analysis/libsign")
sys.path.append(PATH_INSTALL + "/classification")
import androguard, jvm
TEST = "./field.jar"
x = jvm.JAR( TEST )
bc = x.get_classes()
for j in bc :
vm = jvm.JVMFormat(j[1])
for i in vm.get_fields() :
print i.get_access(), i.get_class_name(), i.get_name(), i.get_descriptor()
Original comment by [email protected]
on 6 Dec 2011 at 7:09
from androguard.
Your program works even though it has shorter output compared yo your example
run:
ACC_PRIVATE json/XML j Ljava/util/HashSet;
ACC_PRIVATE ACC_STATIC json/XML i [S
ACC_PUBLIC ACC_STATIC json/XML e Ljava/lang/String;
ACC_FINAL json/XML database Ljson/Parser;
The program that I sent to you initially (and that I used for my testing) still
does not work:
#!/usr/bin/env python
import sys
PATH_INSTALL = "/home/spjsschl/androguard/"
sys.path.append(PATH_INSTALL)
sys.path.append(PATH_INSTALL + "/core")
sys.path.append(PATH_INSTALL + "/core/bytecodes")
sys.path.append(PATH_INSTALL + "/core/analysis")
import androguard
a = androguard.AndroguardS(sys.argv[1])
# SHOW CLASS (verbose)
#a.show()
# SHOW FIELDS
for i in a.get_fields() :
print i.get_access(), i.get_name(), i.get_descriptor()
## SHOW METHODS
#for i in a.get_methods() :
# print i.get_access(), i.get_name(), i.get_descriptor()
output:
Traceback (most recent call last):
File "./bla.py", line 19, in <module>
for i in a.get_fields() :
File "/home/spjsschl/androguard/androguard.py", line 474, in __getattr__
return getattr(self.__a, value)
AttributeError: 'NoneType' object has no attribute 'get_fields'
Original comment by [email protected]
on 6 Dec 2011 at 8:16
from androguard.
Yes I know, could you try with mine ?
Original comment by [email protected]
on 7 Dec 2011 at 7:16
from androguard.
I ran your code, see the output in my previous mail.
It is somehow shorter than your example output.
Original comment by [email protected]
on 8 Dec 2011 at 7:09
from androguard.
Could you try by changing AndroguardS with JAR + JavaVMFormat ?
Original comment by [email protected]
on 9 Dec 2011 at 12:21
from androguard.
any news ?
Original comment by [email protected]
on 3 Feb 2012 at 6:18
from androguard.
Original comment by [email protected]
on 5 Aug 2012 at 9:40
- Changed state: Fixed
from androguard.
Related Issues (20)
- get_main_activity() HOT 1
- Exceptions must be old-style classes (androcsign)
- Patch for /androlyze.py
- AndroidManifest.xml is not well formatted in OBAD Malware
- DAD error when tryiong to decompile SMForw malware class
- androaxml error "not well-formed (invalid token)"
- Renaming methods with prototype in their name does not update the python exports
- Renaming a method, then the class make all the methods have the same name
- suggestion: add Modification of DEX file to the wiki RE
- Is there any API can be used for building a data-dependence-graph for one method?
- Error in decoding byte array into utf-8 and utf-16 strings
- AttributeError: 'NoneType' object has no attribute 'set_attributes' HOT 1
- dad does not decompile correctly interface HOT 1
- string of length 0 found in BadNews Malware sample
- Incorrect Sign Conversion for readsleb128
- androsign.py Segmentation Fault HOT 2
- New feature - runtime scan with VirusTotal HOT 2
- bug in Androguard.get_class(self, class_name)
- androrisk - enhancement (add summary option)
- Does not compile properly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from androguard.