rex-core 0.1.25 → 0.1.28

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: 92383c2b5e9cf999abfc198c12992d176cfdf262fbd782886ef1ea1a705f2fd6
4
- data.tar.gz: 584ffd804e8c5b1d3b96c5cf90580553fb12513c958362d93238cf92545c7184
3
+ metadata.gz: 9468d36e72d66195711dac2564ae2cf1e08310eebceba1c2acde4cff018bacb6
4
+ data.tar.gz: d2e0cf14008bf2bcd6677d1159086f2b8f64554e742760cf84ecbb07fd5c2674
5
5
  SHA512:
6
- metadata.gz: fc7aa81e629107d66ceefdee7fcde2f7620fd95aff8bb2f163eacd31387835e84f123bdda4666b5e4c6a3390db5a9ddb4a55e8a15850c670ad0610c479ac2816
7
- data.tar.gz: 5d4b2fd53ec1cb320a5d503d97ff4f478f330368f98c3230cc1918edf1d07a9f950c2bef7d0210074e52ce1ee16097f3e32703b4476cd16d7d3edb651c26e35e
6
+ metadata.gz: f4f639fa2c1ffe325df8b8ac4080539c0d46fa09eb0ecea112d1165de6feb59833004997f1617293b9edb4f89c9bf78c6ad559d51cbb34a02ab34f96270badaa
7
+ data.tar.gz: ab7f20bab074911d27390ae574b4af8ab36e4390ac5416d533956fc6c34be0cf1c943d7a2e71c49499ccf88ced63f553ad0d17f6170a61ba7516841a4e729ca7
checksums.yaml.gz.sig CHANGED
Binary file
@@ -20,6 +20,7 @@ jobs:
20
20
  - 2.6
21
21
  - 2.7
22
22
  - 3.0
23
+ - 3.1
23
24
  test_cmd:
24
25
  - bundle exec rspec
25
26
 
data/lib/rex/compat.rb CHANGED
@@ -133,6 +133,7 @@ def self.open_browser(url='http://google.com/')
133
133
  when /darwin/
134
134
  system("open #{url}")
135
135
  when /android/
136
+ url = "file://#{url}" if url.to_s.start_with?('/')
136
137
  system("am start --user 0 -a android.intent.action.VIEW -d #{url}")
137
138
  else
138
139
  # Search through the PATH variable (if it exists) and chose a browser
@@ -190,6 +191,7 @@ def self.open_webrtc_browser(url='http://google.com/')
190
191
  end
191
192
  end
192
193
  when /android/
194
+ url = "file://#{url}" if url.to_s.start_with?('/')
193
195
  system("am start --user 0 -a android.intent.action.VIEW -d #{url}")
194
196
  else
195
197
  if defined? ENV['PATH']
@@ -1,5 +1,5 @@
1
1
  module Rex
2
2
  module Core
3
- VERSION = "0.1.25"
3
+ VERSION = "0.1.28"
4
4
  end
5
5
  end
data/lib/rex/sync/ref.rb CHANGED
@@ -10,11 +10,38 @@ module Rex
10
10
  #
11
11
  ###
12
12
  module Ref
13
+ #
14
+ # Raises a TypeError to prevent cloning.
15
+ #
16
+ def clone
17
+ raise TypeError, "can't clone instance of Ref #{self.class}"
18
+ end
19
+
20
+ #
21
+ # Raises a TypeError to prevent duping.
22
+ #
23
+ def dup
24
+ raise TypeError, "can't dup instance of Ref #{self.class}"
25
+ end
26
+
27
+ #
28
+ # Ensures that the Ref is correctly initialized when extended on an object:
29
+ # ```
30
+ # arbitrary_resource = Resource.new
31
+ # arbitrary_resource.extend(::Rex::Ref)
32
+ # ```
33
+ #
34
+ # @param instance [object] the instance that has just extended the Ref module
35
+ def self.extended(instance)
36
+ instance.refinit
37
+ end
13
38
 
14
39
  #
15
40
  # Initializes the reference count to one.
16
41
  #
17
42
  def refinit
43
+ return if defined?(@_references)
44
+
18
45
  @_references = 1
19
46
  @_references_mutex = Mutex.new
20
47
 
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rex-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.25
4
+ version: 0.1.28
5
5
  platform: ruby
6
6
  authors:
7
7
  - Metasploit Hackers
@@ -93,7 +93,7 @@ cert_chain:
93
93
  EknWpNgVhohbot1lfVAMmIhdtOVaRVcQQixWPwprDj/ydB8ryDMDosIMcw+fkoXU
94
94
  9GJsSaSRRYQ9UUkVL27b64okU8D48m8=
95
95
  -----END CERTIFICATE-----
96
- date: 2022-01-26 00:00:00.000000000 Z
96
+ date: 2022-04-05 00:00:00.000000000 Z
97
97
  dependencies:
98
98
  - !ruby/object:Gem::Dependency
99
99
  name: rake
metadata.gz.sig CHANGED
Binary file