pwn 0.5.485 → 0.5.487

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f662cf26231142d1817f7d294a040e75dd4251b5cde89db91a29fedbe4016a56
4
- data.tar.gz: 9e5a446bfadf5e27f9f8f5337269f0ddc25f7efaa271549b7ff435c7eb1bfb33
3
+ metadata.gz: 39f11158eacd6a873c2699f6f642591ed8b4de2ba64ce73f96b84f56f35a81e8
4
+ data.tar.gz: '08b0fb7f0b619bfb20e1fb97b083a180c215a662f90383a43b22785e2e57e5fd'
5
5
  SHA512:
6
- metadata.gz: 12c6f3426b3ade8f9149c3de4f741bbd776290471ac1ab24427ba4e690eb2578eb3d420427b5682523c807a1cca8f5f129307ba6f58556872f88935c9b9ead3b
7
- data.tar.gz: fbafe45d436da4952b621d39e3ff9ef65b7252dba8c1bdcb11a9b26418795e88e942323315742e4ccda09621757568215464ed20acce71d00587256f74949871
6
+ metadata.gz: fc7d789f23c35d20ab41229e87903c8a618da4fef1518b51291fe534b888a3d0cfcb36af7f824bef116f224034ba8e9d071a7e88fa1a7ad2cdb6b418fe2498db
7
+ data.tar.gz: b36f00d2e5a3118c561415be867d14eae5b2ec54b6dac67c32840bc434585fac9a1f1633b2f81178b495f3900ee5f567b7c63c5b4402779826b1cd952fa63b64
data/Gemfile CHANGED
@@ -49,7 +49,7 @@ gem 'jwt', '3.1.2'
49
49
  gem 'libusb', '0.7.2'
50
50
  gem 'luhn', '3.0.0'
51
51
  gem 'mail', '2.9.0'
52
- gem 'meshtastic', '0.0.136'
52
+ gem 'meshtastic', '0.0.139'
53
53
  gem 'metasm', '1.0.5'
54
54
  gem 'mongo', '2.21.3'
55
55
  gem 'msfrpc-client', '1.1.2'
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.485]:001 >>> PWN.help
40
+ pwn[v0.5.487]:001 >>> PWN.help
41
41
  ```
42
42
 
43
43
  [![Installing the pwn Security Automation Framework](https://raw.githubusercontent.com/0dayInc/pwn/master/documentation/pwn_install.png)](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.485]:001 >>> PWN.help
55
+ pwn[v0.5.487]: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.485]:001 >>> PWN.help
65
+ pwn[v0.5.487]: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:
@@ -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,18 +641,25 @@ 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
+ inner_height = Curses.lines - 5
651
652
  inner_width = Curses.cols
652
- content = current_line.sub(/\A\n/, '')
653
- segments = content.scan(/.{1,#{inner_width}}/)
653
+ segments = current_line.scan(/.{1,#{inner_width}}/)
654
654
  segments.each do |seg|
655
- # rx_win.addstr("\n")
655
+ # TODO: Show new messages without scrolling above header line
656
+ rx_win.scroll if rx_win.cury >= (inner_height - 1)
657
+
656
658
  rx_win.setpos(rx_win.cury, 0)
659
+ # Handle wide Unicode characters for proper alignment
660
+ display_width = Unicode::DisplayWidth.of(seg)
661
+ width_diff = seg.length - display_width
662
+ inner_width = Curses.cols + width_diff
657
663
  line = seg.ljust(inner_width)
658
664
  rx_win.addstr(line)
659
665
  end
@@ -753,7 +759,6 @@ module PWN
753
759
  end
754
760
  PWN.send(:remove_const, :MeshColors) if PWN.const_defined?(:MeshColors)
755
761
  PWN.send(:remove_const, :MeshLastPair) if PWN.const_defined?(:MeshLastPair)
756
- PWN.send(:remove_const, :MeshPi) if PWN.const_defined?(:MeshPi)
757
762
  PWN.send(:remove_const, :MeshMutex) if PWN.const_defined?(:MeshMutex)
758
763
  PWN.send(:remove_const, :MqttSubThread) if PWN.const_defined?(:MqttSubThread)
759
764
  Curses.close_screen
data/lib/pwn/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PWN
4
- VERSION = '0.5.485'
4
+ VERSION = '0.5.487'
5
5
  end
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.485
4
+ version: 0.5.487
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.136
536
+ version: 0.0.139
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.136
543
+ version: 0.0.139
544
544
  - !ruby/object:Gem::Dependency
545
545
  name: metasm
546
546
  requirement: !ruby/object:Gem::Requirement