pwn 0.5.486 → 0.5.488

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: 6a00e0d95c9e0be5169eab1f252c92cc8df842179dee67a42e344d6d5180ca15
4
- data.tar.gz: 6790637bca216986e41e89958f596b583bc9a36dea307e5723cbfb6a4b538153
3
+ metadata.gz: 1c6b217ab3c5fdf16b2cacd41cfdbc77fdcc4fe4f2095490e831a172022bd8e4
4
+ data.tar.gz: 8855d5d95676a6779ec7f81a5c968ca82bbb09e0ffab2ae7bc35d146bce159d8
5
5
  SHA512:
6
- metadata.gz: c5a75d88b69df64071efbf705a117e49d18b03a46aa895696133b6dac2bf7cb7572bbe8149f08e7440cdcf5a37324b2c167defa24239eff2009ec15007b73017
7
- data.tar.gz: 0a9df8092b26b299908e04789474a45eef61a792edd1cd4ee76b9efb977e14a049135186ec232f5a801e89a9e3fb3c511a1faed29fcaa92a8744013cace766c7
6
+ metadata.gz: 17c944994ed32f740d1e2048598229deea593b1a657fe1a7e9e0928cc23052c31a07ccdff30f90242c395b28073ce5c584d8ab9f45a448b5bd0b3f152ab3a972
7
+ data.tar.gz: f1ad3887c815aaf1ebff5b7113c55ef0e255891f68fcb39a9b8348dc60db1c10f6e03c87802a6c36d5d51781ad0ae8990978232c6cf63fb08eed608455a6db81
data/.rubocop.yml CHANGED
@@ -6,7 +6,7 @@ Layout/LineLength:
6
6
  Lint/UselessRescue:
7
7
  Enabled: false
8
8
  Metrics/AbcSize:
9
- Max: 552.3
9
+ Max: 562
10
10
  Metrics/BlockLength:
11
11
  Max: 292
12
12
  Metrics/BlockNesting:
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.137'
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.486]:001 >>> PWN.help
40
+ pwn[v0.5.488]: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.486]:001 >>> PWN.help
55
+ pwn[v0.5.488]: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.486]:001 >>> PWN.help
65
+ pwn[v0.5.488]: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:
@@ -432,7 +432,8 @@ module PWN
432
432
 
433
433
  PWN.send(:remove_const, :MeshTxEchoThread) if PWN.const_defined?(:MeshTxEchoThread)
434
434
  PWN.send(:remove_const, :MqttObj) if PWN.const_defined?(:MqttObj)
435
- PWN.send(:remove_const, :MeshRxWin) if PWN.const_defined?(:MeshRxWin)
435
+ PWN.send(:remove_const, :MeshRxHeaderWin) if PWN.const_defined?(:MeshRxHeaderWin)
436
+ PWN.send(:remove_const, :MeshRxBodyWin) if PWN.const_defined?(:MeshRxBodyWin)
436
437
  PWN.send(:remove_const, :MeshTxWin) if PWN.const_defined?(:MeshTxWin)
437
438
  PWN.send(:remove_const, :MeshMutex) if PWN.const_defined?(:MeshMutex)
438
439
  PWN.send(:remove_const, :MqttSubThread) if PWN.const_defined?(:MqttSubThread)
@@ -508,29 +509,37 @@ module PWN
508
509
  white = mesh_ui_colors[6][:color_id]
509
510
 
510
511
  rx_height = Curses.lines - 4
511
- rx_win = Curses::Window.new(rx_height, Curses.cols, 0, 0)
512
+ rx_header_win = Curses::Window.new(rx_height, Curses.cols, 0, 0)
512
513
  # TODO: Scrollable but should stay below header_line
513
- rx_win.scrollok(true)
514
- rx_win.nodelay = true
515
- rx_win.attron(Curses.color_pair(cyan) | Curses::A_BOLD)
514
+ rx_header_win.scrollok(false)
515
+ rx_header_win.nodelay = true
516
+ rx_header_win.attron(Curses.color_pair(cyan) | Curses::A_BOLD)
516
517
 
517
518
  # Make rx_header bold and green
518
- rx_win.attron(Curses.color_pair(green) | Curses::A_BOLD)
519
+ rx_header_win.attron(Curses.color_pair(green) | Curses::A_BOLD)
519
520
  rx_header = "<<< #{host}:#{port} | #{region}/#{topic} | ch:#{channel_num} >>>"
520
521
  rx_header_len = rx_header.length
521
522
  rx_header_pos = (Curses.cols / 2) - (rx_header_len / 2)
522
- rx_win.setpos(1, rx_header_pos)
523
- rx_win.addstr(rx_header)
524
- rx_win.attroff(Curses.color_pair(green) | Curses::A_BOLD)
523
+ rx_header_win.setpos(1, rx_header_pos)
524
+ rx_header_win.addstr(rx_header)
525
+ rx_header_win.attroff(Curses.color_pair(green) | Curses::A_BOLD)
525
526
  # Jump two lines below header before messages begin
