pwn 0.5.44 → 0.5.46

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: 3f25e99b7bab77b60bf540f3a7116b5a73880b4a48bb657fab50d3b790fa1c55
4
- data.tar.gz: 1b1f20af44bedd09315acfe8f0d7e96cb80c51709a38daf7686f806de07694a1
3
+ metadata.gz: a7184b7779835838904c456d596a269bdbcfc16ef1decfc74b1647b919a2a994
4
+ data.tar.gz: 619117c61e14f580ded62296cad6ffaaba0c929fb30341a1476eb0b08fa24aae
5
5
  SHA512:
6
- metadata.gz: e5a537100ad7b89d3f50fff3378a6d278cfd306fafcb28a25bdfef94c3284865b80936fa70010e67851a98f1b113466606c59175ddefaee25273492cdad16616
7
- data.tar.gz: 8e686718096043e4b91a9f82a31ea5d584a7a80f9e7f07c7293c6a455910d06aad5e06b091b9111115e1f38f4bfae7031c8bfdab0c46c710afcc97773a42477c
6
+ metadata.gz: e5dd45352701c3610f8dadccd03dff9ac894a1c2c8a1347f92560d5066b919d660e30efca60bd693c043f31a1b8b787b1a21027338094465f6871ed5d8e95e46
7
+ data.tar.gz: f23b45f291a86fd85a1f095a926c670ebc1ee00dc1464f995b06076b3bb3d44d7ec95d0807329af2b2a23e515b8554f2f08111cab663d8310720caf1ae51a20b
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.44]:001 >>> PWN.help
40
+ pwn[v0.5.46]: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.44]:001 >>> PWN.help
55
+ pwn[v0.5.46]: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.44]:001 >>> PWN.help
65
+ pwn[v0.5.46]: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,75 @@
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('-sFREQ', '--start-freq=FREQ', '<Optional - Frequency to Set when Scanning Begins (Defaults to last known frequency)>') do |s|
14
+ opts[:start_freq] = s
15
+ end
16
+
17
+ options.on('-tFREQ', '--target-freq=FREQ', '<Required - Frequency to Conclude Scanning (e.g. 900000000 == 900 mHz>') do |s|
18
+ opts[:start_freq] = s
19
+ end
20
+
21
+ options.on('-hHOST', '--host=HOST', '<Optional - GQRX Host (Defaults to 127.0.0.1)>') do |h|
22
+ opts[:host] = h
23
+ end
24
+
25
+ options.on('-pPORT', '--port=PORT', '<Optional - GQRX Port (Defaults to 7356)>') do |p|
26
+ opts[:port] = p
27
+ end
28
+ end.parse!
29
+
30
+ if opts.empty?
31
+ puts `#{$PROGRAM_NAME} --help`
32
+ exit 1
33
+ end
34
+
35
+ def jump_to_freq(opts = {})
36
+ gqrx_sock = opts[:gqrx_sock]
37
+ freq = opts[:freq]
38
+
39
+ gqrx_sock.write("F #{freq}\n")
40
+ does_respond = gqrx_sock.wait_readable
41
+ gqrx_sock.readline.chomp
42
+
43
+ gqrx_sock.write("f\n")
44
+ does_respond = gqrx_sock.wait_readable
45
+ reached_freq = gqrx_sock.readline.chomp
46
+ puts "Reached #{reached_freq}..."
47
+ end
48
+
49
+ begin
50
+ pwn_provider = 'ruby-gem'
51
+ # pwn_provider = ENV.fetch('PWN_PROVIDER') if ENV.keys.select { |s| s == 'PWN_PROVIDER' }.any?
52
+ pwn_provider = ENV.fetch('PWN_PROVIDER') if ENV.keys.any? { |s| s == 'PWN_PROVIDER' }
53
+
54
+ start_freq = opts[:start_freq].to_i
55
+ end_freq = opts[:end_freq].to_i
56
+ host = opts[:host] ||= '127.0.0.1'
57
+ port = opts[:port] ||= 7356
58
+
59
+ gqrx_sock = PWN::Plugins::Sock.connect(target: host, port: port)
60
+ # If start value is greater than end value, go in reverse
61
+ if start_freq > end_freq
62
+ end_freq.downto(start_freq) do |freq|
63
+ jump_to_freq(gqrx_sock: gqrx_sock, freq: freq)
64
+ end
65
+ else
66
+ (start_freq..end_freq).each do |freq|
67
+ puts "Scanning #{freq}..."
68
+ jump_to_freq(gqrx_sock: gqrx_sock, freq: freq)
69
+ end
70
+ end
71
+ rescue SystemExit, Interrupt
72
+ puts "\nGoodbye."
73
+ ensure
74
+ gqrx_sock = PWN::Plugins::Sock.disconnect(sock_obj: gqrx_sock)
75
+ 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.44'
4
+ VERSION = '0.5.46'
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.44
4
+ version: 0.5.46
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