pwn 0.4.552 → 0.4.554

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: d1e99d054c32a3080283ed394aa8711220266af5e2ca115e59e99ff55101b87e
4
- data.tar.gz: 892cf61a00ea0d0e090f0cb458635c0188fce92735a41f5b00ad7831776bf52a
3
+ metadata.gz: 5845a117a0a0e7c58a9bee3b8def4d40d5459079dba07ced63445bd79165d5fb
4
+ data.tar.gz: b52393e4b3361dc2bce767583ccfcd17be00cf0bb8283f8b5349141015b82650
5
5
  SHA512:
6
- metadata.gz: ffca232d03cd3f35338e22c4f58957db41f45b247097aa57c5338720c51187b87fe4f1d416426326a652a99ca608b05fed522b1844eff15ebc72eaaf09e96063
7
- data.tar.gz: 2cad3d29f583cf0307e26bc6077d86d96dc75fd7ecb4c8f4ef9053064da847ec9c91d667f2fdd9e7b099373bf843468f95c609755b21e9f074fbd127a49467c5
6
+ metadata.gz: 50e687553229086fb9f38753cc29a40a496deafed3d6491aa115fa42ba6b4b1380407f2cc325ae5bf5cd7765d7209cc8d9f5e9cf572c0cbe94a171dc9a3257c5
7
+ data.tar.gz: d81f50b569dfeb6c2dd438f0cc2eba17ba99378216360260130f470c1f9d2301888a47d8d9e3b9ea8c8b94d7f09ef710d7ef521edc25f441d770f5a1ceb978aa
data/Gemfile CHANGED
@@ -18,7 +18,7 @@ gem 'aws-sdk', '3.1.0'
18
18
  gem 'bettercap', '1.6.2'
19
19
  gem 'brakeman', '5.3.1'
20
20
  gem 'bson', '4.15.0'
21
- gem 'bundler', '>=2.3.23'
21
+ gem 'bundler', '>=2.3.24'
22
22
  gem 'bundler-audit', '0.9.1'
23
23
  gem 'bunny', '2.19.0'
24
24
  gem 'colorize', '0.8.1'
data/README.md CHANGED
@@ -37,7 +37,7 @@ $ rvm use ruby-3.1.2@pwn
37
37
  $ rvm list gemsets
38
38
  $ gem install --verbose pwn
39
39
  $ pwn
40
- pwn[v0.4.552]:001 >>> PWN.help
40
+ pwn[v0.4.554]: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.1.2@pwn
52
52
  $ gem uninstall --all --executables pwn
53
53
  $ gem install --verbose pwn
54
54
  $ pwn
