pwn 0.5.634 → 0.5.635
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/.github/workflows/install-matrix.yml +7 -0
- data/lib/pwn/plugins/repl.rb +12 -1
- data/lib/pwn/setup.rb +19 -0
- data/lib/pwn/version.rb +1 -1
- data/pwn.gemspec +1 -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: 347b9c864507e706e465e27933acee3d03b8fca35529e3c63bfb374a50763061
|
|
4
|
+
data.tar.gz: 98764623bb85939b3dc681c1703ad4f5e50bc9450caef5773c39855b3b4b469e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3fe90d0d5abb8876bcb55d3be503725f7819426b2b42ea1e10c756c3c7c3f4d4060bace652e8617ba5d74af1078dab2d6250c5c5c57e0a3ca52eaf3a9410492b
|
|
7
|
+
data.tar.gz: d778fc2e42b1276b2731546fc84f893bf7174f903d8c3880a75c1930509d3a4e55e387e0c38ed61cfb43ad19e9e9e824c0f336b6e559d409d8fd6604da00ddfe
|
|
@@ -105,7 +105,13 @@ jobs:
|
|
|
105
105
|
# "detected dubious ownership" and the gem builds with ZERO files.
|
|
106
106
|
run: git config --global --add safe.directory "$PWD"
|
|
107
107
|
- name: build & install gem from checkout (git-checkout path in doc)
|
|
108
|
+
# `gem update --system` first: distro rubies ship RubyGems 3.x whose
|
|
109
|
+
# Molinillo resolver crashes with `undefined method 'request' for nil`
|
|
110
|
+
# (rubygems/rubygems#6215) instead of naming the unsatisfiable dep
|
|
111
|
+
# when a runtime dependency's required_ruby_version excludes this ruby.
|
|
112
|
+
# A modern RubyGems prints the real conflict.
|
|
108
113
|
run: |
|
|
114
|
+
gem update --system --no-document || true
|
|
109
115
|
gem build pwn.gemspec
|
|
110
116
|
gem install --no-document ./pwn-*.gem
|
|
111
117
|
gem install --no-document rspec
|
|
@@ -139,6 +145,7 @@ jobs:
|
|
|
139
145
|
|
|
140
146
|
- name: build & install gem from checkout
|
|
141
147
|
run: |
|
|
148
|
+
gem update --system --no-document || true
|
|
142
149
|
gem build pwn.gemspec
|
|
143
150
|
gem install --no-document ./pwn-*.gem
|
|
144
151
|
gem install --no-document rspec
|
data/lib/pwn/plugins/repl.rb
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
require 'curses'
|
|
4
4
|
require 'fileutils'
|
|
5
|
-
require 'meshtastic'
|
|
6
5
|
require 'pry'
|
|
7
6
|
require 'reline'
|
|
8
7
|
require 'tty-prompt'
|
|
@@ -613,6 +612,18 @@ module PWN
|
|
|
613
612
|
|
|
614
613
|
def process
|
|
615
614
|
pi = pry_instance
|
|
615
|
+
# meshtastic is a *setup-managed* gem (see pwn.gemspec / PWN::Setup):
|
|
616
|
+
# its rubygems.org releases carry `required_ruby_version >= 4.0`, so
|
|
617
|
+
# it cannot be a hard runtime dependency while pwn supports ruby 3.3+.
|
|
618
|
+
begin
|
|
619
|
+
require 'meshtastic'
|
|
620
|
+
rescue LoadError => e
|
|
621
|
+
output.puts "pwn-mesh unavailable: #{e.message}"
|
|
622
|
+
output.puts " meshtastic requires ruby >= 4.0 (running #{RUBY_VERSION})." if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('4.0.0')
|
|
623
|
+
output.puts ' Run: `pwn setup --profile full` (or `gem install meshtastic`) on ruby >= 4.0.'
|
|
624
|
+
return
|
|
625
|
+
end
|
|
626
|
+
|
|
616
627
|
pi.config.pwn_mesh = true
|
|
617
628
|
meshtastic_env = PWN::Env[:plugins][:meshtastic]
|
|
618
629
|
|
data/lib/pwn/setup.rb
CHANGED
|
@@ -102,6 +102,16 @@ module PWN
|
|
|
102
102
|
apt: %w[imagemagick libmagickwand-dev], dnf: %w[ImageMagick-devel],
|
|
103
103
|
pacman: %w[imagemagick], brew: %w[imagemagick], port: %w[imagemagick],
|
|
104
104
|
plugins: %w[PWN::Reports]
|
|
105
|
+
},
|
|
106
|
+
# Not a native extension, but gated by required_ruby_version >= 4.0 on
|
|
107
|
+
# rubygems.org — so it cannot be a hard runtime dependency of pwn while
|
|
108
|
+
# pwn.gemspec advertises `>= 3.3`. Managed here instead so
|
|
109
|
+
# `gem install pwn` succeeds on distro rubies (3.3/3.4) and `pwn setup`
|
|
110
|
+
# installs it post-hoc where possible. See install-matrix.yml.
|
|
111
|
+
'meshtastic' => {
|
|
112
|
+
apt: %w[], dnf: %w[], pacman: %w[], brew: %w[], port: %w[],
|
|
113
|
+
min_ruby: '4.0.0',
|
|
114
|
+
plugins: %w[PWN::Plugins::REPL#pwn-mesh]
|
|
105
115
|
}
|
|
106
116
|
}.freeze
|
|
107
117
|
|
|
@@ -398,6 +408,15 @@ module PWN
|
|
|
398
408
|
|
|
399
409
|
prof = PROFILES[profile]
|
|
400
410
|
gems = Array(prof[:gems])
|
|
411
|
+
# Drop setup-managed gems whose upstream required_ruby_version excludes
|
|
412
|
+
# THIS ruby (e.g. meshtastic >= 4.0 on a distro ruby 3.3) — otherwise
|
|
413
|
+
# `gem install` in the loop below fails and takes the whole profile with it.
|
|
414
|
+
gems = gems.reject do |g|
|
|
415
|
+
floor = NATIVE_GEMS.dig(g, :min_ruby)
|
|
416
|
+
skip = floor && Gem::Version.new(RUBY_VERSION) < Gem::Version.new(floor)
|
|
417
|
+
io.puts " \e[33mskip\e[0m #{g} — requires ruby >= #{floor} (running #{RUBY_VERSION})" if skip
|
|
418
|
+
skip
|
|
419
|
+
end
|
|
401
420
|
bins = Array(prof[:bins])
|
|
402
421
|
os_pkgs = []
|
|
403
422
|
gems.each { |g| os_pkgs.concat(Array(NATIVE_GEMS.dig(g, pm[:key]))) }
|
data/lib/pwn/version.rb
CHANGED
data/pwn.gemspec
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pwn
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.635
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- 0day Inc.
|
|
@@ -548,7 +548,7 @@ dependencies:
|
|
|
548
548
|
- - '='
|
|
549
549
|
- !ruby/object:Gem::Version
|
|
550
550
|
version: 0.0.172
|
|
551
|
-
type: :
|
|
551
|
+
type: :development
|
|
552
552
|
prerelease: false
|
|
553
553
|
version_requirements: !ruby/object:Gem::Requirement
|
|
554
554
|
requirements:
|