pwn 0.5.482 → 0.5.484
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 +13 -13
- 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: 8ad0028363f72fece4022b5631f68a8142b19ab7af00e7987fc43dd773e169a4
|
|
4
|
+
data.tar.gz: 27dd8ecef89a6decfc44e312e3690f4a73e93b42bfc0f9742ab67f0f0dc82a77
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 11bfb6d3dd4e440cb18ee3dbf7a00fa2dfe8a984e636aa24e0fca70f797a9ee3b8a30a165c1db2f9c321104d535eb5424285a9a7279b3acea6d16776555fddc8
|
|
7
|
+
data.tar.gz: 050ed304623fe6a629223fb930bad5d76920baba5541f6aceeb02bf44986c84e3a8e11a87c122793f2a2c9bc512c2231c6f7b381ccfa7fcfa7ff621af84c03cd
|
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.484]: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.484]: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.484]: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
|
@@ -509,7 +509,7 @@ module PWN
|
|
|
509
509
|
|
|
510
510
|
rx_height = Curses.lines - 4
|
|
511
511
|
rx_win = Curses::Window.new(rx_height, Curses.cols, 0, 0)
|
|
512
|
-
rx_win.scrollok(
|
|
512
|
+
rx_win.scrollok(false)
|
|
513
513
|
rx_win.nodelay = true
|
|
514
514
|
rx_win.attron(Curses.color_pair(cyan) | Curses::A_BOLD)
|
|
515
515
|
|
|
@@ -531,7 +531,8 @@ module PWN
|
|
|
531
531
|
|
|
532
532
|
rx_win.refresh
|
|
533
533
|
|
|
534
|
-
|
|
534
|
+
tx_height = rx_height - 1
|
|
535
|
+
tx_win = Curses::Window.new(4, Curses.cols, tx_height, 0)
|
|
535
536
|
tx_win.scrollok(false)
|
|
536
537
|
tx_win.nodelay = true
|
|
537
538
|
tx_win.refresh
|
|
@@ -594,7 +595,7 @@ module PWN
|
|
|
594
595
|
end
|
|
595
596
|
last_drawn = current_line
|
|
596
597
|
end
|
|
597
|
-
sleep 0.
|
|
598
|
+
sleep 0.0001
|
|
598
599
|
end
|
|
599
600
|
end
|
|
600
601
|
echo_thread.abort_on_exception = false
|
|
@@ -624,7 +625,7 @@ module PWN
|
|
|
624
625
|
rx_win = PWN.const_get(:MeshRxWin)
|
|
625
626
|
mutex = PWN.const_get(:MeshMutex)
|
|
626
627
|
|
|
627
|
-
from = packet[:node_id_from]
|
|
628
|
+
from = "#{packet[:node_id_from]} ".ljust(11, '>')
|
|
628
629
|
absolute_topic = "#{region}/#{topic.gsub('#', from)}"
|
|
629
630
|
to = packet[:node_id_to]
|
|
630
631
|
rx_text = decoded[:payload]
|
|
@@ -633,26 +634,25 @@ module PWN
|
|
|
633
634
|
# Select a random color pair different from the last used one
|
|
634
635
|
colors_arr = PWN.const_get(:MeshColors)
|
|
635
636
|
last_pair = PWN.const_get(:MeshLastPair)
|
|
636
|
-
|
|
637
|
-
|
|
637
|
+
pair = last_pair
|
|
638
|
+
unless last_from == from
|
|
639
|
+
PWN.send(:remove_const, :MeshLastPair)
|
|
638
640
|
pair_choices = colors_arr.reject { |c| c == last_pair }
|
|
639
641
|
pair = pair_choices.sample
|
|
640
|
-
|
|
641
|
-
pair = last_pair
|
|
642
|
+
PWN.const_set(:MeshLastPair, pair)
|
|
642
643
|
end
|
|
643
|
-
PWN.const_set(:MeshLastPair, pair)
|
|
644
644
|
rx_win.attron(Curses.color_pair(pair) | Curses::A_REVERSE)
|
|
645
645
|
|
|
646
|
-
current_line = "\n[#{ts}] [RX] #{absolute_topic}
|
|
646
|
+
current_line = "\n[#{ts}] [RX] #{absolute_topic} #{rx_text}"
|
|
647
647
|
current_line = "\n[#{ts}] [RX][DM INTERCEPTED] #{absolute_topic} to: #{to} >>> #{rx_text}" unless to == '!ffffffff'
|
|
648
648
|
|
|
649
649
|
mutex.synchronize do
|
|
650
|
-
inner_width = Curses.cols
|
|
650
|
+
inner_width = Curses.cols
|
|
651
651
|
content = current_line.sub(/\A\n/, '')
|
|
652
652
|
segments = content.scan(/.{1,#{inner_width}}/)
|
|
653
653
|
segments.each do |seg|
|
|
654
|
-
rx_win.addstr("\n")
|
|
655
|
-
rx_win.setpos(rx_win.cury,
|
|
654
|
+
# rx_win.addstr("\n")
|
|
655
|
+
rx_win.setpos(rx_win.cury, 0)
|
|
656
656
|
line = seg.ljust(inner_width)
|
|
657
657
|
rx_win.addstr(line)
|
|
658
658
|
end
|
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.484
|
|
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.136
|
|
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.136
|
|
544
544
|
- !ruby/object:Gem::Dependency
|
|
545
545
|
name: metasm
|
|
546
546
|
requirement: !ruby/object:Gem::Requirement
|