pwn 0.5.45 → 0.5.47

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ee2c5945a3ba779e3cbd6eb97590158685ac1bf53edeb2d13b6af42fc29f5536
4
- data.tar.gz: ae059c006d61c14e5e87998eac79df8e8e3f941c28ac4be929d18a12769fb9f2
3
+ metadata.gz: 910719a42741cc9b2eff2806e8a8194876bdd7b221233011fc2f9fa4e257f553
4
+ data.tar.gz: 07ba7fd748c10f2f429e486843351244b1e2b9e06a8e520604a172a6f5887d7f
5
5
  SHA512:
6
- metadata.gz: 7e9fb4e0eb8821392bdb96306ec93ebb454788795d9aedecada23d55ee2a75c2ab63a9e6316c1ba7d841c6416b7f256d108111fcff27f0380a352e185bedc818
7
- data.tar.gz: 2f6fbe6c6deb1ee808bb412f4be059e6b3fa660a64732fe998703ad4a8982cb77b6fb73e8260ee8fa4ccd562450aaa47cd470eaf370e19d1bcf05f0f171c5687
6
+ metadata.gz: 1c632a95588955c41d2bbf60870fd747ba6398c59fcfe7f0e7782ed1d41818ca64022525fadc255d879c50f9d04d5a43254693373cc870603c2a48659773a052
7
+ data.tar.gz: b8c3569b0b95cd3f8317e51adc6989a2d9fa5ff24a32e3ff0d5fe36f362ee22f011f9c435d3120e7ad7a79000e64f8bed00de4b8455ec663f8b461fa595b1c6f
data/Gemfile CHANGED
@@ -33,7 +33,7 @@ gem 'fftw3', '0.3'
33
33
  gem 'gdb', '1.0.0'
34
34
  gem 'gem-wrappers', '1.4.0'
35
35
  gem 'gist', '6.0.0'
36
- gem 'gruff', '0.23.0'
36
+ gem 'gruff', '0.24.0'
37
37
  gem 'htmlentities', '4.3.4'
38
38
  gem 'ipaddress', '0.8.3'
39
39
  gem 'jenkins_api_client2', '1.9.0'
@@ -73,7 +73,7 @@ gem 'rmagick', '5.4.4'
73
73
  gem 'rqrcode', '2.2.0'
74
74
  gem 'rspec', '3.13.0'
75
75
  gem 'rtesseract', '3.1.3'
76
- gem 'rubocop', '1.61.0'
76
+ gem 'rubocop', '1.62.1'
77
77
  gem 'rubocop-rake', '0.6.0'
78
78
  gem 'rubocop-rspec', '2.27.1'
79
79
  gem 'ruby-audio', '1.6.1'
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.45]:001 >>> PWN.help
40
+ pwn[v0.5.47]: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.3.0@pwn
52
52
  $ gem uninstall --all --executables pwn
53
53
  $ gem install --verbose pwn
54
54
  $ pwn
55
- pwn[v0.5.45]:001 >>> PWN.help
55
+ pwn[v0.5.47]: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.3.0@pwn
62
62
  $ rvmsudo gem uninstall --all --executables pwn
63
63
  $ rvmsudo gem install --verbose pwn
64
64
  $ pwn
65
- pwn[v0.5.45]:001 >>> PWN.help
65
+ pwn[v0.5.47]: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/bin/pwn CHANGED
@@ -4,6 +4,7 @@
4
4
  require 'optparse'
5
5
  require 'pwn'
6
6
  require 'pry'
7
+ require 'tty-prompt'
7
8
  require 'yaml'
8
9
 
9
10
  opts = {}
@@ -216,12 +217,22 @@ begin
216
217
  end
217
218
  end
218
219
 
220
+ # class PWNCompleter < Pry::InputCompleter
221
+ # def call(input)
222
+ # end
223
+ # end
224
+
219
225
  Pry::Commands.create_command 'pwn-asm' do
220
226
  description 'Initiate pwn.asm shell.'
221
227
 
222
228
  def process
223
229
  pi = pry_instance
224
230
  pi.config.pwn_asm = true
231
+ pi.custom_completions = proc do
232
+ prompt = TTY::Prompt.new
233
+ [pi.input.line_buffer]
234
+ # prompt.select(pi.input.line_buffer)
235
+ end
225
236
  end
