pwn 0.5.485 → 0.5.486
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/Gemfile +1 -1
- data/README.md +3 -3
- data/lib/pwn/plugins/repl.rb +9 -7
- data/lib/pwn/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6a00e0d95c9e0be5169eab1f252c92cc8df842179dee67a42e344d6d5180ca15
|
|
4
|
+
data.tar.gz: 6790637bca216986e41e89958f596b583bc9a36dea307e5723cbfb6a4b538153
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c5a75d88b69df64071efbf705a117e49d18b03a46aa895696133b6dac2bf7cb7572bbe8149f08e7440cdcf5a37324b2c167defa24239eff2009ec15007b73017
|
|
7
|
+
data.tar.gz: 0a9df8092b26b299908e04789474a45eef61a792edd1cd4ee76b9efb977e14a049135186ec232f5a801e89a9e3fb3c511a1faed29fcaa92a8744013cace766c7
|
data/Gemfile
CHANGED
data/README.md
CHANGED
|
@@ -37,7 +37,7 @@ $ cd /opt/pwn
|
|
|
37
37
|
$ ./install.sh
|
|
38
38
|
$ ./install.sh ruby-gem
|
|
39
39
|
$ pwn
|
|
40
|
-
pwn[v0.5.
|
|
40
|
+
pwn[v0.5.486]:001 >>> PWN.help
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
[](https://youtu.be/G7iLUY4FzsI)
|
|
@@ -52,7 +52,7 @@ $ rvm use ruby-3.4.4@pwn
|
|
|
52
52
|
$ gem uninstall --all --executables pwn
|
|
53
53
|
$ gem install --verbose pwn
|
|
54
54
|
$ pwn
|
|
55
|
-
pwn[v0.5.
|
|
55
|
+
pwn[v0.5.486]:001 >>> PWN.help
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
If you're using a multi-user install of RVM do:
|
|
@@ -62,7 +62,7 @@ $ rvm use ruby-3.4.4@pwn
|
|
|
62
62
|
$ rvmsudo gem uninstall --all --executables pwn
|
|
63
63
|
$ rvmsudo gem install --verbose pwn
|
|
64
64
|
$ pwn
|
|
65
|
-
pwn[v0.5.
|
|
65
|
+
pwn[v0.5.486]:001 >>> PWN.help
|
|
66
66
|
```
|
|
67
67
|
|
|
68
68
|
PWN periodically upgrades to the latest version of Ruby which is reflected in `/opt/pwn/.ruby-version`. The easiest way to upgrade to the latest version of Ruby from a previous PWN installation is to run the following script:
|
data/lib/pwn/plugins/repl.rb
CHANGED
|
@@ -5,6 +5,7 @@ require 'fileutils'
|
|
|
5
5
|
require 'meshtastic'
|
|
6
6
|
require 'pry'
|
|
7
7
|
require 'tty-prompt'
|
|
8
|
+
require 'unicode/display_width'
|
|
8
9
|
require 'yaml'
|
|
9
10
|
|
|
10
11
|
module PWN
|
|
@@ -433,7 +434,6 @@ module PWN
|
|
|
433
434
|
PWN.send(:remove_const, :MqttObj) if PWN.const_defined?(:MqttObj)
|
|
434
435
|
PWN.send(:remove_const, :MeshRxWin) if PWN.const_defined?(:MeshRxWin)
|
|
435
436
|
PWN.send(:remove_const, :MeshTxWin) if PWN.const_defined?(:MeshTxWin)
|
|
436
|
-
PWN.send(:remove_const, :MeshPi) if PWN.const_defined?(:MeshPi)
|
|
437
437
|
PWN.send(:remove_const, :MeshMutex) if PWN.const_defined?(:MeshMutex)
|
|
438
438
|
PWN.send(:remove_const, :MqttSubThread) if PWN.const_defined?(:MqttSubThread)
|
|
439
439
|
|
|
@@ -541,7 +541,6 @@ module PWN
|
|
|
541
541
|
PWN.const_set(:MeshRxWin, rx_win)
|
|
542
542
|
PWN.const_set(:MeshTxWin, tx_win)
|
|
543
543
|
PWN.const_set(:MeshMutex, Mutex.new)
|
|
544
|
-
PWN.const_set(:MeshPi, pi)
|
|
545
544
|
|
|
546
545
|
# Live typing echo thread (idempotent)
|
|
547
546
|
tx_prompt = "#{region}/#{topic} >>>"
|
|
@@ -642,20 +641,24 @@ module PWN
|
|
|
642
641
|
pair = pair_choices.sample
|
|
643
642
|
PWN.const_set(:MeshLastPair, pair)
|
|
644
643
|
end
|
|
645
|
-
rx_win.attron(Curses.color_pair(pair) | Curses::A_REVERSE)
|
|
646
644
|
|
|
647
645
|
to_label = 'To'
|
|
648
646
|
to_label = 'DM' unless to == '!ffffffff'
|
|
649
647
|
current_line = "\nDate: #{ts}\nFrom: #{from}\n#{to_label}: #{to}\nTopic: #{absolute_topic}\n> #{rx_text}"
|
|
648
|
+
|
|
649
|
+
rx_win.attron(Curses.color_pair(pair) | Curses::A_REVERSE)
|
|
650
650
|
mutex.synchronize do
|
|
651
651
|
inner_width = Curses.cols
|
|
652
|
-
|
|
653
|
-
segments = content.scan(/.{1,#{inner_width}}/)
|
|
652
|
+
segments = current_line.scan(/.{1,#{inner_width}}/)
|
|
654
653
|
segments.each do |seg|
|
|
655
|
-
# rx_win.addstr("\n")
|
|
656
654
|
rx_win.setpos(rx_win.cury, 0)
|
|
655
|
+
# Handle wide Unicode characters for proper alignment
|
|
656
|
+
display_width = Unicode::DisplayWidth.of(seg)
|
|
657
|
+
width_diff = seg.length - display_width
|
|
658
|
+
inner_width = Curses.cols + width_diff
|
|
657
659
|
line = seg.ljust(inner_width)
|
|
658
660
|
rx_win.addstr(line)
|
|
661
|
+
# rx_win.addstr("Inner Width: #{inner_width} width_diff: #{width_diff} display_width: #{display_width} seg.length: #{seg.length}\n")
|
|
659
662
|
end
|
|
660
663
|
rx_win.refresh
|
|
661
664
|
end
|
|
@@ -753,7 +756,6 @@ module PWN
|
|
|
753
756
|
end
|
|
754
757
|
PWN.send(:remove_const, :MeshColors) if PWN.const_defined?(:MeshColors)
|
|
755
758
|
PWN.send(:remove_const, :MeshLastPair) if PWN.const_defined?(:MeshLastPair)
|
|
756
|
-
PWN.send(:remove_const, :MeshPi) if PWN.const_defined?(:MeshPi)
|
|
757
759
|
PWN.send(:remove_const, :MeshMutex) if PWN.const_defined?(:MeshMutex)
|
|
758
760
|
PWN.send(:remove_const, :MqttSubThread) if PWN.const_defined?(:MqttSubThread)
|
|
759
761
|
Curses.close_screen
|
data/lib/pwn/version.rb
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.486
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- 0day Inc.
|
|
@@ -533,14 +533,14 @@ dependencies:
|
|
|
533
533
|
requirements:
|
|
534
534
|
- - '='
|
|
535
535
|
- !ruby/object:Gem::Version
|
|
536
|
-
version: 0.0.
|
|
536
|
+
version: 0.0.137
|
|
537
537
|
type: :runtime
|
|
538
538
|
prerelease: false
|
|
539
539
|
version_requirements: !ruby/object:Gem::Requirement
|
|
540
540
|
requirements:
|
|
541
541
|
- - '='
|
|
542
542
|
- !ruby/object:Gem::Version
|
|
543
|
-
version: 0.0.
|
|
543
|
+
version: 0.0.137
|
|
544
544
|
- !ruby/object:Gem::Dependency
|
|
545
545
|
name: metasm
|
|
546
546
|
requirement: !ruby/object:Gem::Requirement
|