stealth_browser_automation 1.1.19 → 1.1.20
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/lib/stealth_browser_automation.rb +43 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0964be1f00d2a923bcb474e9cd1a97ba25ddc129
|
4
|
+
data.tar.gz: 4e102526143d94c3fb6c99df7fc09619766ca89d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b12c07cb72a9e919eba74193298f8779afacb54190a0d466521be38dd28d7982068ad9a2738f1b7fab2e9eacc84996437df73404faee8a0194dd95189545f702
|
7
|
+
data.tar.gz: 052fc21921ff852129f2a3d4d85377f27190ccb3f4e7edb479631d8dc629725cd2abe07e2b1041ce3b15b06b5d57b7d2ac7a624291acebfca3e37fdf66d47051
|
@@ -34,6 +34,49 @@ module BlackStack
|
|
34
34
|
@@mla_local_port = h[:mla_local_port]
|
35
35
|
end
|
36
36
|
|
37
|
+
# returns the profileId of the new Mimic profile
|
38
|
+
def self.create_local_profile(data)
|
39
|
+
url = "http://127.0.0.1:#{BlackStack::StealthBrowserAutomation::Multilogin::mla_local_port.to_s}/api/v2/localprofile/create"
|
40
|
+
uri = URI(url)
|
41
|
+
Net::HTTP.start(uri.host, uri.port, :use_ssl => false, :verify_mode => OpenSSL::SSL::VERIFY_NONE) do |http|
|
42
|
+
req = Net::HTTP::Post.new(uri)
|
43
|
+
req['Content-Type'] = 'application/json'
|
44
|
+
req.body = data.to_json
|
45
|
+
res = JSON.parse(http.request(req).body)
|
46
|
+
raise "Error creating Multilogin local profile: #{res.to_s}" if !res.has_key?('uuid')
|
47
|
+
return res['uuid']
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
# returns the profileId of the new Mimic profile
|
52
|
+
def self.remove_local_profile(profile_id)
|
53
|
+
url = "http://127.0.0.1:#{BlackStack::StealthBrowserAutomation::Multilogin::mla_local_port.to_s}/api/v2/localprofile/remove?profileId=#{profile_id}"
|
54
|
+
uri = URI.parse(url)
|
55
|
+
req = Net::HTTP::Post.new(uri)
|
56
|
+
req['Content-Type'] = 'application/json'
|
57
|
+
res = Net::HTTP.start(uri.host, uri.port, :use_ssl => false, :verify_mode => OpenSSL::SSL::VERIFY_NONE) {|http|
|
58
|
+
http.request(req)
|
59
|
+
}
|
60
|
+
res = JSON.parse(res.body)
|
61
|
+
raise "Error removing Multilogin local profile: #{res.to_s}" if !res.has_key?('status')
|
62
|
+
raise "Error removing Multilogin local profile: #{res['status'].to_s}" if res['status'] != 'OK'
|
63
|
+
end # def self.delete_profile
|
64
|
+
|
65
|
+
# returns the profileId of the new Mimic profile
|
66
|
+
def self.local_profiles()
|
67
|
+
url = "http://127.0.0.1:#{BlackStack::StealthBrowserAutomation::Multilogin::mla_local_port.to_s}/api/v2/localprofile/list"
|
68
|
+
uri = URI.parse(url)
|
69
|
+
req = Net::HTTP::Post.new(uri)
|
70
|
+
req['Content-Type'] = 'application/json'
|
71
|
+
res = Net::HTTP.start(uri.host, uri.port, :use_ssl => false, :verify_mode => OpenSSL::SSL::VERIFY_NONE) {|http|
|
72
|
+
http.request(req)
|
73
|
+
}
|
74
|
+
res = JSON.parse(res.body)
|
75
|
+
raise "Error getting Multilogin local profiles: #{res.to_s}" if !res.has_key?('status')
|
76
|
+
raise "Error getting Multilogin local profiles: #{res['status'].to_s}" if res['status'] != 'OK'
|
77
|
+
res
|
78
|
+
end # def self.delete_profile
|
79
|
+
|
37
80
|
# returns the profileId of the new Mimic profile
|
38
81
|
def self.create_profile(data)
|
39
82
|
url = "https://api.multiloginapp.com/v2/profile?token=#{BlackStack::StealthBrowserAutomation::Multilogin::auth_token.to_s}&mlaVersion=#{BlackStack::StealthBrowserAutomation::Multilogin::mla_version.to_s}"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stealth_browser_automation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leandro Daniel Sardi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01
|
11
|
+
date: 2020-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mini_magick
|