226
237
  end
227
238
 
@@ -263,6 +274,7 @@ begin
263
274
  pi.config.pwn_gpt = false if pi.config.pwn_gpt
264
275
  pi.config.pwn_gpt_debug = false if pi.config.pwn_gpt_debug
265
276
  pi.config.pwn_gpt_speak = false if pi.config.pwn_gpt_speak
277
+ pi.config.completer = Pry::InputCompleter
266
278
  end
267
279
  end
268
280
 
@@ -0,0 +1,106 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: false
3
+
4
+ require 'pwn'
5
+ require 'optparse'
6
+
7
+ opts = {}
8
+ OptionParser.new do |options|
9
+ options.banner = "USAGE:
10
+ #{$PROGRAM_NAME} [opts]
11
+ "
12
+
13
+ options.on('-tFREQ', '--target-freq=FREQ', '<Required - Frequency to Conclude Scanning (e.g. 900000000 == 900 mHz>') do |s|
14
+ opts[:start_freq] = s
15
+ end
16
+
17
+ options.on('-dMODE', '--demodulator-mode=MODE', '<Optional - Set Demodulator ModeOFF | RAW | AM | FM | WFM | WFM_ST | WFM_ST_OIRT | LSB |USB | CW | CWL | CWU (Defaults to AM)>') do |d|
18
+ opts[:demodulator_mode] = d
19
+ end
20
+
21
+ options.on('-sFREQ', '--start-freq=FREQ', '<Optional - Frequency to Set when Scanning Begins (Defaults to last known frequency)>') do |s|
22
+ opts[:start_freq] = s
23
+ end
24
+
25
+ options.on('-hHOST', '--host=HOST', '<Optional - GQRX Host (Defaults to 127.0.0.1)>') do |h|
26
+ opts[:host] = h
27
+ end
28
+
29
+ options.on('-pPORT', '--port=PORT', '<Optional - GQRX Port (Defaults to 7356)>') do |p|
30
+ opts[:port] = p
31
+ end
32
+ end.parse!
33
+
34
+ if opts.empty?
35
+ puts `#{$PROGRAM_NAME} --help`
36
+ exit 1
37
+ end
38
+
39
+ def gqrx_cmd(opts = {})
40
+ # f - Get frequency [Hz]
41
+ # F - Set frequency [Hz]
42
+ # m - Get demodulator mode
43
+ # M - Set demodulator mode (OFF, RAW, AM, FM, WFM, WFM_ST,
44
+ # WFM_ST_OIRT, LSB, USB, CW, CWL, CWU)
45
+ # l STRENGTH - Get signal strength [dBFS]
46
+ # l SQL - Get squelch threshold [dBFS]
47
+ # L SQL <sql> - Set squelch threshold to <sql> [dBFS]
48
+ # u RECORD - Get status of audio recorder
49
+ # U RECORD <status> - Set status of audio recorder to <status>
50
+ # c - Close connection
51
+ # AOS - Acquisition of signal (AOS) event, start audio recording
52
+ # LOS - Loss of signal (LOS) event, stop audio recording
53
+ # \dump_state - Dump state (only usable for compatibility)
54
+ gqrx_sock = opts[:gqrx_sock]
55
+ cmd = opts[:cmd]
56
+
57
+ gqrx_sock.write("#{cmd}\n")
58
+ does_respond = gqrx_sock.wait_readable
59
+ gqrx_sock.readline.chomp if does_respond
60
+ end
61
+
62
+ begin
63
+ pwn_provider = 'ruby-gem'
64
+ pwn_provider = ENV.fetch('PWN_PROVIDER') if ENV.keys.any? { |s| s == 'PWN_PROVIDER' }
65
+
66
+ demodulator_mode = opts[:demodulator_mode] ||= 'AM'
67
+ raise "ERROR: Invalid demodulator mode: #{demodulator_mode}" unless %w[OFF RAW AM FM WFM WFM_ST WFM_ST_OIRT LSB USB CW CWL CWU].include?(demodulator_mode)
68
+
69
+ puts "Setting demodulator mode to #{demodulator_mode}..."
70
+ demod_resp = gqrx_cmd(gqrx_sock: gqrx_sock, cmd: "M #{demodulator_mode}")
71
+ puts demod_resp
72
+
73
+ start_freq = opts[:start_freq].to_i
74
+ start_freq = gqrx_cmd(gqrx_sock: gqrx_sock, cmd: 'f').to_i if start_freq.zero?
75
+
76
+ end_freq = opts[:end_freq].to_i
77
+ raise 'ERROR: Invalid end frequency' if end_freq.zero?
78
+
79
+ puts "Scanning from #{start_freq} to #{end_freq}..."
80
+
81
+ host = opts[:host] ||= '127.0.0.1'
82
+ port = opts[:port] ||= 7356
83
+ puts "Connecting to GQRX at #{host}:#{port}..."
84
+
85
+ gqrx_sock = PWN::Plugins::Sock.connect(target: host, port: port)
86
+ # If start value is greater than end value, go in reverse
87
+ if start_freq > end_freq
88
+ end_freq.downto(start_freq) do |freq|
89
+ gqrx_cmd(gqrx_sock: gqrx_sock, cmd: "F #{freq}")
90
+ resp = gqrx_cmd(gqrx_sock: gqrx_sock, cmd: 'f')
91
+ puts "Reached #{resp}..."
92
+ end
93
+ else
94
+ (start_freq..end_freq).each do |freq|
95
+ puts "Scanning #{freq}..."
96
+ gqrx_cmd(gqrx_sock: gqrx_sock, cmd: "F #{freq}")
97
+ resp = gqrx_cmd(gqrx_sock: gqrx_sock, cmd: 'f')
98
+ puts "Reached #{resp}..."
99
+ end
100
+ end
101
+ rescue SystemExit, Interrupt
102
+ puts "\nGoodbye."
103
+ ensure
104
+ resp = gqrx_cmd(gqrx_sock: gqrx_sock, cmd: 'c')
105
+ gqrx_sock = PWN::Plugins::Sock.disconnect(sock_obj: gqrx_sock)
106
+ end
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.45'
4
+ VERSION = '0.5.47'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pwn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.45
4
+ version: 0.5.47
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-05 00:00:00.000000000 Z
11
+ date: 2024-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -310,14 +310,14 @@ dependencies:
310
310
  requirements:
