rex-arch 0.1.19 → 0.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/rex/arch/version.rb +1 -1
- data/lib/rex/arch.rb +46 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 30cf6b2c973009535afe80c8f6b9f5e4f2a21e8b3621b2b9aba087d46d6ef77b
|
|
4
|
+
data.tar.gz: c339e089b5f2eee1392c7f22f331732133252d16a2ee09b08665be0314bcdf9e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d4fdd3fa73b281bcf0cd9f280e64e16800ebd3afa5d00fafa065c8f118f255a5c121f119618c6290d4d5b49c832a166d458ce9327950bc037229ad0f557e0edb
|
|
7
|
+
data.tar.gz: af7e7debee51b178f32ef68048a83f4ce4558384b4f6c23c893e0517bb48eb760c4db19c173ac13680ca45abbb37c57c7c52a47e0cbbf8ed68ee9f2897760377
|
data/lib/rex/arch/version.rb
CHANGED
data/lib/rex/arch.rb
CHANGED
|
@@ -214,5 +214,51 @@ module Arch
|
|
|
214
214
|
return ENDIAN_LITTLE
|
|
215
215
|
end
|
|
216
216
|
|
|
217
|
+
#
|
|
218
|
+
# This routine maps the output of `uname -m` to a Rex architecture constant.
|
|
219
|
+
# Returns nil if the architecture is not recognized.
|
|
220
|
+
#
|
|
221
|
+
def self.from_uname(uname_arch)
|
|
222
|
+
case uname_arch.to_s.downcase.strip
|
|
223
|
+
when 'x86_64', 'x64', 'amd64'
|
|
224
|
+
ARCH_X64
|
|
225
|
+
when 'i686', 'i386', 'i486', 'i586'
|
|
226
|
+
ARCH_X86
|
|
227
|
+
when 'aarch64', 'arm64'
|
|
228
|
+
ARCH_AARCH64
|
|
229
|
+
when /\Aarmv[0-9].*l\Z/
|
|
230
|
+
ARCH_ARMLE
|
|
231
|
+
when /\Aarmv[0-9].*b\Z/
|
|
232
|
+
ARCH_ARMBE
|
|
233
|
+
when 'mips'
|
|
234
|
+
ARCH_MIPSBE
|
|
235
|
+
when 'mipsel'
|
|
236
|
+
ARCH_MIPSLE
|
|
237
|
+
when 'mips64'
|
|
238
|
+
ARCH_MIPS64
|
|
239
|
+
when 'mips64el'
|
|
240
|
+
ARCH_MIPS64LE
|
|
241
|
+
when 'ppc'
|
|
242
|
+
ARCH_PPC
|
|
243
|
+
when 'ppc64'
|
|
244
|
+
ARCH_PPC64
|
|
245
|
+
when 'ppc64le'
|
|
246
|
+
ARCH_PPC64LE
|
|
247
|
+
when 's390x'
|
|
248
|
+
ARCH_ZARCH
|
|
249
|
+
when 'sparc'
|
|
250
|
+
ARCH_SPARC
|
|
251
|
+
when 'sparc64'
|
|
252
|
+
ARCH_SPARC64
|
|
253
|
+
when 'riscv32'
|
|
254
|
+
ARCH_RISCV32LE
|
|
255
|
+
when 'riscv64'
|
|
256
|
+
ARCH_RISCV64LE
|
|
257
|
+
when 'loongarch64'
|
|
258
|
+
ARCH_LOONGARCH64
|
|
259
|
+
end
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
|
|
217
263
|
end
|
|
218
264
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
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.20
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Metasploit Hackers
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-05-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|