1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 import types, random, string
20
21 ANDROGUARD_VERSION = "b0"
22
23 ANDROAXML_VERSION = "0.1"
24 ANDRODD_VERSION = "0.1"
25 ANDRODIFF_VERSION = "0.1"
26 ANDROSIM_VERSION = "0.1"
27 ANDRODUMP_VERSION = "0.1"
28 ANDROLYZE_VERSION = "0.2"
29 ANDROMARKS_VERSION = "0.1"
30 ANDROXGMML_VERSION = "0.1"
31
32
33
34
49
51 if l > 0x7fffffff :
52 l = (0x7fffffff & l) - 0x80000000
53 return l
54
56 """Convert an integer to a string."""
57 if type(l) not in (types.IntType, types.LongType):
58 raise ValueError, 'the input must be an integer'
59
60 if l < 0:
61 raise ValueError, 'the input must be greater than 0'
62 s = ''
63 while l:
64 s = s + chr(l & 255L)
65 l >>= 8
66
67 return s
68
70 """Convert a string to a long integer."""
71 if type(s) not in (types.StringType, types.UnicodeType):
72 raise ValueError, 'the input must be a string'
73
74 l = 0L
75 for i in s:
76 l <<= 8
77 l |= ord(i)
78
79 return l
80
82 return random.choice( string.letters ) + ''.join([ random.choice(string.letters + string.digits) for i in range(10 - 1) ] )
83
85 fd = open( real_filename, "r")
86 val = None
87
88 f_bytes = fd.read(3)
89
90 if f_bytes[0:2] == "PK" :
91 val = "APK"
92 elif f_bytes[0:3] == "dex" :
93 val = "DEX"
94
95 fd.close()
96 return val
97