311
311
  - - '='
312
312
  - !ruby/object:Gem::Version
313
- version: 0.23.0
313
+ version: 0.24.0
314
314
  type: :runtime
315
315
  prerelease: false
316
316
  version_requirements: !ruby/object:Gem::Requirement
317
317
  requirements:
318
318
  - - '='
319
319
  - !ruby/object:Gem::Version
320
- version: 0.23.0
320
+ version: 0.24.0
321
321
  - !ruby/object:Gem::Dependency
322
322
  name: htmlentities
323
323
  requirement: !ruby/object:Gem::Requirement
@@ -856,14 +856,14 @@ dependencies:
856
856
  requirements:
857
857
  - - '='
858
858
  - !ruby/object:Gem::Version
859
- version: 1.61.0
859
+ version: 1.62.1
860
860
  type: :runtime
861
861
  prerelease: false
862
862
  version_requirements: !ruby/object:Gem::Requirement
863
863
  requirements:
864
864
  - - '='
865
865
  - !ruby/object:Gem::Version
866
- version: 1.61.0
866
+ version: 1.62.1
867
867
  - !ruby/object:Gem::Dependency
868
868
  name: rubocop-rake
869
869
  requirement: !ruby/object:Gem::Requirement
@@ -1209,6 +1209,7 @@ executables:
1209
1209
  - pwn_diff_csv_files_w_column_exclude
1210
1210
  - pwn_domain_reversewhois
1211
1211
  - pwn_fuzz_net_app_proto
1212
+ - pwn_gqrx_scanner
1212
1213
  - pwn_ibm_appscan_enterprise
1213
1214
  - pwn_jenkins_create_job
1214
1215
  - pwn_jenkins_create_view
@@ -1276,6 +1277,7 @@ files:
1276
1277
  - bin/pwn_diff_csv_files_w_column_exclude
1277
1278
  - bin/pwn_domain_reversewhois
1278
1279
  - bin/pwn_fuzz_net_app_proto
1280
+ - bin/pwn_gqrx_scanner
1279
1281
  - bin/pwn_ibm_appscan_enterprise
1280
1282
  - bin/pwn_jenkins_create_job
1281
1283
  - bin/pwn_jenkins_create_view