pwn 0.5.9 → 0.5.11
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 +4 -4
- data/README.md +3 -3
- data/bin/pwn_phone +1 -1
- data/lib/pwn/plugins/baresip.rb +9 -0
- data/lib/pwn/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1166d531105fe91c4800c93a9cad918750415df08064e18fa28ce175a6daa3f7
|
|
4
|
+
data.tar.gz: 584b2f2d74a81905d2831b6ac7dffdf05152690a04b016147955c90a11f75cbb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 92c96fac207368f754e37086233bee4ca5ba186eb6b8a911fb820818e617226d6c44a0e051aedb67fa6e45727c2217e32246093ada982da491199bccc54f48fd
|
|
7
|
+
data.tar.gz: d47c8a7afef9bd92dcdc5b970136f1ef74d1fb2b465ce7b242daae9b17193ec1667b07b88a5a8e737bf13c0add6961690125babcf5707fa485af6f669c93f2e8
|
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.
|
|
40
|
+
pwn[v0.5.11]:001 >>> PWN.help
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
[](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.
|
|
55
|
+
pwn[v0.5.11]: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.
|
|
65
|
+
pwn[v0.5.11]: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_phone
CHANGED
|
@@ -54,7 +54,7 @@ OptionParser.new do |options|
|
|
|
54
54
|
opts[:speech_to_text] = x
|
|
55
55
|
end
|
|
56
56
|
|
|
57
|
-
options.on('-xRULES', '--source-num-rules=RULES', '<Optional - Comma-delimited list of rules for src_num format (i.e. XXXXXXXXXX, self, same_country, same_area, and/or same_prefix [Defaults to random src_num w/ same length as target_num])>') do |x|
|
|
57
|
+
options.on('-xRULES', '--source-num-rules=RULES', '<Optional - Comma-delimited list of rules for src_num format (i.e. XXXXXXXXXX, static, self, same_country, same_area, and/or same_prefix [Defaults to random src_num w/ same length as target_num])>') do |x|
|
|
58
58
|
opts[:src_num_rules] = x
|
|
59
59
|
end
|
|
60
60
|
|
data/lib/pwn/plugins/baresip.rb
CHANGED
|
@@ -277,6 +277,8 @@ module PWN
|
|
|
277
277
|
)
|
|
278
278
|
end
|
|
279
279
|
|
|
280
|
+
return 'static' if src_num_rules_arr.include?(:static)
|
|
281
|
+
|
|
280
282
|
case target_num.to_s.length
|
|
281
283
|
when 10
|
|
282
284
|
# area+prefix+suffix
|
|
@@ -452,7 +454,9 @@ module PWN
|
|
|
452
454
|
puts cmd_resp.xpath('//pre').text
|
|
453
455
|
|
|
454
456
|
puts red
|
|
457
|
+
# TODO: This is a brittle mess. Refactor.
|
|
455
458
|
# Conditions to hangup when less than seconds_to_record
|
|
459
|
+
forbidden = '403 Caller Origination Number is Invalid'
|
|
456
460
|
terminated = 'terminated (duration:'
|
|
457
461
|
unavail = '503 Service Unavailable'
|
|
458
462
|
not_found = 'session closed: 404 Not Found'
|
|
@@ -469,6 +473,11 @@ module PWN
|
|
|
469
473
|
line.include?('ua: using best effort AF: af=AF_INET')
|
|
470
474
|
end
|
|
471
475
|
|
|
476
|
+
if dump_session_data.select { |s| s.include?(forbidden) }.length.positive?
|
|
477
|
+
reason = 'SIP 403 (forbidden)'
|
|
478
|
+
break
|
|
479
|
+
end
|
|
480
|
+
|
|
472
481
|
if dump_session_data.select { |s| s.include?(terminated) }.length.positive?
|
|
473
482
|
reason = 'call terminated by other party'
|
|
474
483
|
break
|
data/lib/pwn/version.rb
CHANGED
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.
|
|
4
|
+
version: 0.5.11
|
|
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-02-
|
|
11
|
+
date: 2024-02-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|