55
- pwn[v0.4.552]:001 >>> PWN.help
55
+ pwn[v0.4.554]:001 >>> PWN.help
56
56
  ```
57
57
 
58
58
 
@@ -143,10 +143,6 @@ module PWN
143
143
  '-v'
144
144
  )
145
145
 
146
- baresip_obj[:session_thread] = init_session_thread(
147
- baresip_obj: baresip_obj
148
- )
149
-
150
146
  ok = 'registered successfully'
151
147
  gone = 'account: No SIP accounts found'
152
148
  forb = '403 Forbidden'
@@ -154,7 +150,13 @@ module PWN
154
150
  # TODO: Make this faster.
155
151
  print 'Starting baresip...'
156
152
  loop do
157
- break if @session_data.select { |s| s.include?(ok) }.length.positive?
153
+ next unless File.exist?(screenlog_path)
154
+
155
+ dump_session_data = File.readlines(screenlog_path)
156
+ dump_session_data.delete_if do |line|
157
+ line.include?('ua: using best effort AF: af=AF_INET')
158
+ end
159
+ break if dump_session_data.select { |s| s.include?(ok) }.length.positive?
158
160
 
159
161
  next unless dump_session_data.select { |s| s.include?(gone) }.length.positive?
160
162
  next unless dump_session_data.select { |s| s.include?(forb) }.length.positive?
@@ -170,53 +172,6 @@ module PWN
170
172
  raise e
171
173
  end
172
174
 
173
- # Supported Method Parameters::
174
- # session_thread = init_session_thread(
175
- # serial_conn: 'required - SerialPort.new object'
176
- # )
177
-
178
- private_class_method def self.init_session_thread(opts = {})
179
- baresip_obj = opts[:baresip_obj]
180
-
181
- session_root = baresip_obj[:session_root]
182
- screenlog_path = baresip_obj[:screenlog_path]
183
-
184
- # Spin up a baresip_obj session_thread
185
- Thread.new do
186
- loop do
187
- next unless File.exist?(screenlog_path)
188
-
189
- # Continuously consume contents of screenlog_path
190
- @session_data = File.readlines(screenlog_path)
191
- @session_data.delete_if do |line|
192
- line.include?('ua: using best effort AF: af=AF_INET')
193
- end
194
- end
195
- end
196
- rescue StandardError => e
197
- session_thread&.terminate
198
-
199
- raise e
200
- end
201
-
202
- # Supported Method Parameters::
203
- # session_data = PWN::Plugins::BareSIP.dump_session_data
204
-
205
- public_class_method def self.dump_session_data
206
- @session_data
207
- rescue StandardError => e
208
- raise e
209
- end
210
-
211
- # Supported Method Parameters::
212
- # session_data = PWN::Plugins::BareSIP.flush_session_data
213
-
214
- public_class_method def self.flush_session_data
215
- @session_data.clear
216
- rescue StandardError => e
217
- raise e
218
- end
219
-
220
175
  # Supported Method Parameters::
221
176
  # cmd_resp = PWN::Plugins::BareSIP.baresip_exec(
222
177
  # baresip_obj: 'Required - baresip obj returned from #start method',
@@ -244,13 +199,8 @@ module PWN
244
199
 
245
200
  public_class_method def self.stop(opts = {})
246
201
  baresip_obj = opts[:baresip_obj]
247
- session_thread = baresip_obj[:session_thread]
248
202
  screen_session = baresip_obj[:screen_session]
249
203
 
250
- flush_session_data
251
-
252
- session_thread.terminate
253
-
254
204
  puts "STOPPING #{baresip_obj[:screen_session]}"
255
205
  cmd_resp = baresip_exec(
256
206
  baresip_obj: baresip_obj,
@@ -509,8 +459,11 @@ module PWN
509
459
  print "#{seconds_to_record}s to record - remaining: #{format('%-9.9s', countdown)}"
510
460
  print "\r"
511
461
 
512
- # TODO: Fix known issue - if remote terminates call early
513
- # all calls in thread pool will be stopped prematurely :-/
462
+ dump_session_data = File.readlines(screenlog_path)
463
+ dump_session_data.delete_if do |line|
464
+ line.include?('ua: using best effort AF: af=AF_INET')
465
+ end
466
+
514
467
  if dump_session_data.select { |s| s.include?(terminated) }.length.positive?
515
468
  reason = 'call terminated by other party'
516
469
  break
@@ -716,8 +669,6 @@ module PWN
716
669
  screen_session: 'Optional name of screen session (Defaults baresip)'
717
670
  )
718
671
 
719
- session_data_arr = #{self}.dump_session_data
720
-
721
672
  cmd_resp = #{self}.baresip_exec(
722
673
  baresip_obj: 'Required - baresip obj returned from #start method',
723
674
  cmd: 'Required - command to send to baresip HTTP daemon'
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.4.552'
4
+ VERSION = '0.4.554'
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.4.552
4
+ version: 0.4.554
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-13 00:00:00.000000000 Z
11
+ date: 2022-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -114,14 +114,14 @@ dependencies:
114
114
  requirements:
115
115
  - - ">="
116
116
  - !ruby/object:Gem::Version
117
- version: 2.3.23
117
+ version: 2.3.24
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
- version: 2.3.23
124
+ version: 2.3.24
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: bundler-audit
127
127
  requirement: !ruby/object:Gem::Requirement