526
- rx_win.setpos(2, 0)
527
- rx_win.attron(Curses.color_pair(cyan) | Curses::A_BOLD)
527
+ rx_header_win.setpos(2, 0)
528
+ rx_header_win.attron(Curses.color_pair(cyan) | Curses::A_BOLD)
528
529
  header_line = "\u2014" * Curses.cols
529
530
  rx_header_bottom_line_pos = (Curses.cols / 2) - (header_line.length / 2)
530
- rx_win.addstr(header_line)
531
- rx_win.attroff(Curses.color_pair(cyan) | Curses::A_BOLD)
532
-
533
- rx_win.refresh
531
+ rx_header_win.addstr(header_line)
532
+ rx_header_win.attroff(Curses.color_pair(cyan) | Curses::A_BOLD)
533
+ rx_header_win.refresh
534
+ PWN.const_set(:MeshRxHeaderWin, rx_header_win)
535
+
536
+ body_start_row = 3
537
+ body_height = rx_height - body_start_row
538
+ rx_body_win = Curses::Window.new(body_height, Curses.cols, body_start_row, 0)
539
+ rx_body_win.scrollok(true)
540
+ rx_body_win.nodelay = true
541
+ rx_body_win.refresh
542
+ PWN.const_set(:MeshRxBodyWin, rx_body_win)
534
543
 
535
544
  tx_height = rx_height - 1
536
545
  tx_win = Curses::Window.new(4, Curses.cols, tx_height, 0)
@@ -538,7 +547,6 @@ module PWN
538
547
  tx_win.nodelay = true
539
548
  tx_win.refresh
540
549
 
541
- PWN.const_set(:MeshRxWin, rx_win)
542
550
  PWN.const_set(:MeshTxWin, tx_win)
543
551
  PWN.const_set(:MeshMutex, Mutex.new)
544
552
 
@@ -622,7 +630,7 @@ module PWN
622
630
  decoded = packet[:decoded]
623
631
  next unless decoded.key?(:portnum) && decoded[:portnum] == :TEXT_MESSAGE_APP
624
632
 
625
- rx_win = PWN.const_get(:MeshRxWin)
633
+ # rx_header_win = PWN.const_get(:MeshRxHeaderWin)
626
634
  mutex = PWN.const_get(:MeshMutex)
627
635
 
628
636
  from = "#{packet[:node_id_from]} ".ljust(9, ' ')
@@ -646,23 +654,24 @@ module PWN
646
654
  to_label = 'DM' unless to == '!ffffffff'
647
655
  current_line = "\nDate: #{ts}\nFrom: #{from}\n#{to_label}: #{to}\nTopic: #{absolute_topic}\n> #{rx_text}"
648
656
 
649
- rx_win.attron(Curses.color_pair(pair) | Curses::A_REVERSE)
657
+ rx_body_win = PWN.const_get(:MeshRxBodyWin)
658
+ rx_body_win.attron(Curses.color_pair(pair) | Curses::A_REVERSE)
650
659
  mutex.synchronize do
660
+ inner_height = Curses.lines - 5
651
661
  inner_width = Curses.cols
652
662
  segments = current_line.scan(/.{1,#{inner_width}}/)
653
663
  segments.each do |seg|
654
- rx_win.setpos(rx_win.cury, 0)
664
+ rx_body_win.setpos(rx_body_win.cury, 0)
655
665
  # Handle wide Unicode characters for proper alignment
656
666
  display_width = Unicode::DisplayWidth.of(seg)
657
667
  width_diff = seg.length - display_width
658
668
  inner_width = Curses.cols + width_diff
659
669
  line = seg.ljust(inner_width)
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")
670
+ rx_body_win.addstr(line)
662
671
  end
663
- rx_win.refresh
672
+ rx_body_win.refresh
664
673
  end
665
- rx_win.attroff(Curses.color_pair(pair) | Curses::A_REVERSE)
674
+ rx_body_win.attroff(Curses.color_pair(pair) | Curses::A_REVERSE)
666
675
 
667
676
  last_from = from
668
677
  end
@@ -746,10 +755,16 @@ module PWN
746
755
  PWN.send(:remove_const, :MqttObj)
747
756
  end
748
757
 
749
- if PWN.const_defined?(:MeshRxWin)
750
- PWN.const_get(:MeshRxWin).close
751
- PWN.send(:remove_const, :MeshRxWin)
758
+ if PWN.const_defined?(:MeshRxHeaderWin)
759
+ PWN.const_get(:MeshRxHeaderWin).close
760
+ PWN.send(:remove_const, :MeshRxHeaderWin)
761
+ end
762
+
763
+ if PWN.const_defined?(:MeshRxBodyWin)
764
+ PWN.const_get(:MeshRxBodyWin).close
765
+ PWN.send(:remove_const, :MeshRxBodyWin)
752
766
  end
767
+
753
768
  if PWN.const_defined?(:MeshTxWin)
754
769
  PWN.const_get(:MeshTxWin).close
755
770
  PWN.send(:remove_const, :MeshTxWin)
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.486'
4
+ VERSION = '0.5.488'
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.486
4
+ version: 0.5.488
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.137
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.137
543
+ version: 0.0.139
544
544
  - !ruby/object:Gem::Dependency
545
545
  name: metasm
546
546
  requirement: !ruby/object:Gem::Requirement