pwn 0.4.550 → 0.4.551

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: cd134f7000b7e270496c44285ef40619ca81d42dff7df5fd228ca721cac4de53
4
- data.tar.gz: d3ce94291f20a73cc78ebeee6f9ee88833ff7199056b7ed1863abd5e08de9032
3
+ metadata.gz: 37c116ff3072536f637e3b85299339fcff43cfae08fa907f51ef6db8f74bfeed
4
+ data.tar.gz: bf01ca52b18146da07b3aa882981be1484fc56a5fc72845415056a0d61438245
5
5
  SHA512:
6
- metadata.gz: d410d706464b6deb80fb6c30fddddac9234f51143ea072cf7d05ff528306c0c65e57ccc7f36fb1ee9f9c3a6b990c7c3c486252039a883aa63fda3a72a5903069
7
- data.tar.gz: 01e7cc4937cb0ec0337e28d932f8c7ff92be9220dcc00820997a35b66be1b1b10679ac2974ec27fd1770ef54501fc793008f7323854cf9c76c5e0ebca47639c1
6
+ metadata.gz: 4c4d7a6f950288b53d8850222c6a7f0ff22c54bf87de32cd7d842fde7ecef121374f1c1c6412f76fb26fb3fefc93b711b7b18e270d9b674c713e630f2174e381
7
+ data.tar.gz: 18553d6f48fe65b9a4885f17a912c58953539fa044da6e1f8d70a1d81bf860789cf8b8626f75b612ade3962dc7692714b1d15d857f657cf5f5770983d55cb3f8
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.550]:001 >>> PWN.help
40
+ pwn[v0.4.551]: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.550]:001 >>> PWN.help
55
+ pwn[v0.4.551]:001 >>> PWN.help
56
56
  ```
57
57
 
58
58
 
@@ -187,8 +187,8 @@ module PWN
187
187
  next unless File.exist?(screenlog_path)
188
188
 
189
189
  # Continuously consume contents of screenlog_path
190
- @session_data = File.readlines(screenlog_path)
191
- @session_data.delete_if do |line|
190
+ session_data = File.readlines(screenlog_path)
191
+ session_data.delete_if do |line|
192
192
  line.include?('ua: using best effort AF: af=AF_INET')
193
193
  end
194
194
  end
@@ -203,7 +203,7 @@ module PWN
203
203
  # session_data = PWN::Plugins::BareSIP.dump_session_data
204
204
 
205
205
  public_class_method def self.dump_session_data
206
- @session_data
206
+ session_data
207
207
  rescue StandardError => e
208
208
  raise e
209
209
  end
@@ -509,6 +509,8 @@ module PWN
509
509
  print "#{seconds_to_record}s to record - remaining: #{format('%-9.9s', countdown)}"
510
510
  print "\r"
511
511
 
512
+ # TODO: Fix known issue - if remote terminates call early
513
+ # all calls in thread pool will be stopped prematurely :-/
512
514
  if dump_session_data.select { |s| s.include?(terminated) }.length.positive?
513
515
  reason = 'call terminated by other party'
514
516
  break
@@ -530,14 +532,14 @@ module PWN
530
532
  puts end_of_color
531
533
 
532
534
  # Move to ensure block?
533
- call_stopped = Time.now.strftime('%Y-%m-%d_%H.%M.%S')
534
- puts "\n#{green}#{call_stopped} >>> #{reason} #{target_num}#{end_of_color}"
535
- call_resp_hash[:call_stopped] = call_stopped
536
- call_resp_hash[:reason] = reason
537
- puts "call termination reason: #{reason}"
538
-
539
- stop(baresip_obj: baresip_obj)
540
- FileUtils.rm_rf(config_root_for_target_num)
535
+ # call_stopped = Time.now.strftime('%Y-%m-%d_%H.%M.%S')
536
+ # puts "\n#{green}#{call_stopped} >>> #{reason} #{target_num}#{end_of_color}"
537
+ # call_resp_hash[:call_stopped] = call_stopped
538
+ # call_resp_hash[:reason] = reason
539
+ # puts "call termination reason: #{reason}"
540
+
541
+ # stop(baresip_obj: baresip_obj)
542
+ # FileUtils.rm_rf(config_root_for_target_num)
541
543
  # End of ensure block
542
544
 
543
545
  absolute_recording = ''
@@ -617,6 +619,16 @@ module PWN
617
619
  call_resp_hash
618
620
  rescue StandardError => e
619
621
  raise e
622
+ ensure
623
+ # Ensure baresip session is stopped
624
+ call_stopped = Time.now.strftime('%Y-%m-%d_%H.%M.%S')
625
+ puts "\n#{green}#{call_stopped} >>> #{reason} #{target_num}#{end_of_color}"
626
+ call_resp_hash[:call_stopped] = call_stopped
627
+ call_resp_hash[:reason] = reason
628
+ puts "call termination reason: #{reason}"
629
+
630
+ stop(baresip_obj: baresip_obj)
631
+ FileUtils.rm_rf(config_root_for_target_num)
620
632
  end
621
633
 
622
634
  # Supported Method Parameters::
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.550'
4
+ VERSION = '0.4.551'
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.4.550
4
+ version: 0.4.551
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.