stealth_browser_automation 1.1.19 → 1.1.20

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
  SHA1:
3
- metadata.gz: 2dadd86296585c6da7d4c6acc98768d66ccf17aa
4
- data.tar.gz: ed02a1bcb579aaf694b3c6708c991265d1278e23
3
+ metadata.gz: 0964be1f00d2a923bcb474e9cd1a97ba25ddc129
4
+ data.tar.gz: 4e102526143d94c3fb6c99df7fc09619766ca89d
5
5
  SHA512:
6
- metadata.gz: 0b7e694a8b42e275fe596256dad43c9db9502dc7a8192bd9c41e85cddb70647e5c5eadff4dd4a8a46ee0c0164f49fa3274e843370accd2b53c7517517ec6e419
7
- data.tar.gz: 85c49c06a9b4fc9ff4ee8bc10fe6f14dcd72f2d3ad064b28797682163083837291223221538e016cb65822b6f216325382ec02c3b55c6c5330c70f4e664951a9
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.19
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-31 00:00:00.000000000 Z
11
+ date: 2020-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mini_magick