rex-arch 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/rex/arch.rb +39 -49
- data/lib/rex/arch/version.rb +1 -1
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 950f4b7276cee40d8de943494368877689322aeb
|
4
|
+
data.tar.gz: 7e7efec97ac4eba36b096a71472082883139152e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90f14aeab1149108cef611b212e19e7272e9ed9174e77b430110b85f73408e0877981bd612a0f1e36cc88aa50a974633ad055c64055d609e99476a8e9a85aeca
|
7
|
+
data.tar.gz: 8da2f0634613c2de08e2db4089adee623d33213fd2af361526629e246fe74b13387820a3d7461553647e3cae42fed684771cfa8c9c86d0768892ce1cba071bca
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/rex/arch.rb
CHANGED
@@ -24,58 +24,36 @@ module Arch
|
|
24
24
|
# Architecture constants
|
25
25
|
#
|
26
26
|
ARCH_ANY = '_any_'
|
27
|
-
|
28
|
-
ARCH_X86_64 = 'x86_64'
|
29
|
-
ARCH_X64 = 'x64' # To be used for compatability with ARCH_X86_64
|
30
|
-
ARCH_MIPS = 'mips'
|
31
|
-
ARCH_MIPSLE = 'mipsle'
|
32
|
-
ARCH_MIPSBE = 'mipsbe'
|
33
|
-
ARCH_PPC = 'ppc'
|
34
|
-
ARCH_PPC64 = 'ppc64'
|
35
|
-
ARCH_CBEA = 'cbea'
|
36
|
-
ARCH_CBEA64 = 'cbea64'
|
37
|
-
ARCH_SPARC = 'sparc'
|
38
|
-
ARCH_CMD = 'cmd'
|
39
|
-
ARCH_PHP = 'php'
|
40
|
-
ARCH_TTY = 'tty'
|
41
|
-
ARCH_ARMLE = 'armle'
|
42
|
-
ARCH_ARMBE = 'armbe'
|
43
|
-
ARCH_JAVA = 'java'
|
44
|
-
ARCH_RUBY = 'ruby'
|
45
|
-
ARCH_DALVIK = 'dalvik'
|
46
|
-
ARCH_PYTHON = 'python'
|
47
|
-
ARCH_NODEJS = 'nodejs'
|
48
|
-
ARCH_FIREFOX = 'firefox'
|
49
|
-
ARCH_ZARCH = 'zarch'
|
50
|
-
ARCH_TYPES =
|
27
|
+
ARCH_ALL = ARCH_TYPES =
|
51
28
|
[
|
52
|
-
ARCH_X86,
|
53
|
-
ARCH_X86_64,
|
54
|
-
ARCH_X64,
|
55
|
-
ARCH_MIPS,
|
56
|
-
ARCH_MIPSLE,
|
57
|
-
ARCH_MIPSBE,
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
29
|
+
ARCH_X86 = 'x86',
|
30
|
+
ARCH_X86_64 = 'x86_64',
|
31
|
+
ARCH_X64 = 'x64', # To be used for compatability with ARCH_X86_64
|
32
|
+
ARCH_MIPS = 'mips',
|
33
|
+
ARCH_MIPSLE = 'mipsle',
|
34
|
+
ARCH_MIPSBE = 'mipsbe',
|
35
|
+
ARCH_MIPS64 = 'mips64',
|
36
|
+
ARCH_PPC = 'ppc',
|
37
|
+
ARCH_PPC64 = 'ppc64',
|
38
|
+
ARCH_PPC64LE = 'ppc64le',
|
39
|
+
ARCH_CBEA = 'cbea',
|
40
|
+
ARCH_CBEA64 = 'cbea64',
|
41
|
+
ARCH_SPARC = 'sparc',
|
42
|
+
ARCH_ARMLE = 'armle',
|
43
|
+
ARCH_ARMBE = 'armbe',
|
44
|
+
ARCH_AARCH64 = 'aarch64',
|
45
|
+
ARCH_CMD = 'cmd',
|
46
|
+
ARCH_PHP = 'php',
|
47
|
+
ARCH_TTY = 'tty',
|
48
|
+
ARCH_JAVA = 'java',
|
49
|
+
ARCH_RUBY = 'ruby',
|
50
|
+
ARCH_DALVIK = 'dalvik',
|
51
|
+
ARCH_PYTHON = 'python',
|
52
|
+
ARCH_NODEJS = 'nodejs',
|
53
|
+
ARCH_FIREFOX = 'firefox',
|
54
|
+
ARCH_ZARCH = 'zarch',
|
75
55
|
]
|
76
56
|
|
77
|
-
ARCH_ALL = ARCH_TYPES
|
78
|
-
|
79
57
|
#
|
80
58
|
# Endian constants
|
81
59
|
#
|
@@ -122,14 +100,20 @@ module Arch
|
|
122
100
|
[addr].pack('N')
|
123
101
|
when ARCH_MIPSLE
|
124
102
|
[addr].pack('V')
|
103
|
+
when ARCH_MIPS64
|
104
|
+
[addr].pack('Q>')
|
125
105
|
when ARCH_PPC # ambiguous
|
126
106
|
[addr].pack('N')
|
107
|
+
when ARCH_PPC64LE
|
108
|
+
[addr].pack('Q<')
|
127
109
|
when ARCH_SPARC
|
128
110
|
[addr].pack('N')
|
129
111
|
when ARCH_ARMLE
|
130
112
|
[addr].pack('V')
|
131
113
|
when ARCH_ARMBE
|
132
114
|
[addr].pack('N')
|
115
|
+
when ARCH_AARCH64
|
116
|
+
[addr].pack('Q<')
|
133
117
|
when ARCH_ZARCH
|
134
118
|
[addr].pack('Q>')
|
135
119
|
end
|
@@ -157,14 +141,20 @@ module Arch
|
|
157
141
|
return ENDIAN_LITTLE
|
158
142
|
when ARCH_MIPSBE
|
159
143
|
return ENDIAN_BIG
|
144
|
+
when ARCH_MIPS64
|
145
|
+
return ENDIAN_BIG
|
160
146
|
when ARCH_PPC # ambiguous
|
161
147
|
return ENDIAN_BIG
|
148
|
+
when ARCH_PPC64LE
|
149
|
+
return ENDIAN_LITTLE
|
162
150
|
when ARCH_SPARC
|
163
151
|
return ENDIAN_BIG
|
164
152
|
when ARCH_ARMLE
|
165
153
|
return ENDIAN_LITTLE
|
166
154
|
when ARCH_ARMBE
|
167
155
|
return ENDIAN_BIG
|
156
|
+
when ARCH_AARCH64
|
157
|
+
return ENDIAN_LITTLE
|
168
158
|
when ARCH_ZARCH
|
169
159
|
return ENDIAN_BIG
|
170
160
|
end
|
data/lib/rex/arch/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rex-arch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- dmohanty-r7
|
@@ -88,7 +88,7 @@ cert_chain:
|
|
88
88
|
G+Hmcg1v810agasPdoydE0RTVZgEOOMoQ07qu7JFXVWZ9ZQpHT7qJATWL/b2csFG
|
89
89
|
8mVuTXnyJOKRJA==
|
90
90
|
-----END CERTIFICATE-----
|
91
|
-
date: 2016-
|
91
|
+
date: 2016-12-08 00:00:00.000000000 Z
|
92
92
|
dependencies:
|
93
93
|
- !ruby/object:Gem::Dependency
|
94
94
|
name: bundler
|
metadata.gz.sig
CHANGED
Binary file
|